#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeResourcePolicyOutput {
pub resource_policy: ::std::option::Option<::std::string::String>,
pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub policy_revision_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeResourcePolicyOutput {
pub fn resource_policy(&self) -> ::std::option::Option<&str> {
self.resource_policy.as_deref()
}
pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_modified_time.as_ref()
}
pub fn policy_revision_id(&self) -> ::std::option::Option<&str> {
self.policy_revision_id.as_deref()
}
}
impl ::aws_types::request_id::RequestId for DescribeResourcePolicyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeResourcePolicyOutput {
pub fn builder() -> crate::operation::describe_resource_policy::builders::DescribeResourcePolicyOutputBuilder {
crate::operation::describe_resource_policy::builders::DescribeResourcePolicyOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeResourcePolicyOutputBuilder {
pub(crate) resource_policy: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) policy_revision_id: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeResourcePolicyOutputBuilder {
pub fn resource_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_policy = ::std::option::Option::Some(input.into());
self
}
pub fn set_resource_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_policy = input;
self
}
pub fn get_resource_policy(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_policy
}
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modified_time = ::std::option::Option::Some(input);
self
}
pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modified_time = input;
self
}
pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modified_time
}
pub fn policy_revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.policy_revision_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_policy_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.policy_revision_id = input;
self
}
pub fn get_policy_revision_id(&self) -> &::std::option::Option<::std::string::String> {
&self.policy_revision_id
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::describe_resource_policy::DescribeResourcePolicyOutput {
crate::operation::describe_resource_policy::DescribeResourcePolicyOutput {
resource_policy: self.resource_policy,
creation_time: self.creation_time,
last_modified_time: self.last_modified_time,
policy_revision_id: self.policy_revision_id,
_request_id: self._request_id,
}
}
}