#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetResourcePolicyOutput {
pub policy_in_json: ::std::option::Option<::std::string::String>,
pub policy_hash: ::std::option::Option<::std::string::String>,
pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetResourcePolicyOutput {
pub fn policy_in_json(&self) -> ::std::option::Option<&str> {
self.policy_in_json.as_deref()
}
pub fn policy_hash(&self) -> ::std::option::Option<&str> {
self.policy_hash.as_deref()
}
pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.create_time.as_ref()
}
pub fn update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.update_time.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetResourcePolicyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetResourcePolicyOutput {
pub fn builder() -> crate::operation::get_resource_policy::builders::GetResourcePolicyOutputBuilder {
crate::operation::get_resource_policy::builders::GetResourcePolicyOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetResourcePolicyOutputBuilder {
pub(crate) policy_in_json: ::std::option::Option<::std::string::String>,
pub(crate) policy_hash: ::std::option::Option<::std::string::String>,
pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetResourcePolicyOutputBuilder {
pub fn policy_in_json(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.policy_in_json = ::std::option::Option::Some(input.into());
self
}
pub fn set_policy_in_json(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.policy_in_json = input;
self
}
pub fn get_policy_in_json(&self) -> &::std::option::Option<::std::string::String> {
&self.policy_in_json
}
pub fn policy_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.policy_hash = ::std::option::Option::Some(input.into());
self
}
pub fn set_policy_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.policy_hash = input;
self
}
pub fn get_policy_hash(&self) -> &::std::option::Option<::std::string::String> {
&self.policy_hash
}
pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.create_time = ::std::option::Option::Some(input);
self
}
pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.create_time = input;
self
}
pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.create_time
}
pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.update_time = ::std::option::Option::Some(input);
self
}
pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.update_time = input;
self
}
pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.update_time
}
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::get_resource_policy::GetResourcePolicyOutput {
crate::operation::get_resource_policy::GetResourcePolicyOutput {
policy_in_json: self.policy_in_json,
policy_hash: self.policy_hash,
create_time: self.create_time,
update_time: self.update_time,
_request_id: self._request_id,
}
}
}