#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetPolicyOutput {
#[doc(hidden)]
pub policy: std::option::Option<std::string::String>,
#[doc(hidden)]
pub revision_id: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl GetPolicyOutput {
pub fn policy(&self) -> std::option::Option<&str> {
self.policy.as_deref()
}
pub fn revision_id(&self) -> std::option::Option<&str> {
self.revision_id.as_deref()
}
}
impl aws_http::request_id::RequestId for GetPolicyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetPolicyOutput {
pub fn builder() -> crate::operation::get_policy::builders::GetPolicyOutputBuilder {
crate::operation::get_policy::builders::GetPolicyOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct GetPolicyOutputBuilder {
pub(crate) policy: std::option::Option<std::string::String>,
pub(crate) revision_id: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl GetPolicyOutputBuilder {
pub fn policy(mut self, input: impl Into<std::string::String>) -> Self {
self.policy = Some(input.into());
self
}
pub fn set_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
self.policy = input;
self
}
pub fn revision_id(mut self, input: impl Into<std::string::String>) -> Self {
self.revision_id = Some(input.into());
self
}
pub fn set_revision_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.revision_id = input;
self
}
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_policy::GetPolicyOutput {
crate::operation::get_policy::GetPolicyOutput {
policy: self.policy,
revision_id: self.revision_id,
_request_id: self._request_id,
}
}
}