aws_sdk_s3/types/
_grant.rs#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Grant {
pub grantee: ::std::option::Option<crate::types::Grantee>,
pub permission: ::std::option::Option<crate::types::Permission>,
}
impl Grant {
pub fn grantee(&self) -> ::std::option::Option<&crate::types::Grantee> {
self.grantee.as_ref()
}
pub fn permission(&self) -> ::std::option::Option<&crate::types::Permission> {
self.permission.as_ref()
}
}
impl Grant {
pub fn builder() -> crate::types::builders::GrantBuilder {
crate::types::builders::GrantBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GrantBuilder {
pub(crate) grantee: ::std::option::Option<crate::types::Grantee>,
pub(crate) permission: ::std::option::Option<crate::types::Permission>,
}
impl GrantBuilder {
pub fn grantee(mut self, input: crate::types::Grantee) -> Self {
self.grantee = ::std::option::Option::Some(input);
self
}
pub fn set_grantee(mut self, input: ::std::option::Option<crate::types::Grantee>) -> Self {
self.grantee = input;
self
}
pub fn get_grantee(&self) -> &::std::option::Option<crate::types::Grantee> {
&self.grantee
}
pub fn permission(mut self, input: crate::types::Permission) -> Self {
self.permission = ::std::option::Option::Some(input);
self
}
pub fn set_permission(mut self, input: ::std::option::Option<crate::types::Permission>) -> Self {
self.permission = input;
self
}
pub fn get_permission(&self) -> &::std::option::Option<crate::types::Permission> {
&self.permission
}
pub fn build(self) -> crate::types::Grant {
crate::types::Grant {
grantee: self.grantee,
permission: self.permission,
}
}
}