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 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841
// This file is @generated by prost-build.
/// The request message for querying Drive activity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDriveActivityRequest {
/// Details on how to consolidate related actions that make up the activity. If
/// not set, then related actions aren't consolidated.
#[prost(message, optional, tag = "5")]
pub consolidation_strategy: ::core::option::Option<ConsolidationStrategy>,
/// The minimum number of activities desired in the response; the server
/// attempts to return at least this quantity. The server may also return fewer
/// activities if it has a partial response ready before the request times out.
/// If not set, a default value is used.
#[prost(int32, tag = "6")]
pub page_size: i32,
/// The token identifies which page of results to return. Set this to the
/// next_page_token value returned from a previous query to obtain the
/// following page of results. If not set, the first page of results is
/// returned.
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
/// The filtering for items returned from this query request. The format of the
/// filter string is a sequence of expressions, joined by an optional "AND",
/// where each expression is of the form "field operator value".
///
/// Supported fields:
///
/// - `time`: Uses numerical operators on date values either in
/// terms of milliseconds since Jan 1, 1970 or in <a
/// href="<https://www.rfc-editor.org/rfc/rfc3339"> target="_blank">RFC
/// 3339</a> format. Examples:
/// - `time > 1452409200000 AND time <= 1492812924310`
/// - `time >= "2016-01-10T01:02:03-05:00"`
///
/// - `detail.action_detail_case`: Uses the "has" operator (:) and
/// either a singular value or a list of allowed action types enclosed in
/// parentheses, separated by a space. To exclude a result from the
/// response, prepend a hyphen (`-`) to the beginning of the filter string.
/// Examples:
/// - `detail.action_detail_case:RENAME`
/// - `detail.action_detail_case:(CREATE RESTORE)`
/// - `-detail.action_detail_case:MOVE`
///
#[prost(string, tag = "8")]
pub filter: ::prost::alloc::string::String,
/// The primary criteria in the query. The default is
/// ancestorName = `items/root`, if no key is specified.
#[prost(oneof = "query_drive_activity_request::Key", tags = "1, 2")]
pub key: ::core::option::Option<query_drive_activity_request::Key>,
}
/// Nested message and enum types in `QueryDriveActivityRequest`.
pub mod query_drive_activity_request {
/// The primary criteria in the query. The default is
/// ancestorName = `items/root`, if no key is specified.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Key {
/// Return activities for this Drive item. The format is
/// `items/ITEM_ID`.
#[prost(string, tag = "1")]
ItemName(::prost::alloc::string::String),
/// Return activities for this Drive folder, plus all children and
/// descendants. The format is `items/ITEM_ID`.
#[prost(string, tag = "2")]
AncestorName(::prost::alloc::string::String),
}
}
/// How the individual activities are consolidated. If a set of activities is
/// related they can be consolidated into one combined activity, such as one
/// actor performing the same action on multiple targets, or multiple actors
/// performing the same action on a single target. The strategy defines the rules
/// for which activities are related.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConsolidationStrategy {
/// How the individual activities are consolidated.
#[prost(oneof = "consolidation_strategy::Strategy", tags = "1, 2")]
pub strategy: ::core::option::Option<consolidation_strategy::Strategy>,
}
/// Nested message and enum types in `ConsolidationStrategy`.
pub mod consolidation_strategy {
/// A strategy that does no consolidation of individual activities.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NoConsolidation {}
/// A strategy that consolidates activities using the grouping rules from the
/// legacy V1 Activity API. Similar actions occurring within a window of time
/// can be grouped across multiple targets (such as moving a set of files at
/// once) or multiple actors (such as several users editing the same item).
/// Grouping rules for this strategy are specific to each type of action.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Legacy {}
/// How the individual activities are consolidated.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Strategy {
/// The individual activities are not consolidated.
#[prost(message, tag = "1")]
None(NoConsolidation),
/// The individual activities are consolidated using the legacy strategy.
#[prost(message, tag = "2")]
Legacy(Legacy),
}
}
/// The actor of a Drive activity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Actor {
/// The type of actor.
#[prost(oneof = "actor::Type", tags = "1, 2, 3, 4, 5")]
pub r#type: ::core::option::Option<actor::Type>,
}
/// Nested message and enum types in `Actor`.
pub mod actor {
/// The type of actor.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
/// An end user.
#[prost(message, tag = "1")]
User(super::User),
/// An anonymous user.
#[prost(message, tag = "2")]
Anonymous(super::AnonymousUser),
/// An account acting on behalf of another.
#[prost(message, tag = "3")]
Impersonation(super::Impersonation),
/// A non-user actor (i.e. system triggered).
#[prost(message, tag = "4")]
System(super::SystemEvent),
/// An administrator.
#[prost(message, tag = "5")]
Administrator(super::Administrator),
}
}
/// Information about an end user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
/// The type of user, such as known, unknown, and deleted.
#[prost(oneof = "user::Type", tags = "2, 3, 4")]
pub r#type: ::core::option::Option<user::Type>,
}
/// Nested message and enum types in `User`.
pub mod user {
/// A known user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KnownUser {
/// The identifier for this user that can be used with the People API to get
/// more information. The format is `people/ACCOUNT_ID`. See
/// <https://developers.google.com/people/.>
#[prost(string, tag = "1")]
pub person_name: ::prost::alloc::string::String,
/// True if this is the user making the request.
#[prost(bool, tag = "2")]
pub is_current_user: bool,
}
/// A user whose account has since been deleted.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeletedUser {}
/// A user about whom nothing is currently known.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UnknownUser {}
/// The type of user, such as known, unknown, and deleted.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
/// A known user.
#[prost(message, tag = "2")]
KnownUser(KnownUser),
/// A user whose account has since been deleted.
#[prost(message, tag = "3")]
DeletedUser(DeletedUser),
/// A user about whom nothing is currently known.
#[prost(message, tag = "4")]
UnknownUser(UnknownUser),
}
}
/// Empty message representing an anonymous user or indicating the authenticated
/// user should be anonymized.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AnonymousUser {}
/// Information about an impersonation, where an admin acts on behalf of an end
/// user. Information about the acting admin is not currently available.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Impersonation {
/// The impersonated user.
#[prost(message, optional, tag = "1")]
pub impersonated_user: ::core::option::Option<User>,
}
/// Event triggered by system operations instead of end users.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SystemEvent {
/// The type of the system event that may triggered activity.
#[prost(enumeration = "system_event::Type", tag = "1")]
pub r#type: i32,
}
/// Nested message and enum types in `SystemEvent`.
pub mod system_event {
/// The types of system events that may trigger activity.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// The event type is unspecified.
Unspecified = 0,
/// The event is a consequence of a user account being deleted.
UserDeletion = 1,
/// The event is due to the system automatically purging trash.
TrashAutoPurge = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::UserDeletion => "USER_DELETION",
Type::TrashAutoPurge => "TRASH_AUTO_PURGE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"USER_DELETION" => Some(Self::UserDeletion),
"TRASH_AUTO_PURGE" => Some(Self::TrashAutoPurge),
_ => None,
}
}
}
}
/// Empty message representing an administrator.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Administrator {}
/// Information about time ranges.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeRange {
/// The start of the time range.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// The end of the time range.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Information about a group.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Group {
/// The email address of the group.
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
/// The title of the group.
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
}
/// Information about a domain.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Domain {
/// The name of the domain, e.g. `google.com`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// An opaque string used to identify this domain.
#[prost(string, tag = "3")]
pub legacy_id: ::prost::alloc::string::String,
}
/// Information about the target of activity.
///
/// For more information on how activity history is shared with users, see
/// [Activity history
/// visibility](<https://developers.google.com/drive/activity/v2#activityhistory>).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Target {
/// This field is deprecated; please use the `drive` field instead.
#[deprecated]
#[prost(message, optional, tag = "2")]
pub team_drive: ::core::option::Option<TeamDrive>,
/// The type of target object.
#[prost(oneof = "target::Object", tags = "1, 5, 3")]
pub object: ::core::option::Option<target::Object>,
}
/// Nested message and enum types in `Target`.
pub mod target {
/// The type of target object.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Object {
/// The target is a Drive item.
#[prost(message, tag = "1")]
DriveItem(super::DriveItem),
/// The target is a shared drive.
#[prost(message, tag = "5")]
Drive(super::Drive),
/// The target is a comment on a Drive file.
#[prost(message, tag = "3")]
FileComment(super::FileComment),
}
}
/// A lightweight reference to the target of activity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetReference {
/// This field is deprecated; please use the `drive` field instead.
#[deprecated]
#[prost(message, optional, tag = "2")]
pub team_drive: ::core::option::Option<TeamDriveReference>,
/// The type of target object.
#[prost(oneof = "target_reference::Object", tags = "1, 3")]
pub object: ::core::option::Option<target_reference::Object>,
}
/// Nested message and enum types in `TargetReference`.
pub mod target_reference {
/// The type of target object.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Object {
/// The target is a Drive item.
#[prost(message, tag = "1")]
DriveItem(super::DriveItemReference),
/// The target is a shared drive.
#[prost(message, tag = "3")]
Drive(super::DriveReference),
}
}
/// A comment on a file.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileComment {
/// The comment in the discussion thread. This identifier is an opaque string
/// compatible with the Drive API; see
/// <https://developers.google.com/drive/v3/reference/comments/get>
#[prost(string, tag = "1")]
pub legacy_comment_id: ::prost::alloc::string::String,
/// The discussion thread to which the comment was added. This identifier is an
/// opaque string compatible with the Drive API and references the first
/// comment in a discussion; see
/// <https://developers.google.com/drive/v3/reference/comments/get>
#[prost(string, tag = "2")]
pub legacy_discussion_id: ::prost::alloc::string::String,
/// The link to the discussion thread containing this comment, for example,
/// `<https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`.>
#[prost(string, tag = "3")]
pub link_to_discussion: ::prost::alloc::string::String,
/// The Drive item containing this comment.
#[prost(message, optional, tag = "4")]
pub parent: ::core::option::Option<DriveItem>,
}
/// A Drive item, such as a file or folder.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DriveItem {
/// The target Drive item. The format is `items/ITEM_ID`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The title of the Drive item.
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
/// This field is deprecated; please use the `driveFile` field instead.
#[deprecated]
#[prost(message, optional, tag = "3")]
pub file: ::core::option::Option<drive_item::File>,
/// This field is deprecated; please use the `driveFolder` field instead.
#[deprecated]
#[prost(message, optional, tag = "4")]
pub folder: ::core::option::Option<drive_item::Folder>,
/// The MIME type of the Drive item. See
/// <https://developers.google.com/drive/v3/web/mime-types.>
#[prost(string, tag = "6")]
pub mime_type: ::prost::alloc::string::String,
/// Information about the owner of this Drive item.
#[prost(message, optional, tag = "7")]
pub owner: ::core::option::Option<Owner>,
/// If present, this describes the type of the Drive item.
#[prost(oneof = "drive_item::ItemType", tags = "8, 9")]
pub item_type: ::core::option::Option<drive_item::ItemType>,
}
/// Nested message and enum types in `DriveItem`.
pub mod drive_item {
/// This item is deprecated; please see `DriveFile` instead.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct File {}
/// This item is deprecated; please see `DriveFolder` instead.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Folder {
/// This field is deprecated; please see `DriveFolder.type` instead.
#[prost(enumeration = "folder::Type", tag = "6")]
pub r#type: i32,
}
/// Nested message and enum types in `Folder`.
pub mod folder {
/// This item is deprecated; please see `DriveFolder.Type` instead.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// This item is deprecated; please see `DriveFolder.Type` instead.
Unspecified = 0,
/// This item is deprecated; please see `DriveFolder.Type` instead.
MyDriveRoot = 1,
/// This item is deprecated; please see `DriveFolder.Type` instead.
TeamDriveRoot = 2,
/// This item is deprecated; please see `DriveFolder.Type` instead.
StandardFolder = 3,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::MyDriveRoot => "MY_DRIVE_ROOT",
Type::TeamDriveRoot => "TEAM_DRIVE_ROOT",
Type::StandardFolder => "STANDARD_FOLDER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MY_DRIVE_ROOT" => Some(Self::MyDriveRoot),
"TEAM_DRIVE_ROOT" => Some(Self::TeamDriveRoot),
"STANDARD_FOLDER" => Some(Self::StandardFolder),
_ => None,
}
}
}
}
/// A Drive item which is a file.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DriveFile {}
/// A Drive item which is a folder.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DriveFolder {
/// The type of Drive folder.
#[prost(enumeration = "drive_folder::Type", tag = "6")]
pub r#type: i32,
}
/// Nested message and enum types in `DriveFolder`.
pub mod drive_folder {
/// The type of a Drive folder.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// The folder type is unknown.
Unspecified = 0,
/// The folder is the root of a user's MyDrive.
MyDriveRoot = 1,
/// The folder is the root of a shared drive.
SharedDriveRoot = 2,
/// The folder is a standard, non-root, folder.
StandardFolder = 3,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::MyDriveRoot => "MY_DRIVE_ROOT",
Type::SharedDriveRoot => "SHARED_DRIVE_ROOT",
Type::StandardFolder => "STANDARD_FOLDER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MY_DRIVE_ROOT" => Some(Self::MyDriveRoot),
"SHARED_DRIVE_ROOT" => Some(Self::SharedDriveRoot),
"STANDARD_FOLDER" => Some(Self::StandardFolder),
_ => None,
}
}
}
}
/// If present, this describes the type of the Drive item.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum ItemType {
/// The Drive item is a file.
#[prost(message, tag = "8")]
DriveFile(DriveFile),
/// The Drive item is a folder. Includes information about the type of
/// folder.
#[prost(message, tag = "9")]
DriveFolder(DriveFolder),
}
}
/// Information about the owner of a Drive item.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Owner {
/// This field is deprecated; please use the `drive` field instead.
#[deprecated]
#[prost(message, optional, tag = "2")]
pub team_drive: ::core::option::Option<TeamDriveReference>,
/// The domain of the Drive item owner.
#[prost(message, optional, tag = "3")]
pub domain: ::core::option::Option<Domain>,
/// The owner of the Drive item.
#[prost(oneof = "owner::Owner", tags = "1, 4")]
pub owner: ::core::option::Option<owner::Owner>,
}
/// Nested message and enum types in `Owner`.
pub mod owner {
/// The owner of the Drive item.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Owner {
/// The user that owns the Drive item.
#[prost(message, tag = "1")]
User(super::User),
/// The drive that owns the item.
#[prost(message, tag = "4")]
Drive(super::DriveReference),
}
}
/// This item is deprecated; please see `Drive` instead.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TeamDrive {
/// This field is deprecated; please see `Drive.name` instead.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// This field is deprecated; please see `Drive.title` instead.
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
/// This field is deprecated; please see `Drive.root` instead.
#[prost(message, optional, tag = "3")]
pub root: ::core::option::Option<DriveItem>,
}
/// Information about a shared drive.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Drive {
/// The resource name of the shared drive. The format is
/// `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection
/// ID for this resource name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The title of the shared drive.
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
/// The root of this shared drive.
#[prost(message, optional, tag = "3")]
pub root: ::core::option::Option<DriveItem>,
}
/// A lightweight reference to a Drive item, such as a file or folder.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DriveItemReference {
/// The target Drive item. The format is `items/ITEM_ID`.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The title of the Drive item.
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
/// This field is deprecated; please use the `driveFile` field instead.
#[deprecated]
#[prost(message, optional, tag = "3")]
pub file: ::core::option::Option<drive_item::File>,
/// This field is deprecated; please use the `driveFolder` field instead.
#[deprecated]
#[prost(message, optional, tag = "4")]
pub folder: ::core::option::Option<drive_item::Folder>,
/// If present, this describes the type of the Drive item.
#[prost(oneof = "drive_item_reference::ItemType", tags = "8, 9")]
pub item_type: ::core::option::Option<drive_item_reference::ItemType>,
}
/// Nested message and enum types in `DriveItemReference`.
pub mod drive_item_reference {
/// If present, this describes the type of the Drive item.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum ItemType {
/// The Drive item is a file.
#[prost(message, tag = "8")]
DriveFile(super::drive_item::DriveFile),
/// The Drive item is a folder. Includes information about the type of
/// folder.
#[prost(message, tag = "9")]
DriveFolder(super::drive_item::DriveFolder),
}
}
/// This item is deprecated; please see `DriveReference` instead.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TeamDriveReference {
/// This field is deprecated; please see `DriveReference.name` instead.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// This field is deprecated; please see `DriveReference.title` instead.
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
}
/// A lightweight reference to a shared drive.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DriveReference {
/// The resource name of the shared drive. The format is
/// `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection
/// ID for this resource name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The title of the shared drive.
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
}
/// Information about the action.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
/// The type and detailed information about the action.
#[prost(message, optional, tag = "1")]
pub detail: ::core::option::Option<ActionDetail>,
/// The actor responsible for this action (or empty if all actors are
/// responsible).
#[prost(message, optional, tag = "3")]
pub actor: ::core::option::Option<Actor>,
/// The target this action affects (or empty if affecting all targets). This
/// represents the state of the target immediately after this action occurred.
#[prost(message, optional, tag = "4")]
pub target: ::core::option::Option<Target>,
/// When the action occurred (or empty if same time as entire activity).
#[prost(oneof = "action::Time", tags = "5, 6")]
pub time: ::core::option::Option<action::Time>,
}
/// Nested message and enum types in `Action`.
pub mod action {
/// When the action occurred (or empty if same time as entire activity).
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Time {
/// The action occurred at this specific time.
#[prost(message, tag = "5")]
Timestamp(::prost_types::Timestamp),
/// The action occurred over this time range.
#[prost(message, tag = "6")]
TimeRange(super::TimeRange),
}
}
/// Data describing the type and additional information of an action.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActionDetail {
/// Data describing the type and additional information of an action.
#[prost(
oneof = "action_detail::ActionDetail",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 19"
)]
pub action_detail: ::core::option::Option<action_detail::ActionDetail>,
}
/// Nested message and enum types in `ActionDetail`.
pub mod action_detail {
/// Data describing the type and additional information of an action.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ActionDetail {
/// An object was created.
#[prost(message, tag = "1")]
Create(super::Create),
/// An object was edited.
#[prost(message, tag = "2")]
Edit(super::Edit),
/// An object was moved.
#[prost(message, tag = "3")]
Move(super::Move),
/// An object was renamed.
#[prost(message, tag = "4")]
Rename(super::Rename),
/// An object was deleted.
#[prost(message, tag = "5")]
Delete(super::Delete),
/// A deleted object was restored.
#[prost(message, tag = "6")]
Restore(super::Restore),
/// The permission on an object was changed.
#[prost(message, tag = "7")]
PermissionChange(super::PermissionChange),
/// A change about comments was made.
#[prost(message, tag = "8")]
Comment(super::Comment),
/// A change happened in data leak prevention status.
#[prost(message, tag = "9")]
DlpChange(super::DataLeakPreventionChange),
/// An object was referenced in an application outside of Drive/Docs.
#[prost(message, tag = "12")]
Reference(super::ApplicationReference),
/// Settings were changed.
#[prost(message, tag = "13")]
SettingsChange(super::SettingsChange),
/// Label was changed.
#[prost(message, tag = "19")]
AppliedLabelChange(super::AppliedLabelChange),
}
}
/// An object was created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Create {
/// The origin of the new object.
#[prost(oneof = "create::Origin", tags = "1, 2, 3")]
pub origin: ::core::option::Option<create::Origin>,
}
/// Nested message and enum types in `Create`.
pub mod create {
/// An object was created from scratch.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct New {}
/// An object was uploaded into Drive.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Upload {}
/// An object was created by copying an existing object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Copy {
/// The original object.
#[prost(message, optional, tag = "1")]
pub original_object: ::core::option::Option<super::TargetReference>,
}
/// The origin of the new object.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Origin {
/// If present, indicates the object was newly created (e.g. as a blank
/// document), not derived from a Drive object or external object.
#[prost(message, tag = "1")]
New(New),
/// If present, indicates the object originated externally and was uploaded
/// to Drive.
#[prost(message, tag = "2")]
Upload(Upload),
/// If present, indicates the object was created by copying an existing Drive
/// object.
#[prost(message, tag = "3")]
Copy(Copy),
}
}
/// An empty message indicating an object was edited.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Edit {}
/// An object was moved.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Move {
/// The added parent object(s).
#[prost(message, repeated, tag = "1")]
pub added_parents: ::prost::alloc::vec::Vec<TargetReference>,
/// The removed parent object(s).
#[prost(message, repeated, tag = "2")]
pub removed_parents: ::prost::alloc::vec::Vec<TargetReference>,
}
/// An object was renamed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Rename {
/// The previous title of the drive object.
#[prost(string, tag = "1")]
pub old_title: ::prost::alloc::string::String,
/// The new title of the drive object.
#[prost(string, tag = "2")]
pub new_title: ::prost::alloc::string::String,
}
/// An object was deleted.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Delete {
/// The type of delete action taken.
#[prost(enumeration = "delete::Type", tag = "1")]
pub r#type: i32,
}
/// Nested message and enum types in `Delete`.
pub mod delete {
/// The type of deletion.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Deletion type is not available.
Unspecified = 0,
/// An object was put into the trash.
Trash = 1,
/// An object was deleted permanently.
PermanentDelete = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Trash => "TRASH",
Type::PermanentDelete => "PERMANENT_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 {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TRASH" => Some(Self::Trash),
"PERMANENT_DELETE" => Some(Self::PermanentDelete),
_ => None,
}
}
}
}
/// A deleted object was restored.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Restore {
/// The type of restore action taken.
#[prost(enumeration = "restore::Type", tag = "1")]
pub r#type: i32,
}
/// Nested message and enum types in `Restore`.
pub mod restore {
/// The type of restoration.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// The type is not available.
Unspecified = 0,
/// An object was restored from the trash.
Untrash = 1,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Untrash => "UNTRASH",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"UNTRASH" => Some(Self::Untrash),
_ => None,
}
}
}
}
/// A change of the permission setting on an item.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PermissionChange {
/// The set of permissions added by this change.
#[prost(message, repeated, tag = "1")]
pub added_permissions: ::prost::alloc::vec::Vec<Permission>,
/// The set of permissions removed by this change.
#[prost(message, repeated, tag = "2")]
pub removed_permissions: ::prost::alloc::vec::Vec<Permission>,
}
/// The permission setting of an object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Permission {
/// Indicates the
/// [Google Drive permissions
/// role](<https://developers.google.com/drive/web/manage-sharing#roles>). The
/// role determines a user's ability to read, write, and comment on items.
#[prost(enumeration = "permission::Role", tag = "1")]
pub role: i32,
/// If true, the item can be discovered (e.g. in the user's "Shared with me"
/// collection) without needing a link to the item.
#[prost(bool, tag = "6")]
pub allow_discovery: bool,
/// The entity granted the role.
#[prost(oneof = "permission::Scope", tags = "2, 3, 4, 5")]
pub scope: ::core::option::Option<permission::Scope>,
}
/// Nested message and enum types in `Permission`.
pub mod permission {
/// Represents any user (including a logged out user).
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Anyone {}
/// The [Google Drive permissions
/// roles](<https://developers.google.com/drive/web/manage-sharing#roles>).
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Role {
/// The role is not available.
Unspecified = 0,
/// A role granting full access.
Owner = 1,
/// A role granting the ability to manage people and settings.
Organizer = 2,
/// A role granting the ability to contribute and manage content.
FileOrganizer = 3,
/// A role granting the ability to contribute content. This role is sometimes
/// also known as "writer".
Editor = 4,
/// A role granting the ability to view and comment on content.
Commenter = 5,
/// A role granting the ability to view content. This role is sometimes also
/// known as "reader".
Viewer = 6,
/// A role granting the ability to view content only after it has been
/// published to the web. This role is sometimes also known as "published
/// reader". See <https://support.google.com/sites/answer/6372880> for more
/// information.
PublishedViewer = 7,
}
impl Role {
/// 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 {
Role::Unspecified => "ROLE_UNSPECIFIED",
Role::Owner => "OWNER",
Role::Organizer => "ORGANIZER",
Role::FileOrganizer => "FILE_ORGANIZER",
Role::Editor => "EDITOR",
Role::Commenter => "COMMENTER",
Role::Viewer => "VIEWER",
Role::PublishedViewer => "PUBLISHED_VIEWER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ROLE_UNSPECIFIED" => Some(Self::Unspecified),
"OWNER" => Some(Self::Owner),
"ORGANIZER" => Some(Self::Organizer),
"FILE_ORGANIZER" => Some(Self::FileOrganizer),
"EDITOR" => Some(Self::Editor),
"COMMENTER" => Some(Self::Commenter),
"VIEWER" => Some(Self::Viewer),
"PUBLISHED_VIEWER" => Some(Self::PublishedViewer),
_ => None,
}
}
}
/// The entity granted the role.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Scope {
/// The user to whom this permission applies.
#[prost(message, tag = "2")]
User(super::User),
/// The group to whom this permission applies.
#[prost(message, tag = "3")]
Group(super::Group),
/// The domain to whom this permission applies.
#[prost(message, tag = "4")]
Domain(super::Domain),
/// If set, this permission applies to anyone, even logged out users.
#[prost(message, tag = "5")]
Anyone(Anyone),
}
}
/// A change about comments on an object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Comment {
/// Users who are mentioned in this comment.
#[prost(message, repeated, tag = "7")]
pub mentioned_users: ::prost::alloc::vec::Vec<User>,
/// The type of changed comment.
#[prost(oneof = "comment::Type", tags = "1, 2, 3")]
pub r#type: ::core::option::Option<comment::Type>,
}
/// Nested message and enum types in `Comment`.
pub mod comment {
/// A regular posted comment.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Post {
/// The sub-type of this event.
#[prost(enumeration = "post::Subtype", tag = "1")]
pub subtype: i32,
}
/// Nested message and enum types in `Post`.
pub mod post {
/// More detailed information about the change.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Subtype {
/// Subtype not available.
Unspecified = 0,
/// A post was added.
Added = 1,
/// A post was deleted.
Deleted = 2,
/// A reply was added.
ReplyAdded = 3,
/// A reply was deleted.
ReplyDeleted = 4,
/// A posted comment was resolved.
Resolved = 5,
/// A posted comment was reopened.
Reopened = 6,
}
impl Subtype {
/// 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 {
Subtype::Unspecified => "SUBTYPE_UNSPECIFIED",
Subtype::Added => "ADDED",
Subtype::Deleted => "DELETED",
Subtype::ReplyAdded => "REPLY_ADDED",
Subtype::ReplyDeleted => "REPLY_DELETED",
Subtype::Resolved => "RESOLVED",
Subtype::Reopened => "REOPENED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUBTYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADDED" => Some(Self::Added),
"DELETED" => Some(Self::Deleted),
"REPLY_ADDED" => Some(Self::ReplyAdded),
"REPLY_DELETED" => Some(Self::ReplyDeleted),
"RESOLVED" => Some(Self::Resolved),
"REOPENED" => Some(Self::Reopened),
_ => None,
}
}
}
}
/// A comment with an assignment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Assignment {
/// The sub-type of this event.
#[prost(enumeration = "assignment::Subtype", tag = "1")]
pub subtype: i32,
/// The user to whom the comment was assigned.
#[prost(message, optional, tag = "7")]
pub assigned_user: ::core::option::Option<super::User>,
}
/// Nested message and enum types in `Assignment`.
pub mod assignment {
/// More detailed information about the change.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Subtype {
/// Subtype not available.
Unspecified = 0,
/// An assignment was added.
Added = 1,
/// An assignment was deleted.
Deleted = 2,
/// An assignment reply was added.
ReplyAdded = 3,
/// An assignment reply was deleted.
ReplyDeleted = 4,
/// An assignment was resolved.
Resolved = 5,
/// A resolved assignment was reopened.
Reopened = 6,
/// An assignment was reassigned.
Reassigned = 7,
}
impl Subtype {
/// 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 {
Subtype::Unspecified => "SUBTYPE_UNSPECIFIED",
Subtype::Added => "ADDED",
Subtype::Deleted => "DELETED",
Subtype::ReplyAdded => "REPLY_ADDED",
Subtype::ReplyDeleted => "REPLY_DELETED",
Subtype::Resolved => "RESOLVED",
Subtype::Reopened => "REOPENED",
Subtype::Reassigned => "REASSIGNED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUBTYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADDED" => Some(Self::Added),
"DELETED" => Some(Self::Deleted),
"REPLY_ADDED" => Some(Self::ReplyAdded),
"REPLY_DELETED" => Some(Self::ReplyDeleted),
"RESOLVED" => Some(Self::Resolved),
"REOPENED" => Some(Self::Reopened),
"REASSIGNED" => Some(Self::Reassigned),
_ => None,
}
}
}
}
/// A suggestion.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Suggestion {
/// The sub-type of this event.
#[prost(enumeration = "suggestion::Subtype", tag = "1")]
pub subtype: i32,
}
/// Nested message and enum types in `Suggestion`.
pub mod suggestion {
/// More detailed information about the change.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Subtype {
/// Subtype not available.
Unspecified = 0,
/// A suggestion was added.
Added = 1,
/// A suggestion was deleted.
Deleted = 2,
/// A suggestion reply was added.
ReplyAdded = 3,
/// A suggestion reply was deleted.
ReplyDeleted = 4,
/// A suggestion was accepted.
Accepted = 7,
/// A suggestion was rejected.
Rejected = 8,
/// An accepted suggestion was deleted.
AcceptDeleted = 9,
/// A rejected suggestion was deleted.
RejectDeleted = 10,
}
impl Subtype {
/// 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 {
Subtype::Unspecified => "SUBTYPE_UNSPECIFIED",
Subtype::Added => "ADDED",
Subtype::Deleted => "DELETED",
Subtype::ReplyAdded => "REPLY_ADDED",
Subtype::ReplyDeleted => "REPLY_DELETED",
Subtype::Accepted => "ACCEPTED",
Subtype::Rejected => "REJECTED",
Subtype::AcceptDeleted => "ACCEPT_DELETED",
Subtype::RejectDeleted => "REJECT_DELETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUBTYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADDED" => Some(Self::Added),
"DELETED" => Some(Self::Deleted),
"REPLY_ADDED" => Some(Self::ReplyAdded),
"REPLY_DELETED" => Some(Self::ReplyDeleted),
"ACCEPTED" => Some(Self::Accepted),
"REJECTED" => Some(Self::Rejected),
"ACCEPT_DELETED" => Some(Self::AcceptDeleted),
"REJECT_DELETED" => Some(Self::RejectDeleted),
_ => None,
}
}
}
}
/// The type of changed comment.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
/// A change on a regular posted comment.
#[prost(message, tag = "1")]
Post(Post),
/// A change on an assignment.
#[prost(message, tag = "2")]
Assignment(Assignment),
/// A change on a suggestion.
#[prost(message, tag = "3")]
Suggestion(Suggestion),
}
}
/// A change in the object's data leak prevention status.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DataLeakPreventionChange {
/// The type of Data Leak Prevention (DLP) change.
#[prost(enumeration = "data_leak_prevention_change::Type", tag = "1")]
pub r#type: i32,
}
/// Nested message and enum types in `DataLeakPreventionChange`.
pub mod data_leak_prevention_change {
/// The type of the change.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// An update to the DLP state that is neither FLAGGED or CLEARED.
Unspecified = 0,
/// Document has been flagged as containing sensitive content.
Flagged = 1,
/// Document is no longer flagged as containing sensitive content.
Cleared = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Flagged => "FLAGGED",
Type::Cleared => "CLEARED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FLAGGED" => Some(Self::Flagged),
"CLEARED" => Some(Self::Cleared),
_ => None,
}
}
}
}
/// Activity in applications other than Drive.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ApplicationReference {
/// The reference type corresponding to this event.
#[prost(enumeration = "application_reference::Type", tag = "1")]
pub r#type: i32,
}
/// Nested message and enum types in `ApplicationReference`.
pub mod application_reference {
/// The type of the action.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// The type is not available.
UnspecifiedReferenceType = 0,
/// The links of one or more Drive items were posted.
Link = 1,
/// Comments were made regarding a Drive item.
Discuss = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::UnspecifiedReferenceType => "UNSPECIFIED_REFERENCE_TYPE",
Type::Link => "LINK",
Type::Discuss => "DISCUSS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED_REFERENCE_TYPE" => Some(Self::UnspecifiedReferenceType),
"LINK" => Some(Self::Link),
"DISCUSS" => Some(Self::Discuss),
_ => None,
}
}
}
}
/// Information about settings changes.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingsChange {
/// The set of changes made to restrictions.
#[prost(message, repeated, tag = "1")]
pub restriction_changes: ::prost::alloc::vec::Vec<
settings_change::RestrictionChange,
>,
}
/// Nested message and enum types in `SettingsChange`.
pub mod settings_change {
/// Information about restriction policy changes to a feature.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RestrictionChange {
/// The feature which had a change in restriction policy.
#[prost(enumeration = "restriction_change::Feature", tag = "1")]
pub feature: i32,
/// The restriction in place after the change.
#[prost(enumeration = "restriction_change::Restriction", tag = "2")]
pub new_restriction: i32,
}
/// Nested message and enum types in `RestrictionChange`.
pub mod restriction_change {
/// The feature which had changes to its restriction policy.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Feature {
/// The feature which changed restriction settings was not available.
Unspecified = 0,
/// When restricted, this prevents items from being shared outside the
/// domain.
SharingOutsideDomain = 1,
/// When restricted, this prevents direct sharing of individual items.
DirectSharing = 2,
/// When restricted, this prevents actions like copy, download, and print
/// that might result in uncontrolled duplicates of items.
ItemDuplication = 3,
/// When restricted, this prevents use of Drive File Stream.
DriveFileStream = 4,
/// When restricted, this limits sharing of folders to managers only.
FileOrganizerCanShareFolders = 5,
}
impl Feature {
/// 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 {
Feature::Unspecified => "FEATURE_UNSPECIFIED",
Feature::SharingOutsideDomain => "SHARING_OUTSIDE_DOMAIN",
Feature::DirectSharing => "DIRECT_SHARING",
Feature::ItemDuplication => "ITEM_DUPLICATION",
Feature::DriveFileStream => "DRIVE_FILE_STREAM",
Feature::FileOrganizerCanShareFolders => {
"FILE_ORGANIZER_CAN_SHARE_FOLDERS"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FEATURE_UNSPECIFIED" => Some(Self::Unspecified),
"SHARING_OUTSIDE_DOMAIN" => Some(Self::SharingOutsideDomain),
"DIRECT_SHARING" => Some(Self::DirectSharing),
"ITEM_DUPLICATION" => Some(Self::ItemDuplication),
"DRIVE_FILE_STREAM" => Some(Self::DriveFileStream),
"FILE_ORGANIZER_CAN_SHARE_FOLDERS" => {
Some(Self::FileOrganizerCanShareFolders)
}
_ => None,
}
}
}
/// The restriction applicable to a feature.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Restriction {
/// The type of restriction is not available.
Unspecified = 0,
/// The feature is available without restriction.
Unrestricted = 1,
/// The use of this feature is fully restricted.
FullyRestricted = 2,
}
impl Restriction {
/// 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 {
Restriction::Unspecified => "RESTRICTION_UNSPECIFIED",
Restriction::Unrestricted => "UNRESTRICTED",
Restriction::FullyRestricted => "FULLY_RESTRICTED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESTRICTION_UNSPECIFIED" => Some(Self::Unspecified),
"UNRESTRICTED" => Some(Self::Unrestricted),
"FULLY_RESTRICTED" => Some(Self::FullyRestricted),
_ => None,
}
}
}
}
}
/// Label changes that were made on the Target.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppliedLabelChange {
/// Changes that were made to the Label on the Target.
#[prost(message, repeated, tag = "1")]
pub changes: ::prost::alloc::vec::Vec<
applied_label_change::AppliedLabelChangeDetail,
>,
}
/// Nested message and enum types in `AppliedLabelChange`.
pub mod applied_label_change {
/// A change made to a Label on the Target.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppliedLabelChangeDetail {
/// The Label name representing the Label that changed.
/// This name always contains the revision of the Label that was used
/// when this Action occurred. The format is
/// `labels/id@revision`.
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
/// The types of changes made to the Label on the Target.
#[prost(enumeration = "applied_label_change_detail::Type", repeated, tag = "2")]
pub types: ::prost::alloc::vec::Vec<i32>,
/// The human-readable title of the label that changed.
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
/// Field Changes. Only present if `types` contains
/// `LABEL_FIELD_VALUE_CHANGED`.
#[prost(message, repeated, tag = "4")]
pub field_changes: ::prost::alloc::vec::Vec<
applied_label_change_detail::FieldValueChange,
>,
}
/// Nested message and enum types in `AppliedLabelChangeDetail`.
pub mod applied_label_change_detail {
/// Change to a Field value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldValueChange {
/// The ID of this field. Field IDs are unique within a Label.
#[prost(string, optional, tag = "1")]
pub field_id: ::core::option::Option<::prost::alloc::string::String>,
/// The value that was previously set on the field. If not present,
/// the field was newly set. At least one of {old_value|new_value} is
/// always set.
#[prost(message, optional, tag = "2")]
pub old_value: ::core::option::Option<field_value_change::FieldValue>,
/// The value that is now set on the field. If not present, the field was
/// cleared. At least one of {old_value|new_value} is always set.
#[prost(message, optional, tag = "3")]
pub new_value: ::core::option::Option<field_value_change::FieldValue>,
/// The human-readable display name for this field.
#[prost(string, optional, tag = "4")]
pub display_name: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `FieldValueChange`.
pub mod field_value_change {
/// Contains a value of a Field.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldValue {
/// Field values for all Field types.
#[prost(oneof = "field_value::Value", tags = "1, 3, 4, 5, 6, 7, 8, 9")]
pub value: ::core::option::Option<field_value::Value>,
}
/// Nested message and enum types in `FieldValue`.
pub mod field_value {
/// Wrapper for Text Field value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Text {
/// Value of Text Field.
#[prost(string, optional, tag = "1")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
}
/// Wrapper for Text List Field value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextList {
/// Text values.
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<Text>,
}
/// Wrapper for Selection Field value as combined value/display_name
/// pair for selected choice.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Selection {
/// Selection value as Field Choice ID.
#[prost(string, optional, tag = "1")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
/// Selection value as human-readable display string.
#[prost(string, optional, tag = "2")]
pub display_name: ::core::option::Option<
::prost::alloc::string::String,
>,
}
/// Wrapper for SelectionList Field value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SelectionList {
/// Selection values.
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<Selection>,
}
/// Wrapper for Integer Field value.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Integer {
/// Integer value.
#[prost(int64, optional, tag = "1")]
pub value: ::core::option::Option<i64>,
}
/// Wrapper for User Field value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleUser {
/// User value as email.
#[prost(string, optional, tag = "1")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
}
/// Wrapper for UserList Field value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserList {
/// User values.
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<SingleUser>,
}
/// Wrapper for Date Field value.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Date {
/// Date value.
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<::prost_types::Timestamp>,
}
/// Field values for all Field types.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
/// Text Field value.
#[prost(message, tag = "1")]
Text(Text),
/// Text List Field value.
#[prost(message, tag = "3")]
TextList(TextList),
/// Selection Field value.
#[prost(message, tag = "4")]
Selection(Selection),
/// Selection List Field value.
#[prost(message, tag = "5")]
SelectionList(SelectionList),
/// Integer Field value.
#[prost(message, tag = "6")]
Integer(Integer),
/// User Field value.
#[prost(message, tag = "7")]
User(SingleUser),
/// User List Field value.
#[prost(message, tag = "8")]
UserList(UserList),
/// Date Field value.
#[prost(message, tag = "9")]
Date(Date),
}
}
}
/// The type of Label change
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// The type of change to this Label is not available.
Unspecified = 0,
/// The identified Label was added to the Target.
LabelAdded = 1,
/// The identified Label was removed from the Target.
LabelRemoved = 2,
/// Field values were changed on the Target.
LabelFieldValueChanged = 3,
/// The Label was applied as a side-effect of Drive item creation.
LabelAppliedByItemCreate = 4,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::LabelAdded => "LABEL_ADDED",
Type::LabelRemoved => "LABEL_REMOVED",
Type::LabelFieldValueChanged => "LABEL_FIELD_VALUE_CHANGED",
Type::LabelAppliedByItemCreate => "LABEL_APPLIED_BY_ITEM_CREATE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"LABEL_ADDED" => Some(Self::LabelAdded),
"LABEL_REMOVED" => Some(Self::LabelRemoved),
"LABEL_FIELD_VALUE_CHANGED" => Some(Self::LabelFieldValueChanged),
"LABEL_APPLIED_BY_ITEM_CREATE" => {
Some(Self::LabelAppliedByItemCreate)
}
_ => None,
}
}
}
}
}
/// Response message for querying Drive activity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryDriveActivityResponse {
/// List of activity requested.
#[prost(message, repeated, tag = "1")]
pub activities: ::prost::alloc::vec::Vec<DriveActivity>,
/// Token to retrieve the next page of results, or
/// empty if there are no more results in the list.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// A single Drive activity comprising one or more Actions by one or more
/// Actors on one or more Targets. Some Action groupings occur spontaneously,
/// such as moving an item into a shared folder triggering a permission change.
/// Other groupings of related Actions, such as multiple Actors editing one item
/// or moving multiple files into a new folder, are controlled by the selection
/// of a ConsolidationStrategy in the QueryDriveActivityRequest.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DriveActivity {
/// Key information about the primary action for this activity. This is either
/// representative, or the most important, of all actions in the activity,
/// according to the ConsolidationStrategy in the request.
#[prost(message, optional, tag = "2")]
pub primary_action_detail: ::core::option::Option<ActionDetail>,
/// All actor(s) responsible for the activity.
#[prost(message, repeated, tag = "3")]
pub actors: ::prost::alloc::vec::Vec<Actor>,
/// Details on all actions in this activity.
#[prost(message, repeated, tag = "4")]
pub actions: ::prost::alloc::vec::Vec<Action>,
/// All Google Drive objects this activity is about (e.g. file, folder, drive).
/// This represents the state of the target immediately after the actions
/// occurred.
#[prost(message, repeated, tag = "5")]
pub targets: ::prost::alloc::vec::Vec<Target>,
/// The period of time when this activity occurred.
#[prost(oneof = "drive_activity::Time", tags = "6, 7")]
pub time: ::core::option::Option<drive_activity::Time>,
}
/// Nested message and enum types in `DriveActivity`.
pub mod drive_activity {
/// The period of time when this activity occurred.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Time {
/// The activity occurred at this specific time.
#[prost(message, tag = "6")]
Timestamp(::prost_types::Timestamp),
/// The activity occurred over this time range.
#[prost(message, tag = "7")]
TimeRange(super::TimeRange),
}
}
/// Generated client implementations.
pub mod drive_activity_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service for querying activity on Drive items. Activity is user
/// or system action on Drive items that happened in the past. A Drive item can
/// be a file or folder, or a Team Drive.
#[derive(Debug, Clone)]
pub struct DriveActivityServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DriveActivityServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DriveActivityServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DriveActivityServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Query past activity in Google Drive.
pub async fn query_drive_activity(
&mut self,
request: impl tonic::IntoRequest<super::QueryDriveActivityRequest>,
) -> std::result::Result<
tonic::Response<super::QueryDriveActivityResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.apps.drive.activity.v2.DriveActivityService/QueryDriveActivity",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.apps.drive.activity.v2.DriveActivityService",
"QueryDriveActivity",
),
);
self.inner.unary(req, path, codec).await
}
}
}