#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct User {
pub id: std::option::Option<std::string::String>,
pub username: std::option::Option<std::string::String>,
pub email_address: std::option::Option<std::string::String>,
pub given_name: std::option::Option<std::string::String>,
pub surname: std::option::Option<std::string::String>,
pub organization_id: std::option::Option<std::string::String>,
pub root_folder_id: std::option::Option<std::string::String>,
pub recycle_bin_folder_id: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::UserStatusType>,
pub r#type: std::option::Option<crate::model::UserType>,
pub created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub time_zone_id: std::option::Option<std::string::String>,
pub locale: std::option::Option<crate::model::LocaleType>,
pub storage: std::option::Option<crate::model::UserStorageMetadata>,
}
impl std::fmt::Debug for User {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("User");
formatter.field("id", &self.id);
formatter.field("username", &self.username);
formatter.field("email_address", &self.email_address);
formatter.field("given_name", &self.given_name);
formatter.field("surname", &self.surname);
formatter.field("organization_id", &self.organization_id);
formatter.field("root_folder_id", &self.root_folder_id);
formatter.field("recycle_bin_folder_id", &self.recycle_bin_folder_id);
formatter.field("status", &self.status);
formatter.field("r#type", &self.r#type);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("modified_timestamp", &self.modified_timestamp);
formatter.field("time_zone_id", &self.time_zone_id);
formatter.field("locale", &self.locale);
formatter.field("storage", &self.storage);
formatter.finish()
}
}
pub mod user {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) username: std::option::Option<std::string::String>,
pub(crate) email_address: std::option::Option<std::string::String>,
pub(crate) given_name: std::option::Option<std::string::String>,
pub(crate) surname: std::option::Option<std::string::String>,
pub(crate) organization_id: std::option::Option<std::string::String>,
pub(crate) root_folder_id: std::option::Option<std::string::String>,
pub(crate) recycle_bin_folder_id: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::UserStatusType>,
pub(crate) r#type: std::option::Option<crate::model::UserType>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) time_zone_id: std::option::Option<std::string::String>,
pub(crate) locale: std::option::Option<crate::model::LocaleType>,
pub(crate) storage: std::option::Option<crate::model::UserStorageMetadata>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn username(mut self, input: impl Into<std::string::String>) -> Self {
self.username = Some(input.into());
self
}
pub fn set_username(mut self, input: std::option::Option<std::string::String>) -> Self {
self.username = input;
self
}
pub fn email_address(mut self, input: impl Into<std::string::String>) -> Self {
self.email_address = Some(input.into());
self
}
pub fn set_email_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.email_address = input;
self
}
pub fn given_name(mut self, input: impl Into<std::string::String>) -> Self {
self.given_name = Some(input.into());
self
}
pub fn set_given_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.given_name = input;
self
}
pub fn surname(mut self, input: impl Into<std::string::String>) -> Self {
self.surname = Some(input.into());
self
}
pub fn set_surname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.surname = input;
self
}
pub fn organization_id(mut self, input: impl Into<std::string::String>) -> Self {
self.organization_id = Some(input.into());
self
}
pub fn set_organization_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_id = input;
self
}
pub fn root_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.root_folder_id = Some(input.into());
self
}
pub fn set_root_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.root_folder_id = input;
self
}
pub fn recycle_bin_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.recycle_bin_folder_id = Some(input.into());
self
}
pub fn set_recycle_bin_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.recycle_bin_folder_id = input;
self
}
pub fn status(mut self, input: crate::model::UserStatusType) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::UserStatusType>,
) -> Self {
self.status = input;
self
}
pub fn r#type(mut self, input: crate::model::UserType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::UserType>) -> Self {
self.r#type = input;
self
}
pub fn created_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_timestamp = Some(input);
self
}
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_timestamp = input;
self
}
pub fn modified_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.modified_timestamp = Some(input);
self
}
pub fn set_modified_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.modified_timestamp = input;
self
}
pub fn time_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
self.time_zone_id = Some(input.into());
self
}
pub fn set_time_zone_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.time_zone_id = input;
self
}
pub fn locale(mut self, input: crate::model::LocaleType) -> Self {
self.locale = Some(input);
self
}
pub fn set_locale(mut self, input: std::option::Option<crate::model::LocaleType>) -> Self {
self.locale = input;
self
}
pub fn storage(mut self, input: crate::model::UserStorageMetadata) -> Self {
self.storage = Some(input);
self
}
pub fn set_storage(
mut self,
input: std::option::Option<crate::model::UserStorageMetadata>,
) -> Self {
self.storage = input;
self
}
pub fn build(self) -> crate::model::User {
crate::model::User {
id: self.id,
username: self.username,
email_address: self.email_address,
given_name: self.given_name,
surname: self.surname,
organization_id: self.organization_id,
root_folder_id: self.root_folder_id,
recycle_bin_folder_id: self.recycle_bin_folder_id,
status: self.status,
r#type: self.r#type,
created_timestamp: self.created_timestamp,
modified_timestamp: self.modified_timestamp,
time_zone_id: self.time_zone_id,
locale: self.locale,
storage: self.storage,
}
}
}
}
impl User {
pub fn builder() -> crate::model::user::Builder {
crate::model::user::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UserStorageMetadata {
pub storage_utilized_in_bytes: std::option::Option<i64>,
pub storage_rule: std::option::Option<crate::model::StorageRuleType>,
}
impl std::fmt::Debug for UserStorageMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UserStorageMetadata");
formatter.field("storage_utilized_in_bytes", &self.storage_utilized_in_bytes);
formatter.field("storage_rule", &self.storage_rule);
formatter.finish()
}
}
pub mod user_storage_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) storage_utilized_in_bytes: std::option::Option<i64>,
pub(crate) storage_rule: std::option::Option<crate::model::StorageRuleType>,
}
impl Builder {
pub fn storage_utilized_in_bytes(mut self, input: i64) -> Self {
self.storage_utilized_in_bytes = Some(input);
self
}
pub fn set_storage_utilized_in_bytes(mut self, input: std::option::Option<i64>) -> Self {
self.storage_utilized_in_bytes = input;
self
}
pub fn storage_rule(mut self, input: crate::model::StorageRuleType) -> Self {
self.storage_rule = Some(input);
self
}
pub fn set_storage_rule(
mut self,
input: std::option::Option<crate::model::StorageRuleType>,
) -> Self {
self.storage_rule = input;
self
}
pub fn build(self) -> crate::model::UserStorageMetadata {
crate::model::UserStorageMetadata {
storage_utilized_in_bytes: self.storage_utilized_in_bytes,
storage_rule: self.storage_rule,
}
}
}
}
impl UserStorageMetadata {
pub fn builder() -> crate::model::user_storage_metadata::Builder {
crate::model::user_storage_metadata::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct StorageRuleType {
pub storage_allocated_in_bytes: std::option::Option<i64>,
pub storage_type: std::option::Option<crate::model::StorageType>,
}
impl std::fmt::Debug for StorageRuleType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("StorageRuleType");
formatter.field(
"storage_allocated_in_bytes",
&self.storage_allocated_in_bytes,
);
formatter.field("storage_type", &self.storage_type);
formatter.finish()
}
}
pub mod storage_rule_type {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) storage_allocated_in_bytes: std::option::Option<i64>,
pub(crate) storage_type: std::option::Option<crate::model::StorageType>,
}
impl Builder {
pub fn storage_allocated_in_bytes(mut self, input: i64) -> Self {
self.storage_allocated_in_bytes = Some(input);
self
}
pub fn set_storage_allocated_in_bytes(mut self, input: std::option::Option<i64>) -> Self {
self.storage_allocated_in_bytes = input;
self
}
pub fn storage_type(mut self, input: crate::model::StorageType) -> Self {
self.storage_type = Some(input);
self
}
pub fn set_storage_type(
mut self,
input: std::option::Option<crate::model::StorageType>,
) -> Self {
self.storage_type = input;
self
}
pub fn build(self) -> crate::model::StorageRuleType {
crate::model::StorageRuleType {
storage_allocated_in_bytes: self.storage_allocated_in_bytes,
storage_type: self.storage_type,
}
}
}
}
impl StorageRuleType {
pub fn builder() -> crate::model::storage_rule_type::Builder {
crate::model::storage_rule_type::Builder::default()
}
}
#[allow(missing_docs)] #[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 StorageType {
#[allow(missing_docs)] Quota,
#[allow(missing_docs)] Unlimited,
Unknown(String),
}
impl std::convert::From<&str> for StorageType {
fn from(s: &str) -> Self {
match s {
"QUOTA" => StorageType::Quota,
"UNLIMITED" => StorageType::Unlimited,
other => StorageType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for StorageType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StorageType::from(s))
}
}
impl StorageType {
pub fn as_str(&self) -> &str {
match self {
StorageType::Quota => "QUOTA",
StorageType::Unlimited => "UNLIMITED",
StorageType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["QUOTA", "UNLIMITED"]
}
}
impl AsRef<str> for StorageType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 LocaleType {
#[allow(missing_docs)] De,
#[allow(missing_docs)] Default,
#[allow(missing_docs)] En,
#[allow(missing_docs)] Es,
#[allow(missing_docs)] Fr,
#[allow(missing_docs)] Ja,
#[allow(missing_docs)] Ko,
#[allow(missing_docs)] PtBr,
#[allow(missing_docs)] Ru,
#[allow(missing_docs)] ZhCn,
#[allow(missing_docs)] ZhTw,
Unknown(String),
}
impl std::convert::From<&str> for LocaleType {
fn from(s: &str) -> Self {
match s {
"de" => LocaleType::De,
"default" => LocaleType::Default,
"en" => LocaleType::En,
"es" => LocaleType::Es,
"fr" => LocaleType::Fr,
"ja" => LocaleType::Ja,
"ko" => LocaleType::Ko,
"pt_BR" => LocaleType::PtBr,
"ru" => LocaleType::Ru,
"zh_CN" => LocaleType::ZhCn,
"zh_TW" => LocaleType::ZhTw,
other => LocaleType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for LocaleType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(LocaleType::from(s))
}
}
impl LocaleType {
pub fn as_str(&self) -> &str {
match self {
LocaleType::De => "de",
LocaleType::Default => "default",
LocaleType::En => "en",
LocaleType::Es => "es",
LocaleType::Fr => "fr",
LocaleType::Ja => "ja",
LocaleType::Ko => "ko",
LocaleType::PtBr => "pt_BR",
LocaleType::Ru => "ru",
LocaleType::ZhCn => "zh_CN",
LocaleType::ZhTw => "zh_TW",
LocaleType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"de", "default", "en", "es", "fr", "ja", "ko", "pt_BR", "ru", "zh_CN", "zh_TW",
]
}
}
impl AsRef<str> for LocaleType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 UserType {
#[allow(missing_docs)] Admin,
#[allow(missing_docs)] Minimaluser,
#[allow(missing_docs)] Poweruser,
#[allow(missing_docs)] User,
#[allow(missing_docs)] Workspacesuser,
Unknown(String),
}
impl std::convert::From<&str> for UserType {
fn from(s: &str) -> Self {
match s {
"ADMIN" => UserType::Admin,
"MINIMALUSER" => UserType::Minimaluser,
"POWERUSER" => UserType::Poweruser,
"USER" => UserType::User,
"WORKSPACESUSER" => UserType::Workspacesuser,
other => UserType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for UserType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(UserType::from(s))
}
}
impl UserType {
pub fn as_str(&self) -> &str {
match self {
UserType::Admin => "ADMIN",
UserType::Minimaluser => "MINIMALUSER",
UserType::Poweruser => "POWERUSER",
UserType::User => "USER",
UserType::Workspacesuser => "WORKSPACESUSER",
UserType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"ADMIN",
"MINIMALUSER",
"POWERUSER",
"USER",
"WORKSPACESUSER",
]
}
}
impl AsRef<str> for UserType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 UserStatusType {
#[allow(missing_docs)] Active,
#[allow(missing_docs)] Inactive,
#[allow(missing_docs)] Pending,
Unknown(String),
}
impl std::convert::From<&str> for UserStatusType {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => UserStatusType::Active,
"INACTIVE" => UserStatusType::Inactive,
"PENDING" => UserStatusType::Pending,
other => UserStatusType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for UserStatusType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(UserStatusType::from(s))
}
}
impl UserStatusType {
pub fn as_str(&self) -> &str {
match self {
UserStatusType::Active => "ACTIVE",
UserStatusType::Inactive => "INACTIVE",
UserStatusType::Pending => "PENDING",
UserStatusType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "INACTIVE", "PENDING"]
}
}
impl AsRef<str> for UserStatusType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 BooleanEnumType {
#[allow(missing_docs)] False,
#[allow(missing_docs)] True,
Unknown(String),
}
impl std::convert::From<&str> for BooleanEnumType {
fn from(s: &str) -> Self {
match s {
"FALSE" => BooleanEnumType::False,
"TRUE" => BooleanEnumType::True,
other => BooleanEnumType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for BooleanEnumType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(BooleanEnumType::from(s))
}
}
impl BooleanEnumType {
pub fn as_str(&self) -> &str {
match self {
BooleanEnumType::False => "FALSE",
BooleanEnumType::True => "TRUE",
BooleanEnumType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["FALSE", "TRUE"]
}
}
impl AsRef<str> for BooleanEnumType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 ResourceStateType {
#[allow(missing_docs)] Active,
#[allow(missing_docs)] Recycled,
#[allow(missing_docs)] Recycling,
#[allow(missing_docs)] Restoring,
Unknown(String),
}
impl std::convert::From<&str> for ResourceStateType {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => ResourceStateType::Active,
"RECYCLED" => ResourceStateType::Recycled,
"RECYCLING" => ResourceStateType::Recycling,
"RESTORING" => ResourceStateType::Restoring,
other => ResourceStateType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ResourceStateType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ResourceStateType::from(s))
}
}
impl ResourceStateType {
pub fn as_str(&self) -> &str {
match self {
ResourceStateType::Active => "ACTIVE",
ResourceStateType::Recycled => "RECYCLED",
ResourceStateType::Recycling => "RECYCLING",
ResourceStateType::Restoring => "RESTORING",
ResourceStateType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "RECYCLED", "RECYCLING", "RESTORING"]
}
}
impl AsRef<str> for ResourceStateType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 DocumentVersionStatus {
#[allow(missing_docs)] Active,
Unknown(String),
}
impl std::convert::From<&str> for DocumentVersionStatus {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => DocumentVersionStatus::Active,
other => DocumentVersionStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DocumentVersionStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DocumentVersionStatus::from(s))
}
}
impl DocumentVersionStatus {
pub fn as_str(&self) -> &str {
match self {
DocumentVersionStatus::Active => "ACTIVE",
DocumentVersionStatus::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ACTIVE"]
}
}
impl AsRef<str> for DocumentVersionStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 PrincipalType {
#[allow(missing_docs)] Anonymous,
#[allow(missing_docs)] Group,
#[allow(missing_docs)] Invite,
#[allow(missing_docs)] Organization,
#[allow(missing_docs)] User,
Unknown(String),
}
impl std::convert::From<&str> for PrincipalType {
fn from(s: &str) -> Self {
match s {
"ANONYMOUS" => PrincipalType::Anonymous,
"GROUP" => PrincipalType::Group,
"INVITE" => PrincipalType::Invite,
"ORGANIZATION" => PrincipalType::Organization,
"USER" => PrincipalType::User,
other => PrincipalType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PrincipalType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PrincipalType::from(s))
}
}
impl PrincipalType {
pub fn as_str(&self) -> &str {
match self {
PrincipalType::Anonymous => "ANONYMOUS",
PrincipalType::Group => "GROUP",
PrincipalType::Invite => "INVITE",
PrincipalType::Organization => "ORGANIZATION",
PrincipalType::User => "USER",
PrincipalType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ANONYMOUS", "GROUP", "INVITE", "ORGANIZATION", "USER"]
}
}
impl AsRef<str> for PrincipalType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UploadMetadata {
pub upload_url: std::option::Option<std::string::String>,
pub signed_headers:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl std::fmt::Debug for UploadMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UploadMetadata");
formatter.field("upload_url", &"*** Sensitive Data Redacted ***");
formatter.field("signed_headers", &self.signed_headers);
formatter.finish()
}
}
pub mod upload_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) upload_url: std::option::Option<std::string::String>,
pub(crate) signed_headers: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
pub fn upload_url(mut self, input: impl Into<std::string::String>) -> Self {
self.upload_url = Some(input.into());
self
}
pub fn set_upload_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.upload_url = input;
self
}
pub fn signed_headers(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.signed_headers.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.signed_headers = Some(hash_map);
self
}
pub fn set_signed_headers(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.signed_headers = input;
self
}
pub fn build(self) -> crate::model::UploadMetadata {
crate::model::UploadMetadata {
upload_url: self.upload_url,
signed_headers: self.signed_headers,
}
}
}
}
impl UploadMetadata {
pub fn builder() -> crate::model::upload_metadata::Builder {
crate::model::upload_metadata::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DocumentMetadata {
pub id: std::option::Option<std::string::String>,
pub creator_id: std::option::Option<std::string::String>,
pub parent_folder_id: std::option::Option<std::string::String>,
pub created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub latest_version_metadata: std::option::Option<crate::model::DocumentVersionMetadata>,
pub resource_state: std::option::Option<crate::model::ResourceStateType>,
pub labels: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl std::fmt::Debug for DocumentMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DocumentMetadata");
formatter.field("id", &self.id);
formatter.field("creator_id", &self.creator_id);
formatter.field("parent_folder_id", &self.parent_folder_id);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("modified_timestamp", &self.modified_timestamp);
formatter.field("latest_version_metadata", &self.latest_version_metadata);
formatter.field("resource_state", &self.resource_state);
formatter.field("labels", &self.labels);
formatter.finish()
}
}
pub mod document_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) creator_id: std::option::Option<std::string::String>,
pub(crate) parent_folder_id: std::option::Option<std::string::String>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) latest_version_metadata:
std::option::Option<crate::model::DocumentVersionMetadata>,
pub(crate) resource_state: std::option::Option<crate::model::ResourceStateType>,
pub(crate) labels: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn creator_id(mut self, input: impl Into<std::string::String>) -> Self {
self.creator_id = Some(input.into());
self
}
pub fn set_creator_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.creator_id = input;
self
}
pub fn parent_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_folder_id = Some(input.into());
self
}
pub fn set_parent_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.parent_folder_id = input;
self
}
pub fn created_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_timestamp = Some(input);
self
}
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_timestamp = input;
self
}
pub fn modified_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.modified_timestamp = Some(input);
self
}
pub fn set_modified_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.modified_timestamp = input;
self
}
pub fn latest_version_metadata(
mut self,
input: crate::model::DocumentVersionMetadata,
) -> Self {
self.latest_version_metadata = Some(input);
self
}
pub fn set_latest_version_metadata(
mut self,
input: std::option::Option<crate::model::DocumentVersionMetadata>,
) -> Self {
self.latest_version_metadata = input;
self
}
pub fn resource_state(mut self, input: crate::model::ResourceStateType) -> Self {
self.resource_state = Some(input);
self
}
pub fn set_resource_state(
mut self,
input: std::option::Option<crate::model::ResourceStateType>,
) -> Self {
self.resource_state = input;
self
}
pub fn labels(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.labels.unwrap_or_default();
v.push(input.into());
self.labels = Some(v);
self
}
pub fn set_labels(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.labels = input;
self
}
pub fn build(self) -> crate::model::DocumentMetadata {
crate::model::DocumentMetadata {
id: self.id,
creator_id: self.creator_id,
parent_folder_id: self.parent_folder_id,
created_timestamp: self.created_timestamp,
modified_timestamp: self.modified_timestamp,
latest_version_metadata: self.latest_version_metadata,
resource_state: self.resource_state,
labels: self.labels,
}
}
}
}
impl DocumentMetadata {
pub fn builder() -> crate::model::document_metadata::Builder {
crate::model::document_metadata::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DocumentVersionMetadata {
pub id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub content_type: std::option::Option<std::string::String>,
pub size: std::option::Option<i64>,
pub signature: std::option::Option<std::string::String>,
pub status: std::option::Option<crate::model::DocumentStatusType>,
pub created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub content_created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub content_modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub creator_id: std::option::Option<std::string::String>,
pub thumbnail: std::option::Option<
std::collections::HashMap<crate::model::DocumentThumbnailType, std::string::String>,
>,
pub source: std::option::Option<
std::collections::HashMap<crate::model::DocumentSourceType, std::string::String>,
>,
}
impl std::fmt::Debug for DocumentVersionMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DocumentVersionMetadata");
formatter.field("id", &self.id);
formatter.field("name", &self.name);
formatter.field("content_type", &self.content_type);
formatter.field("size", &self.size);
formatter.field("signature", &self.signature);
formatter.field("status", &self.status);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("modified_timestamp", &self.modified_timestamp);
formatter.field("content_created_timestamp", &self.content_created_timestamp);
formatter.field(
"content_modified_timestamp",
&self.content_modified_timestamp,
);
formatter.field("creator_id", &self.creator_id);
formatter.field("thumbnail", &self.thumbnail);
formatter.field("source", &self.source);
formatter.finish()
}
}
pub mod document_version_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) content_type: std::option::Option<std::string::String>,
pub(crate) size: std::option::Option<i64>,
pub(crate) signature: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::DocumentStatusType>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) content_created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) content_modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) creator_id: std::option::Option<std::string::String>,
pub(crate) thumbnail: std::option::Option<
std::collections::HashMap<crate::model::DocumentThumbnailType, std::string::String>,
>,
pub(crate) source: std::option::Option<
std::collections::HashMap<crate::model::DocumentSourceType, std::string::String>,
>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn content_type(mut self, input: impl Into<std::string::String>) -> Self {
self.content_type = Some(input.into());
self
}
pub fn set_content_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.content_type = input;
self
}
pub fn size(mut self, input: i64) -> Self {
self.size = Some(input);
self
}
pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn signature(mut self, input: impl Into<std::string::String>) -> Self {
self.signature = Some(input.into());
self
}
pub fn set_signature(mut self, input: std::option::Option<std::string::String>) -> Self {
self.signature = input;
self
}
pub fn status(mut self, input: crate::model::DocumentStatusType) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::DocumentStatusType>,
) -> Self {
self.status = input;
self
}
pub fn created_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_timestamp = Some(input);
self
}
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_timestamp = input;
self
}
pub fn modified_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.modified_timestamp = Some(input);
self
}
pub fn set_modified_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.modified_timestamp = input;
self
}
pub fn content_created_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.content_created_timestamp = Some(input);
self
}
pub fn set_content_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.content_created_timestamp = input;
self
}
pub fn content_modified_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.content_modified_timestamp = Some(input);
self
}
pub fn set_content_modified_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.content_modified_timestamp = input;
self
}
pub fn creator_id(mut self, input: impl Into<std::string::String>) -> Self {
self.creator_id = Some(input.into());
self
}
pub fn set_creator_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.creator_id = input;
self
}
pub fn thumbnail(
mut self,
k: impl Into<crate::model::DocumentThumbnailType>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.thumbnail.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.thumbnail = Some(hash_map);
self
}
pub fn set_thumbnail(
mut self,
input: std::option::Option<
std::collections::HashMap<crate::model::DocumentThumbnailType, std::string::String>,
>,
) -> Self {
self.thumbnail = input;
self
}
pub fn source(
mut self,
k: impl Into<crate::model::DocumentSourceType>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.source.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.source = Some(hash_map);
self
}
pub fn set_source(
mut self,
input: std::option::Option<
std::collections::HashMap<crate::model::DocumentSourceType, std::string::String>,
>,
) -> Self {
self.source = input;
self
}
pub fn build(self) -> crate::model::DocumentVersionMetadata {
crate::model::DocumentVersionMetadata {
id: self.id,
name: self.name,
content_type: self.content_type,
size: self.size,
signature: self.signature,
status: self.status,
created_timestamp: self.created_timestamp,
modified_timestamp: self.modified_timestamp,
content_created_timestamp: self.content_created_timestamp,
content_modified_timestamp: self.content_modified_timestamp,
creator_id: self.creator_id,
thumbnail: self.thumbnail,
source: self.source,
}
}
}
}
impl DocumentVersionMetadata {
pub fn builder() -> crate::model::document_version_metadata::Builder {
crate::model::document_version_metadata::Builder::default()
}
}
#[allow(missing_docs)] #[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 DocumentSourceType {
#[allow(missing_docs)] Original,
#[allow(missing_docs)] WithComments,
Unknown(String),
}
impl std::convert::From<&str> for DocumentSourceType {
fn from(s: &str) -> Self {
match s {
"ORIGINAL" => DocumentSourceType::Original,
"WITH_COMMENTS" => DocumentSourceType::WithComments,
other => DocumentSourceType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DocumentSourceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DocumentSourceType::from(s))
}
}
impl DocumentSourceType {
pub fn as_str(&self) -> &str {
match self {
DocumentSourceType::Original => "ORIGINAL",
DocumentSourceType::WithComments => "WITH_COMMENTS",
DocumentSourceType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ORIGINAL", "WITH_COMMENTS"]
}
}
impl AsRef<str> for DocumentSourceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 DocumentThumbnailType {
#[allow(missing_docs)] Large,
#[allow(missing_docs)] Small,
#[allow(missing_docs)] SmallHq,
Unknown(String),
}
impl std::convert::From<&str> for DocumentThumbnailType {
fn from(s: &str) -> Self {
match s {
"LARGE" => DocumentThumbnailType::Large,
"SMALL" => DocumentThumbnailType::Small,
"SMALL_HQ" => DocumentThumbnailType::SmallHq,
other => DocumentThumbnailType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DocumentThumbnailType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DocumentThumbnailType::from(s))
}
}
impl DocumentThumbnailType {
pub fn as_str(&self) -> &str {
match self {
DocumentThumbnailType::Large => "LARGE",
DocumentThumbnailType::Small => "SMALL",
DocumentThumbnailType::SmallHq => "SMALL_HQ",
DocumentThumbnailType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["LARGE", "SMALL", "SMALL_HQ"]
}
}
impl AsRef<str> for DocumentThumbnailType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 DocumentStatusType {
#[allow(missing_docs)] Active,
#[allow(missing_docs)] Initialized,
Unknown(String),
}
impl std::convert::From<&str> for DocumentStatusType {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => DocumentStatusType::Active,
"INITIALIZED" => DocumentStatusType::Initialized,
other => DocumentStatusType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for DocumentStatusType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DocumentStatusType::from(s))
}
}
impl DocumentStatusType {
pub fn as_str(&self) -> &str {
match self {
DocumentStatusType::Active => "ACTIVE",
DocumentStatusType::Initialized => "INITIALIZED",
DocumentStatusType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "INITIALIZED"]
}
}
impl AsRef<str> for DocumentStatusType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct FolderMetadata {
pub id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
pub creator_id: std::option::Option<std::string::String>,
pub parent_folder_id: std::option::Option<std::string::String>,
pub created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub resource_state: std::option::Option<crate::model::ResourceStateType>,
pub signature: std::option::Option<std::string::String>,
pub labels: std::option::Option<std::vec::Vec<std::string::String>>,
pub size: std::option::Option<i64>,
pub latest_version_size: std::option::Option<i64>,
}
impl std::fmt::Debug for FolderMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("FolderMetadata");
formatter.field("id", &self.id);
formatter.field("name", &self.name);
formatter.field("creator_id", &self.creator_id);
formatter.field("parent_folder_id", &self.parent_folder_id);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("modified_timestamp", &self.modified_timestamp);
formatter.field("resource_state", &self.resource_state);
formatter.field("signature", &self.signature);
formatter.field("labels", &self.labels);
formatter.field("size", &self.size);
formatter.field("latest_version_size", &self.latest_version_size);
formatter.finish()
}
}
pub mod folder_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) creator_id: std::option::Option<std::string::String>,
pub(crate) parent_folder_id: std::option::Option<std::string::String>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) modified_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) resource_state: std::option::Option<crate::model::ResourceStateType>,
pub(crate) signature: std::option::Option<std::string::String>,
pub(crate) labels: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) size: std::option::Option<i64>,
pub(crate) latest_version_size: std::option::Option<i64>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn creator_id(mut self, input: impl Into<std::string::String>) -> Self {
self.creator_id = Some(input.into());
self
}
pub fn set_creator_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.creator_id = input;
self
}
pub fn parent_folder_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_folder_id = Some(input.into());
self
}
pub fn set_parent_folder_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.parent_folder_id = input;
self
}
pub fn created_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_timestamp = Some(input);
self
}
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_timestamp = input;
self
}
pub fn modified_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.modified_timestamp = Some(input);
self
}
pub fn set_modified_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.modified_timestamp = input;
self
}
pub fn resource_state(mut self, input: crate::model::ResourceStateType) -> Self {
self.resource_state = Some(input);
self
}
pub fn set_resource_state(
mut self,
input: std::option::Option<crate::model::ResourceStateType>,
) -> Self {
self.resource_state = input;
self
}
pub fn signature(mut self, input: impl Into<std::string::String>) -> Self {
self.signature = Some(input.into());
self
}
pub fn set_signature(mut self, input: std::option::Option<std::string::String>) -> Self {
self.signature = input;
self
}
pub fn labels(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.labels.unwrap_or_default();
v.push(input.into());
self.labels = Some(v);
self
}
pub fn set_labels(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.labels = input;
self
}
pub fn size(mut self, input: i64) -> Self {
self.size = Some(input);
self
}
pub fn set_size(mut self, input: std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn latest_version_size(mut self, input: i64) -> Self {
self.latest_version_size = Some(input);
self
}
pub fn set_latest_version_size(mut self, input: std::option::Option<i64>) -> Self {
self.latest_version_size = input;
self
}
pub fn build(self) -> crate::model::FolderMetadata {
crate::model::FolderMetadata {
id: self.id,
name: self.name,
creator_id: self.creator_id,
parent_folder_id: self.parent_folder_id,
created_timestamp: self.created_timestamp,
modified_timestamp: self.modified_timestamp,
resource_state: self.resource_state,
signature: self.signature,
labels: self.labels,
size: self.size,
latest_version_size: self.latest_version_size,
}
}
}
}
impl FolderMetadata {
pub fn builder() -> crate::model::folder_metadata::Builder {
crate::model::folder_metadata::Builder::default()
}
}
#[allow(missing_docs)] #[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 ResourceCollectionType {
#[allow(missing_docs)] SharedWithMe,
Unknown(String),
}
impl std::convert::From<&str> for ResourceCollectionType {
fn from(s: &str) -> Self {
match s {
"SHARED_WITH_ME" => ResourceCollectionType::SharedWithMe,
other => ResourceCollectionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ResourceCollectionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ResourceCollectionType::from(s))
}
}
impl ResourceCollectionType {
pub fn as_str(&self) -> &str {
match self {
ResourceCollectionType::SharedWithMe => "SHARED_WITH_ME",
ResourceCollectionType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["SHARED_WITH_ME"]
}
}
impl AsRef<str> for ResourceCollectionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourcePath {
pub components: std::option::Option<std::vec::Vec<crate::model::ResourcePathComponent>>,
}
impl std::fmt::Debug for ResourcePath {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourcePath");
formatter.field("components", &self.components);
formatter.finish()
}
}
pub mod resource_path {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) components:
std::option::Option<std::vec::Vec<crate::model::ResourcePathComponent>>,
}
impl Builder {
pub fn components(mut self, input: impl Into<crate::model::ResourcePathComponent>) -> Self {
let mut v = self.components.unwrap_or_default();
v.push(input.into());
self.components = Some(v);
self
}
pub fn set_components(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ResourcePathComponent>>,
) -> Self {
self.components = input;
self
}
pub fn build(self) -> crate::model::ResourcePath {
crate::model::ResourcePath {
components: self.components,
}
}
}
}
impl ResourcePath {
pub fn builder() -> crate::model::resource_path::Builder {
crate::model::resource_path::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourcePathComponent {
pub id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ResourcePathComponent {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourcePathComponent");
formatter.field("id", &self.id);
formatter.field("name", &self.name);
formatter.finish()
}
}
pub mod resource_path_component {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(self) -> crate::model::ResourcePathComponent {
crate::model::ResourcePathComponent {
id: self.id,
name: self.name,
}
}
}
}
impl ResourcePathComponent {
pub fn builder() -> crate::model::resource_path_component::Builder {
crate::model::resource_path_component::Builder::default()
}
}
#[allow(missing_docs)] #[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 UserSortType {
#[allow(missing_docs)] FullName,
#[allow(missing_docs)] StorageLimit,
#[allow(missing_docs)] StorageUsed,
#[allow(missing_docs)] UserName,
#[allow(missing_docs)] UserStatus,
Unknown(String),
}
impl std::convert::From<&str> for UserSortType {
fn from(s: &str) -> Self {
match s {
"FULL_NAME" => UserSortType::FullName,
"STORAGE_LIMIT" => UserSortType::StorageLimit,
"STORAGE_USED" => UserSortType::StorageUsed,
"USER_NAME" => UserSortType::UserName,
"USER_STATUS" => UserSortType::UserStatus,
other => UserSortType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for UserSortType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(UserSortType::from(s))
}
}
impl UserSortType {
pub fn as_str(&self) -> &str {
match self {
UserSortType::FullName => "FULL_NAME",
UserSortType::StorageLimit => "STORAGE_LIMIT",
UserSortType::StorageUsed => "STORAGE_USED",
UserSortType::UserName => "USER_NAME",
UserSortType::UserStatus => "USER_STATUS",
UserSortType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"FULL_NAME",
"STORAGE_LIMIT",
"STORAGE_USED",
"USER_NAME",
"USER_STATUS",
]
}
}
impl AsRef<str> for UserSortType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 OrderType {
#[allow(missing_docs)] Ascending,
#[allow(missing_docs)] Descending,
Unknown(String),
}
impl std::convert::From<&str> for OrderType {
fn from(s: &str) -> Self {
match s {
"ASCENDING" => OrderType::Ascending,
"DESCENDING" => OrderType::Descending,
other => OrderType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for OrderType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OrderType::from(s))
}
}
impl OrderType {
pub fn as_str(&self) -> &str {
match self {
OrderType::Ascending => "ASCENDING",
OrderType::Descending => "DESCENDING",
OrderType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ASCENDING", "DESCENDING"]
}
}
impl AsRef<str> for OrderType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 UserFilterType {
#[allow(missing_docs)] ActivePending,
#[allow(missing_docs)] All,
Unknown(String),
}
impl std::convert::From<&str> for UserFilterType {
fn from(s: &str) -> Self {
match s {
"ACTIVE_PENDING" => UserFilterType::ActivePending,
"ALL" => UserFilterType::All,
other => UserFilterType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for UserFilterType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(UserFilterType::from(s))
}
}
impl UserFilterType {
pub fn as_str(&self) -> &str {
match self {
UserFilterType::ActivePending => "ACTIVE_PENDING",
UserFilterType::All => "ALL",
UserFilterType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ACTIVE_PENDING", "ALL"]
}
}
impl AsRef<str> for UserFilterType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Principal {
pub id: std::option::Option<std::string::String>,
pub r#type: std::option::Option<crate::model::PrincipalType>,
pub roles: std::option::Option<std::vec::Vec<crate::model::PermissionInfo>>,
}
impl std::fmt::Debug for Principal {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Principal");
formatter.field("id", &self.id);
formatter.field("r#type", &self.r#type);
formatter.field("roles", &self.roles);
formatter.finish()
}
}
pub mod principal {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::PrincipalType>,
pub(crate) roles: std::option::Option<std::vec::Vec<crate::model::PermissionInfo>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn r#type(mut self, input: crate::model::PrincipalType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::PrincipalType>) -> Self {
self.r#type = input;
self
}
pub fn roles(mut self, input: impl Into<crate::model::PermissionInfo>) -> Self {
let mut v = self.roles.unwrap_or_default();
v.push(input.into());
self.roles = Some(v);
self
}
pub fn set_roles(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PermissionInfo>>,
) -> Self {
self.roles = input;
self
}
pub fn build(self) -> crate::model::Principal {
crate::model::Principal {
id: self.id,
r#type: self.r#type,
roles: self.roles,
}
}
}
}
impl Principal {
pub fn builder() -> crate::model::principal::Builder {
crate::model::principal::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PermissionInfo {
pub role: std::option::Option<crate::model::RoleType>,
pub r#type: std::option::Option<crate::model::RolePermissionType>,
}
impl std::fmt::Debug for PermissionInfo {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PermissionInfo");
formatter.field("role", &self.role);
formatter.field("r#type", &self.r#type);
formatter.finish()
}
}
pub mod permission_info {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) role: std::option::Option<crate::model::RoleType>,
pub(crate) r#type: std::option::Option<crate::model::RolePermissionType>,
}
impl Builder {
pub fn role(mut self, input: crate::model::RoleType) -> Self {
self.role = Some(input);
self
}
pub fn set_role(mut self, input: std::option::Option<crate::model::RoleType>) -> Self {
self.role = input;
self
}
pub fn r#type(mut self, input: crate::model::RolePermissionType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(
mut self,
input: std::option::Option<crate::model::RolePermissionType>,
) -> Self {
self.r#type = input;
self
}
pub fn build(self) -> crate::model::PermissionInfo {
crate::model::PermissionInfo {
role: self.role,
r#type: self.r#type,
}
}
}
}
impl PermissionInfo {
pub fn builder() -> crate::model::permission_info::Builder {
crate::model::permission_info::Builder::default()
}
}
#[allow(missing_docs)] #[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 RolePermissionType {
#[allow(missing_docs)] Direct,
#[allow(missing_docs)] Inherited,
Unknown(String),
}
impl std::convert::From<&str> for RolePermissionType {
fn from(s: &str) -> Self {
match s {
"DIRECT" => RolePermissionType::Direct,
"INHERITED" => RolePermissionType::Inherited,
other => RolePermissionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RolePermissionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RolePermissionType::from(s))
}
}
impl RolePermissionType {
pub fn as_str(&self) -> &str {
match self {
RolePermissionType::Direct => "DIRECT",
RolePermissionType::Inherited => "INHERITED",
RolePermissionType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["DIRECT", "INHERITED"]
}
}
impl AsRef<str> for RolePermissionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 RoleType {
#[allow(missing_docs)] Contributor,
#[allow(missing_docs)] Coowner,
#[allow(missing_docs)] Owner,
#[allow(missing_docs)] Viewer,
Unknown(String),
}
impl std::convert::From<&str> for RoleType {
fn from(s: &str) -> Self {
match s {
"CONTRIBUTOR" => RoleType::Contributor,
"COOWNER" => RoleType::Coowner,
"OWNER" => RoleType::Owner,
"VIEWER" => RoleType::Viewer,
other => RoleType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for RoleType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RoleType::from(s))
}
}
impl RoleType {
pub fn as_str(&self) -> &str {
match self {
RoleType::Contributor => "CONTRIBUTOR",
RoleType::Coowner => "COOWNER",
RoleType::Owner => "OWNER",
RoleType::Viewer => "VIEWER",
RoleType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["CONTRIBUTOR", "COOWNER", "OWNER", "VIEWER"]
}
}
impl AsRef<str> for RoleType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Subscription {
pub subscription_id: std::option::Option<std::string::String>,
pub end_point: std::option::Option<std::string::String>,
pub protocol: std::option::Option<crate::model::SubscriptionProtocolType>,
}
impl std::fmt::Debug for Subscription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Subscription");
formatter.field("subscription_id", &self.subscription_id);
formatter.field("end_point", &self.end_point);
formatter.field("protocol", &self.protocol);
formatter.finish()
}
}
pub mod subscription {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) subscription_id: std::option::Option<std::string::String>,
pub(crate) end_point: std::option::Option<std::string::String>,
pub(crate) protocol: std::option::Option<crate::model::SubscriptionProtocolType>,
}
impl Builder {
pub fn subscription_id(mut self, input: impl Into<std::string::String>) -> Self {
self.subscription_id = Some(input.into());
self
}
pub fn set_subscription_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.subscription_id = input;
self
}
pub fn end_point(mut self, input: impl Into<std::string::String>) -> Self {
self.end_point = Some(input.into());
self
}
pub fn set_end_point(mut self, input: std::option::Option<std::string::String>) -> Self {
self.end_point = input;
self
}
pub fn protocol(mut self, input: crate::model::SubscriptionProtocolType) -> Self {
self.protocol = Some(input);
self
}
pub fn set_protocol(
mut self,
input: std::option::Option<crate::model::SubscriptionProtocolType>,
) -> Self {
self.protocol = input;
self
}
pub fn build(self) -> crate::model::Subscription {
crate::model::Subscription {
subscription_id: self.subscription_id,
end_point: self.end_point,
protocol: self.protocol,
}
}
}
}
impl Subscription {
pub fn builder() -> crate::model::subscription::Builder {
crate::model::subscription::Builder::default()
}
}
#[allow(missing_docs)] #[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 SubscriptionProtocolType {
#[allow(missing_docs)] Https,
Unknown(String),
}
impl std::convert::From<&str> for SubscriptionProtocolType {
fn from(s: &str) -> Self {
match s {
"HTTPS" => SubscriptionProtocolType::Https,
other => SubscriptionProtocolType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SubscriptionProtocolType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SubscriptionProtocolType::from(s))
}
}
impl SubscriptionProtocolType {
pub fn as_str(&self) -> &str {
match self {
SubscriptionProtocolType::Https => "HTTPS",
SubscriptionProtocolType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["HTTPS"]
}
}
impl AsRef<str> for SubscriptionProtocolType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GroupMetadata {
pub id: std::option::Option<std::string::String>,
pub name: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for GroupMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GroupMetadata");
formatter.field("id", &self.id);
formatter.field("name", &self.name);
formatter.finish()
}
}
pub mod group_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn build(self) -> crate::model::GroupMetadata {
crate::model::GroupMetadata {
id: self.id,
name: self.name,
}
}
}
}
impl GroupMetadata {
pub fn builder() -> crate::model::group_metadata::Builder {
crate::model::group_metadata::Builder::default()
}
}
#[allow(missing_docs)] #[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 FolderContentType {
#[allow(missing_docs)] All,
#[allow(missing_docs)] Document,
#[allow(missing_docs)] Folder,
Unknown(String),
}
impl std::convert::From<&str> for FolderContentType {
fn from(s: &str) -> Self {
match s {
"ALL" => FolderContentType::All,
"DOCUMENT" => FolderContentType::Document,
"FOLDER" => FolderContentType::Folder,
other => FolderContentType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for FolderContentType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(FolderContentType::from(s))
}
}
impl FolderContentType {
pub fn as_str(&self) -> &str {
match self {
FolderContentType::All => "ALL",
FolderContentType::Document => "DOCUMENT",
FolderContentType::Folder => "FOLDER",
FolderContentType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ALL", "DOCUMENT", "FOLDER"]
}
}
impl AsRef<str> for FolderContentType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 ResourceSortType {
#[allow(missing_docs)] Date,
#[allow(missing_docs)] Name,
Unknown(String),
}
impl std::convert::From<&str> for ResourceSortType {
fn from(s: &str) -> Self {
match s {
"DATE" => ResourceSortType::Date,
"NAME" => ResourceSortType::Name,
other => ResourceSortType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ResourceSortType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ResourceSortType::from(s))
}
}
impl ResourceSortType {
pub fn as_str(&self) -> &str {
match self {
ResourceSortType::Date => "DATE",
ResourceSortType::Name => "NAME",
ResourceSortType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["DATE", "NAME"]
}
}
impl AsRef<str> for ResourceSortType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Comment {
pub comment_id: std::option::Option<std::string::String>,
pub parent_id: std::option::Option<std::string::String>,
pub thread_id: std::option::Option<std::string::String>,
pub text: std::option::Option<std::string::String>,
pub contributor: std::option::Option<crate::model::User>,
pub created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub status: std::option::Option<crate::model::CommentStatusType>,
pub visibility: std::option::Option<crate::model::CommentVisibilityType>,
pub recipient_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for Comment {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Comment");
formatter.field("comment_id", &self.comment_id);
formatter.field("parent_id", &self.parent_id);
formatter.field("thread_id", &self.thread_id);
formatter.field("text", &"*** Sensitive Data Redacted ***");
formatter.field("contributor", &self.contributor);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("status", &self.status);
formatter.field("visibility", &self.visibility);
formatter.field("recipient_id", &self.recipient_id);
formatter.finish()
}
}
pub mod comment {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) comment_id: std::option::Option<std::string::String>,
pub(crate) parent_id: std::option::Option<std::string::String>,
pub(crate) thread_id: std::option::Option<std::string::String>,
pub(crate) text: std::option::Option<std::string::String>,
pub(crate) contributor: std::option::Option<crate::model::User>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) status: std::option::Option<crate::model::CommentStatusType>,
pub(crate) visibility: std::option::Option<crate::model::CommentVisibilityType>,
pub(crate) recipient_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn comment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_id = Some(input.into());
self
}
pub fn set_comment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_id = input;
self
}
pub fn parent_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_id = Some(input.into());
self
}
pub fn set_parent_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.parent_id = input;
self
}
pub fn thread_id(mut self, input: impl Into<std::string::String>) -> Self {
self.thread_id = Some(input.into());
self
}
pub fn set_thread_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.thread_id = input;
self
}
pub fn text(mut self, input: impl Into<std::string::String>) -> Self {
self.text = Some(input.into());
self
}
pub fn set_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.text = input;
self
}
pub fn contributor(mut self, input: crate::model::User) -> Self {
self.contributor = Some(input);
self
}
pub fn set_contributor(mut self, input: std::option::Option<crate::model::User>) -> Self {
self.contributor = input;
self
}
pub fn created_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_timestamp = Some(input);
self
}
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_timestamp = input;
self
}
pub fn status(mut self, input: crate::model::CommentStatusType) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::CommentStatusType>,
) -> Self {
self.status = input;
self
}
pub fn visibility(mut self, input: crate::model::CommentVisibilityType) -> Self {
self.visibility = Some(input);
self
}
pub fn set_visibility(
mut self,
input: std::option::Option<crate::model::CommentVisibilityType>,
) -> Self {
self.visibility = input;
self
}
pub fn recipient_id(mut self, input: impl Into<std::string::String>) -> Self {
self.recipient_id = Some(input.into());
self
}
pub fn set_recipient_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.recipient_id = input;
self
}
pub fn build(self) -> crate::model::Comment {
crate::model::Comment {
comment_id: self.comment_id,
parent_id: self.parent_id,
thread_id: self.thread_id,
text: self.text,
contributor: self.contributor,
created_timestamp: self.created_timestamp,
status: self.status,
visibility: self.visibility,
recipient_id: self.recipient_id,
}
}
}
}
impl Comment {
pub fn builder() -> crate::model::comment::Builder {
crate::model::comment::Builder::default()
}
}
#[allow(missing_docs)] #[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 CommentVisibilityType {
#[allow(missing_docs)] Private,
#[allow(missing_docs)] Public,
Unknown(String),
}
impl std::convert::From<&str> for CommentVisibilityType {
fn from(s: &str) -> Self {
match s {
"PRIVATE" => CommentVisibilityType::Private,
"PUBLIC" => CommentVisibilityType::Public,
other => CommentVisibilityType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CommentVisibilityType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CommentVisibilityType::from(s))
}
}
impl CommentVisibilityType {
pub fn as_str(&self) -> &str {
match self {
CommentVisibilityType::Private => "PRIVATE",
CommentVisibilityType::Public => "PUBLIC",
CommentVisibilityType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["PRIVATE", "PUBLIC"]
}
}
impl AsRef<str> for CommentVisibilityType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 CommentStatusType {
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Draft,
#[allow(missing_docs)] Published,
Unknown(String),
}
impl std::convert::From<&str> for CommentStatusType {
fn from(s: &str) -> Self {
match s {
"DELETED" => CommentStatusType::Deleted,
"DRAFT" => CommentStatusType::Draft,
"PUBLISHED" => CommentStatusType::Published,
other => CommentStatusType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for CommentStatusType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(CommentStatusType::from(s))
}
}
impl CommentStatusType {
pub fn as_str(&self) -> &str {
match self {
CommentStatusType::Deleted => "DELETED",
CommentStatusType::Draft => "DRAFT",
CommentStatusType::Published => "PUBLISHED",
CommentStatusType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["DELETED", "DRAFT", "PUBLISHED"]
}
}
impl AsRef<str> for CommentStatusType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Activity {
pub r#type: std::option::Option<crate::model::ActivityType>,
pub time_stamp: std::option::Option<aws_smithy_types::Instant>,
pub is_indirect_activity: bool,
pub organization_id: std::option::Option<std::string::String>,
pub initiator: std::option::Option<crate::model::UserMetadata>,
pub participants: std::option::Option<crate::model::Participants>,
pub resource_metadata: std::option::Option<crate::model::ResourceMetadata>,
pub original_parent: std::option::Option<crate::model::ResourceMetadata>,
pub comment_metadata: std::option::Option<crate::model::CommentMetadata>,
}
impl std::fmt::Debug for Activity {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Activity");
formatter.field("r#type", &self.r#type);
formatter.field("time_stamp", &self.time_stamp);
formatter.field("is_indirect_activity", &self.is_indirect_activity);
formatter.field("organization_id", &self.organization_id);
formatter.field("initiator", &self.initiator);
formatter.field("participants", &self.participants);
formatter.field("resource_metadata", &self.resource_metadata);
formatter.field("original_parent", &self.original_parent);
formatter.field("comment_metadata", &self.comment_metadata);
formatter.finish()
}
}
pub mod activity {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::ActivityType>,
pub(crate) time_stamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) is_indirect_activity: std::option::Option<bool>,
pub(crate) organization_id: std::option::Option<std::string::String>,
pub(crate) initiator: std::option::Option<crate::model::UserMetadata>,
pub(crate) participants: std::option::Option<crate::model::Participants>,
pub(crate) resource_metadata: std::option::Option<crate::model::ResourceMetadata>,
pub(crate) original_parent: std::option::Option<crate::model::ResourceMetadata>,
pub(crate) comment_metadata: std::option::Option<crate::model::CommentMetadata>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::ActivityType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::ActivityType>) -> Self {
self.r#type = input;
self
}
pub fn time_stamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.time_stamp = Some(input);
self
}
pub fn set_time_stamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.time_stamp = input;
self
}
pub fn is_indirect_activity(mut self, input: bool) -> Self {
self.is_indirect_activity = Some(input);
self
}
pub fn set_is_indirect_activity(mut self, input: std::option::Option<bool>) -> Self {
self.is_indirect_activity = input;
self
}
pub fn organization_id(mut self, input: impl Into<std::string::String>) -> Self {
self.organization_id = Some(input.into());
self
}
pub fn set_organization_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.organization_id = input;
self
}
pub fn initiator(mut self, input: crate::model::UserMetadata) -> Self {
self.initiator = Some(input);
self
}
pub fn set_initiator(
mut self,
input: std::option::Option<crate::model::UserMetadata>,
) -> Self {
self.initiator = input;
self
}
pub fn participants(mut self, input: crate::model::Participants) -> Self {
self.participants = Some(input);
self
}
pub fn set_participants(
mut self,
input: std::option::Option<crate::model::Participants>,
) -> Self {
self.participants = input;
self
}
pub fn resource_metadata(mut self, input: crate::model::ResourceMetadata) -> Self {
self.resource_metadata = Some(input);
self
}
pub fn set_resource_metadata(
mut self,
input: std::option::Option<crate::model::ResourceMetadata>,
) -> Self {
self.resource_metadata = input;
self
}
pub fn original_parent(mut self, input: crate::model::ResourceMetadata) -> Self {
self.original_parent = Some(input);
self
}
pub fn set_original_parent(
mut self,
input: std::option::Option<crate::model::ResourceMetadata>,
) -> Self {
self.original_parent = input;
self
}
pub fn comment_metadata(mut self, input: crate::model::CommentMetadata) -> Self {
self.comment_metadata = Some(input);
self
}
pub fn set_comment_metadata(
mut self,
input: std::option::Option<crate::model::CommentMetadata>,
) -> Self {
self.comment_metadata = input;
self
}
pub fn build(self) -> crate::model::Activity {
crate::model::Activity {
r#type: self.r#type,
time_stamp: self.time_stamp,
is_indirect_activity: self.is_indirect_activity.unwrap_or_default(),
organization_id: self.organization_id,
initiator: self.initiator,
participants: self.participants,
resource_metadata: self.resource_metadata,
original_parent: self.original_parent,
comment_metadata: self.comment_metadata,
}
}
}
}
impl Activity {
pub fn builder() -> crate::model::activity::Builder {
crate::model::activity::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CommentMetadata {
pub comment_id: std::option::Option<std::string::String>,
pub contributor: std::option::Option<crate::model::User>,
pub created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub comment_status: std::option::Option<crate::model::CommentStatusType>,
pub recipient_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for CommentMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("CommentMetadata");
formatter.field("comment_id", &self.comment_id);
formatter.field("contributor", &self.contributor);
formatter.field("created_timestamp", &self.created_timestamp);
formatter.field("comment_status", &self.comment_status);
formatter.field("recipient_id", &self.recipient_id);
formatter.finish()
}
}
pub mod comment_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) comment_id: std::option::Option<std::string::String>,
pub(crate) contributor: std::option::Option<crate::model::User>,
pub(crate) created_timestamp: std::option::Option<aws_smithy_types::Instant>,
pub(crate) comment_status: std::option::Option<crate::model::CommentStatusType>,
pub(crate) recipient_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn comment_id(mut self, input: impl Into<std::string::String>) -> Self {
self.comment_id = Some(input.into());
self
}
pub fn set_comment_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.comment_id = input;
self
}
pub fn contributor(mut self, input: crate::model::User) -> Self {
self.contributor = Some(input);
self
}
pub fn set_contributor(mut self, input: std::option::Option<crate::model::User>) -> Self {
self.contributor = input;
self
}
pub fn created_timestamp(mut self, input: aws_smithy_types::Instant) -> Self {
self.created_timestamp = Some(input);
self
}
pub fn set_created_timestamp(
mut self,
input: std::option::Option<aws_smithy_types::Instant>,
) -> Self {
self.created_timestamp = input;
self
}
pub fn comment_status(mut self, input: crate::model::CommentStatusType) -> Self {
self.comment_status = Some(input);
self
}
pub fn set_comment_status(
mut self,
input: std::option::Option<crate::model::CommentStatusType>,
) -> Self {
self.comment_status = input;
self
}
pub fn recipient_id(mut self, input: impl Into<std::string::String>) -> Self {
self.recipient_id = Some(input.into());
self
}
pub fn set_recipient_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.recipient_id = input;
self
}
pub fn build(self) -> crate::model::CommentMetadata {
crate::model::CommentMetadata {
comment_id: self.comment_id,
contributor: self.contributor,
created_timestamp: self.created_timestamp,
comment_status: self.comment_status,
recipient_id: self.recipient_id,
}
}
}
}
impl CommentMetadata {
pub fn builder() -> crate::model::comment_metadata::Builder {
crate::model::comment_metadata::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceMetadata {
pub r#type: std::option::Option<crate::model::ResourceType>,
pub name: std::option::Option<std::string::String>,
pub original_name: std::option::Option<std::string::String>,
pub id: std::option::Option<std::string::String>,
pub version_id: std::option::Option<std::string::String>,
pub owner: std::option::Option<crate::model::UserMetadata>,
pub parent_id: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ResourceMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceMetadata");
formatter.field("r#type", &self.r#type);
formatter.field("name", &self.name);
formatter.field("original_name", &self.original_name);
formatter.field("id", &self.id);
formatter.field("version_id", &self.version_id);
formatter.field("owner", &self.owner);
formatter.field("parent_id", &self.parent_id);
formatter.finish()
}
}
pub mod resource_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) r#type: std::option::Option<crate::model::ResourceType>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) original_name: std::option::Option<std::string::String>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) version_id: std::option::Option<std::string::String>,
pub(crate) owner: std::option::Option<crate::model::UserMetadata>,
pub(crate) parent_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn r#type(mut self, input: crate::model::ResourceType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::ResourceType>) -> Self {
self.r#type = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn original_name(mut self, input: impl Into<std::string::String>) -> Self {
self.original_name = Some(input.into());
self
}
pub fn set_original_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.original_name = input;
self
}
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
self.version_id = Some(input.into());
self
}
pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version_id = input;
self
}
pub fn owner(mut self, input: crate::model::UserMetadata) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::UserMetadata>) -> Self {
self.owner = input;
self
}
pub fn parent_id(mut self, input: impl Into<std::string::String>) -> Self {
self.parent_id = Some(input.into());
self
}
pub fn set_parent_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.parent_id = input;
self
}
pub fn build(self) -> crate::model::ResourceMetadata {
crate::model::ResourceMetadata {
r#type: self.r#type,
name: self.name,
original_name: self.original_name,
id: self.id,
version_id: self.version_id,
owner: self.owner,
parent_id: self.parent_id,
}
}
}
}
impl ResourceMetadata {
pub fn builder() -> crate::model::resource_metadata::Builder {
crate::model::resource_metadata::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UserMetadata {
pub id: std::option::Option<std::string::String>,
pub username: std::option::Option<std::string::String>,
pub given_name: std::option::Option<std::string::String>,
pub surname: std::option::Option<std::string::String>,
pub email_address: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for UserMetadata {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UserMetadata");
formatter.field("id", &self.id);
formatter.field("username", &self.username);
formatter.field("given_name", &self.given_name);
formatter.field("surname", &self.surname);
formatter.field("email_address", &self.email_address);
formatter.finish()
}
}
pub mod user_metadata {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) username: std::option::Option<std::string::String>,
pub(crate) given_name: std::option::Option<std::string::String>,
pub(crate) surname: std::option::Option<std::string::String>,
pub(crate) email_address: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn username(mut self, input: impl Into<std::string::String>) -> Self {
self.username = Some(input.into());
self
}
pub fn set_username(mut self, input: std::option::Option<std::string::String>) -> Self {
self.username = input;
self
}
pub fn given_name(mut self, input: impl Into<std::string::String>) -> Self {
self.given_name = Some(input.into());
self
}
pub fn set_given_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.given_name = input;
self
}
pub fn surname(mut self, input: impl Into<std::string::String>) -> Self {
self.surname = Some(input.into());
self
}
pub fn set_surname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.surname = input;
self
}
pub fn email_address(mut self, input: impl Into<std::string::String>) -> Self {
self.email_address = Some(input.into());
self
}
pub fn set_email_address(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.email_address = input;
self
}
pub fn build(self) -> crate::model::UserMetadata {
crate::model::UserMetadata {
id: self.id,
username: self.username,
given_name: self.given_name,
surname: self.surname,
email_address: self.email_address,
}
}
}
}
impl UserMetadata {
pub fn builder() -> crate::model::user_metadata::Builder {
crate::model::user_metadata::Builder::default()
}
}
#[allow(missing_docs)] #[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 ResourceType {
#[allow(missing_docs)] Document,
#[allow(missing_docs)] Folder,
Unknown(String),
}
impl std::convert::From<&str> for ResourceType {
fn from(s: &str) -> Self {
match s {
"DOCUMENT" => ResourceType::Document,
"FOLDER" => ResourceType::Folder,
other => ResourceType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ResourceType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ResourceType::from(s))
}
}
impl ResourceType {
pub fn as_str(&self) -> &str {
match self {
ResourceType::Document => "DOCUMENT",
ResourceType::Folder => "FOLDER",
ResourceType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["DOCUMENT", "FOLDER"]
}
}
impl AsRef<str> for ResourceType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Participants {
pub users: std::option::Option<std::vec::Vec<crate::model::UserMetadata>>,
pub groups: std::option::Option<std::vec::Vec<crate::model::GroupMetadata>>,
}
impl std::fmt::Debug for Participants {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("Participants");
formatter.field("users", &self.users);
formatter.field("groups", &self.groups);
formatter.finish()
}
}
pub mod participants {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) users: std::option::Option<std::vec::Vec<crate::model::UserMetadata>>,
pub(crate) groups: std::option::Option<std::vec::Vec<crate::model::GroupMetadata>>,
}
impl Builder {
pub fn users(mut self, input: impl Into<crate::model::UserMetadata>) -> Self {
let mut v = self.users.unwrap_or_default();
v.push(input.into());
self.users = Some(v);
self
}
pub fn set_users(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::UserMetadata>>,
) -> Self {
self.users = input;
self
}
pub fn groups(mut self, input: impl Into<crate::model::GroupMetadata>) -> Self {
let mut v = self.groups.unwrap_or_default();
v.push(input.into());
self.groups = Some(v);
self
}
pub fn set_groups(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::GroupMetadata>>,
) -> Self {
self.groups = input;
self
}
pub fn build(self) -> crate::model::Participants {
crate::model::Participants {
users: self.users,
groups: self.groups,
}
}
}
}
impl Participants {
pub fn builder() -> crate::model::participants::Builder {
crate::model::participants::Builder::default()
}
}
#[allow(missing_docs)] #[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 ActivityType {
#[allow(missing_docs)] DocumentAnnotationAdded,
#[allow(missing_docs)] DocumentAnnotationDeleted,
#[allow(missing_docs)] DocumentCheckedIn,
#[allow(missing_docs)] DocumentCheckedOut,
#[allow(missing_docs)] DocumentCommentAdded,
#[allow(missing_docs)] DocumentCommentDeleted,
#[allow(missing_docs)] DocumentMoved,
#[allow(missing_docs)] DocumentRecycled,
#[allow(missing_docs)] DocumentRenamed,
#[allow(missing_docs)] DocumentRestored,
#[allow(missing_docs)] DocumentReverted,
#[allow(missing_docs)] DocumentShareableLinkCreated,
#[allow(missing_docs)] DocumentShareableLinkPermissionChanged,
#[allow(missing_docs)] DocumentShareableLinkRemoved,
#[allow(missing_docs)] DocumentShared,
#[allow(missing_docs)] DocumentSharePermissionChanged,
#[allow(missing_docs)] DocumentUnshared,
#[allow(missing_docs)] DocumentVersionDeleted,
#[allow(missing_docs)] DocumentVersionDownloaded,
#[allow(missing_docs)] DocumentVersionUploaded,
#[allow(missing_docs)] DocumentVersionViewed,
#[allow(missing_docs)] FolderCreated,
#[allow(missing_docs)] FolderDeleted,
#[allow(missing_docs)] FolderMoved,
#[allow(missing_docs)] FolderRecycled,
#[allow(missing_docs)] FolderRenamed,
#[allow(missing_docs)] FolderRestored,
#[allow(missing_docs)] FolderShareableLinkCreated,
#[allow(missing_docs)] FolderShareableLinkPermissionChanged,
#[allow(missing_docs)] FolderShareableLinkRemoved,
#[allow(missing_docs)] FolderShared,
#[allow(missing_docs)] FolderSharePermissionChanged,
#[allow(missing_docs)] FolderUnshared,
Unknown(String),
}
impl std::convert::From<&str> for ActivityType {
fn from(s: &str) -> Self {
match s {
"DOCUMENT_ANNOTATION_ADDED" => ActivityType::DocumentAnnotationAdded,
"DOCUMENT_ANNOTATION_DELETED" => ActivityType::DocumentAnnotationDeleted,
"DOCUMENT_CHECKED_IN" => ActivityType::DocumentCheckedIn,
"DOCUMENT_CHECKED_OUT" => ActivityType::DocumentCheckedOut,
"DOCUMENT_COMMENT_ADDED" => ActivityType::DocumentCommentAdded,
"DOCUMENT_COMMENT_DELETED" => ActivityType::DocumentCommentDeleted,
"DOCUMENT_MOVED" => ActivityType::DocumentMoved,
"DOCUMENT_RECYCLED" => ActivityType::DocumentRecycled,
"DOCUMENT_RENAMED" => ActivityType::DocumentRenamed,
"DOCUMENT_RESTORED" => ActivityType::DocumentRestored,
"DOCUMENT_REVERTED" => ActivityType::DocumentReverted,
"DOCUMENT_SHAREABLE_LINK_CREATED" => ActivityType::DocumentShareableLinkCreated,
"DOCUMENT_SHAREABLE_LINK_PERMISSION_CHANGED" => {
ActivityType::DocumentShareableLinkPermissionChanged
}
"DOCUMENT_SHAREABLE_LINK_REMOVED" => ActivityType::DocumentShareableLinkRemoved,
"DOCUMENT_SHARED" => ActivityType::DocumentShared,
"DOCUMENT_SHARE_PERMISSION_CHANGED" => ActivityType::DocumentSharePermissionChanged,
"DOCUMENT_UNSHARED" => ActivityType::DocumentUnshared,
"DOCUMENT_VERSION_DELETED" => ActivityType::DocumentVersionDeleted,
"DOCUMENT_VERSION_DOWNLOADED" => ActivityType::DocumentVersionDownloaded,
"DOCUMENT_VERSION_UPLOADED" => ActivityType::DocumentVersionUploaded,
"DOCUMENT_VERSION_VIEWED" => ActivityType::DocumentVersionViewed,
"FOLDER_CREATED" => ActivityType::FolderCreated,
"FOLDER_DELETED" => ActivityType::FolderDeleted,
"FOLDER_MOVED" => ActivityType::FolderMoved,
"FOLDER_RECYCLED" => ActivityType::FolderRecycled,
"FOLDER_RENAMED" => ActivityType::FolderRenamed,
"FOLDER_RESTORED" => ActivityType::FolderRestored,
"FOLDER_SHAREABLE_LINK_CREATED" => ActivityType::FolderShareableLinkCreated,
"FOLDER_SHAREABLE_LINK_PERMISSION_CHANGED" => {
ActivityType::FolderShareableLinkPermissionChanged
}
"FOLDER_SHAREABLE_LINK_REMOVED" => ActivityType::FolderShareableLinkRemoved,
"FOLDER_SHARED" => ActivityType::FolderShared,
"FOLDER_SHARE_PERMISSION_CHANGED" => ActivityType::FolderSharePermissionChanged,
"FOLDER_UNSHARED" => ActivityType::FolderUnshared,
other => ActivityType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ActivityType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ActivityType::from(s))
}
}
impl ActivityType {
pub fn as_str(&self) -> &str {
match self {
ActivityType::DocumentAnnotationAdded => "DOCUMENT_ANNOTATION_ADDED",
ActivityType::DocumentAnnotationDeleted => "DOCUMENT_ANNOTATION_DELETED",
ActivityType::DocumentCheckedIn => "DOCUMENT_CHECKED_IN",
ActivityType::DocumentCheckedOut => "DOCUMENT_CHECKED_OUT",
ActivityType::DocumentCommentAdded => "DOCUMENT_COMMENT_ADDED",
ActivityType::DocumentCommentDeleted => "DOCUMENT_COMMENT_DELETED",
ActivityType::DocumentMoved => "DOCUMENT_MOVED",
ActivityType::DocumentRecycled => "DOCUMENT_RECYCLED",
ActivityType::DocumentRenamed => "DOCUMENT_RENAMED",
ActivityType::DocumentRestored => "DOCUMENT_RESTORED",
ActivityType::DocumentReverted => "DOCUMENT_REVERTED",
ActivityType::DocumentShareableLinkCreated => "DOCUMENT_SHAREABLE_LINK_CREATED",
ActivityType::DocumentShareableLinkPermissionChanged => {
"DOCUMENT_SHAREABLE_LINK_PERMISSION_CHANGED"
}
ActivityType::DocumentShareableLinkRemoved => "DOCUMENT_SHAREABLE_LINK_REMOVED",
ActivityType::DocumentShared => "DOCUMENT_SHARED",
ActivityType::DocumentSharePermissionChanged => "DOCUMENT_SHARE_PERMISSION_CHANGED",
ActivityType::DocumentUnshared => "DOCUMENT_UNSHARED",
ActivityType::DocumentVersionDeleted => "DOCUMENT_VERSION_DELETED",
ActivityType::DocumentVersionDownloaded => "DOCUMENT_VERSION_DOWNLOADED",
ActivityType::DocumentVersionUploaded => "DOCUMENT_VERSION_UPLOADED",
ActivityType::DocumentVersionViewed => "DOCUMENT_VERSION_VIEWED",
ActivityType::FolderCreated => "FOLDER_CREATED",
ActivityType::FolderDeleted => "FOLDER_DELETED",
ActivityType::FolderMoved => "FOLDER_MOVED",
ActivityType::FolderRecycled => "FOLDER_RECYCLED",
ActivityType::FolderRenamed => "FOLDER_RENAMED",
ActivityType::FolderRestored => "FOLDER_RESTORED",
ActivityType::FolderShareableLinkCreated => "FOLDER_SHAREABLE_LINK_CREATED",
ActivityType::FolderShareableLinkPermissionChanged => {
"FOLDER_SHAREABLE_LINK_PERMISSION_CHANGED"
}
ActivityType::FolderShareableLinkRemoved => "FOLDER_SHAREABLE_LINK_REMOVED",
ActivityType::FolderShared => "FOLDER_SHARED",
ActivityType::FolderSharePermissionChanged => "FOLDER_SHARE_PERMISSION_CHANGED",
ActivityType::FolderUnshared => "FOLDER_UNSHARED",
ActivityType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&[
"DOCUMENT_ANNOTATION_ADDED",
"DOCUMENT_ANNOTATION_DELETED",
"DOCUMENT_CHECKED_IN",
"DOCUMENT_CHECKED_OUT",
"DOCUMENT_COMMENT_ADDED",
"DOCUMENT_COMMENT_DELETED",
"DOCUMENT_MOVED",
"DOCUMENT_RECYCLED",
"DOCUMENT_RENAMED",
"DOCUMENT_RESTORED",
"DOCUMENT_REVERTED",
"DOCUMENT_SHAREABLE_LINK_CREATED",
"DOCUMENT_SHAREABLE_LINK_PERMISSION_CHANGED",
"DOCUMENT_SHAREABLE_LINK_REMOVED",
"DOCUMENT_SHARED",
"DOCUMENT_SHARE_PERMISSION_CHANGED",
"DOCUMENT_UNSHARED",
"DOCUMENT_VERSION_DELETED",
"DOCUMENT_VERSION_DOWNLOADED",
"DOCUMENT_VERSION_UPLOADED",
"DOCUMENT_VERSION_VIEWED",
"FOLDER_CREATED",
"FOLDER_DELETED",
"FOLDER_MOVED",
"FOLDER_RECYCLED",
"FOLDER_RENAMED",
"FOLDER_RESTORED",
"FOLDER_SHAREABLE_LINK_CREATED",
"FOLDER_SHAREABLE_LINK_PERMISSION_CHANGED",
"FOLDER_SHAREABLE_LINK_REMOVED",
"FOLDER_SHARED",
"FOLDER_SHARE_PERMISSION_CHANGED",
"FOLDER_UNSHARED",
]
}
}
impl AsRef<str> for ActivityType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[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 SubscriptionType {
#[allow(missing_docs)] All,
Unknown(String),
}
impl std::convert::From<&str> for SubscriptionType {
fn from(s: &str) -> Self {
match s {
"ALL" => SubscriptionType::All,
other => SubscriptionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for SubscriptionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(SubscriptionType::from(s))
}
}
impl SubscriptionType {
pub fn as_str(&self) -> &str {
match self {
SubscriptionType::All => "ALL",
SubscriptionType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["ALL"]
}
}
impl AsRef<str> for SubscriptionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ShareResult {
pub principal_id: std::option::Option<std::string::String>,
pub invitee_principal_id: std::option::Option<std::string::String>,
pub role: std::option::Option<crate::model::RoleType>,
pub status: std::option::Option<crate::model::ShareStatusType>,
pub share_id: std::option::Option<std::string::String>,
pub status_message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for ShareResult {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ShareResult");
formatter.field("principal_id", &self.principal_id);
formatter.field("invitee_principal_id", &self.invitee_principal_id);
formatter.field("role", &self.role);
formatter.field("status", &self.status);
formatter.field("share_id", &self.share_id);
formatter.field("status_message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
pub mod share_result {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) principal_id: std::option::Option<std::string::String>,
pub(crate) invitee_principal_id: std::option::Option<std::string::String>,
pub(crate) role: std::option::Option<crate::model::RoleType>,
pub(crate) status: std::option::Option<crate::model::ShareStatusType>,
pub(crate) share_id: std::option::Option<std::string::String>,
pub(crate) status_message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.principal_id = Some(input.into());
self
}
pub fn set_principal_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.principal_id = input;
self
}
pub fn invitee_principal_id(mut self, input: impl Into<std::string::String>) -> Self {
self.invitee_principal_id = Some(input.into());
self
}
pub fn set_invitee_principal_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.invitee_principal_id = input;
self
}
pub fn role(mut self, input: crate::model::RoleType) -> Self {
self.role = Some(input);
self
}
pub fn set_role(mut self, input: std::option::Option<crate::model::RoleType>) -> Self {
self.role = input;
self
}
pub fn status(mut self, input: crate::model::ShareStatusType) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ShareStatusType>,
) -> Self {
self.status = input;
self
}
pub fn share_id(mut self, input: impl Into<std::string::String>) -> Self {
self.share_id = Some(input.into());
self
}
pub fn set_share_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.share_id = input;
self
}
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
pub fn build(self) -> crate::model::ShareResult {
crate::model::ShareResult {
principal_id: self.principal_id,
invitee_principal_id: self.invitee_principal_id,
role: self.role,
status: self.status,
share_id: self.share_id,
status_message: self.status_message,
}
}
}
}
impl ShareResult {
pub fn builder() -> crate::model::share_result::Builder {
crate::model::share_result::Builder::default()
}
}
#[allow(missing_docs)] #[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 ShareStatusType {
#[allow(missing_docs)] Failure,
#[allow(missing_docs)] Success,
Unknown(String),
}
impl std::convert::From<&str> for ShareStatusType {
fn from(s: &str) -> Self {
match s {
"FAILURE" => ShareStatusType::Failure,
"SUCCESS" => ShareStatusType::Success,
other => ShareStatusType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ShareStatusType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ShareStatusType::from(s))
}
}
impl ShareStatusType {
pub fn as_str(&self) -> &str {
match self {
ShareStatusType::Failure => "FAILURE",
ShareStatusType::Success => "SUCCESS",
ShareStatusType::Unknown(s) => s.as_ref(),
}
}
pub fn values() -> &'static [&'static str] {
&["FAILURE", "SUCCESS"]
}
}
impl AsRef<str> for ShareStatusType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NotificationOptions {
pub send_email: bool,
pub email_message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for NotificationOptions {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NotificationOptions");
formatter.field("send_email", &self.send_email);
formatter.field("email_message", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
pub mod notification_options {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) send_email: std::option::Option<bool>,
pub(crate) email_message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn send_email(mut self, input: bool) -> Self {
self.send_email = Some(input);
self
}
pub fn set_send_email(mut self, input: std::option::Option<bool>) -> Self {
self.send_email = input;
self
}
pub fn email_message(mut self, input: impl Into<std::string::String>) -> Self {
self.email_message = Some(input.into());
self
}
pub fn set_email_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.email_message = input;
self
}
pub fn build(self) -> crate::model::NotificationOptions {
crate::model::NotificationOptions {
send_email: self.send_email.unwrap_or_default(),
email_message: self.email_message,
}
}
}
}
impl NotificationOptions {
pub fn builder() -> crate::model::notification_options::Builder {
crate::model::notification_options::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SharePrincipal {
pub id: std::option::Option<std::string::String>,
pub r#type: std::option::Option<crate::model::PrincipalType>,
pub role: std::option::Option<crate::model::RoleType>,
}
impl std::fmt::Debug for SharePrincipal {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("SharePrincipal");
formatter.field("id", &self.id);
formatter.field("r#type", &self.r#type);
formatter.field("role", &self.role);
formatter.finish()
}
}
pub mod share_principal {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) r#type: std::option::Option<crate::model::PrincipalType>,
pub(crate) role: std::option::Option<crate::model::RoleType>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn r#type(mut self, input: crate::model::PrincipalType) -> Self {
self.r#type = Some(input);
self
}
pub fn set_type(mut self, input: std::option::Option<crate::model::PrincipalType>) -> Self {
self.r#type = input;
self
}
pub fn role(mut self, input: crate::model::RoleType) -> Self {
self.role = Some(input);
self
}
pub fn set_role(mut self, input: std::option::Option<crate::model::RoleType>) -> Self {
self.role = input;
self
}
pub fn build(self) -> crate::model::SharePrincipal {
crate::model::SharePrincipal {
id: self.id,
r#type: self.r#type,
role: self.role,
}
}
}
}
impl SharePrincipal {
pub fn builder() -> crate::model::share_principal::Builder {
crate::model::share_principal::Builder::default()
}
}