#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListAttachedPoliciesOutput {
pub policies: ::std::option::Option<::std::vec::Vec<crate::types::Policy>>,
pub next_marker: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ListAttachedPoliciesOutput {
pub fn policies(&self) -> &[crate::types::Policy] {
self.policies.as_deref().unwrap_or_default()
}
pub fn next_marker(&self) -> ::std::option::Option<&str> {
self.next_marker.as_deref()
}
}
impl ::aws_types::request_id::RequestId for ListAttachedPoliciesOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ListAttachedPoliciesOutput {
pub fn builder() -> crate::operation::list_attached_policies::builders::ListAttachedPoliciesOutputBuilder {
crate::operation::list_attached_policies::builders::ListAttachedPoliciesOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListAttachedPoliciesOutputBuilder {
pub(crate) policies: ::std::option::Option<::std::vec::Vec<crate::types::Policy>>,
pub(crate) next_marker: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl ListAttachedPoliciesOutputBuilder {
pub fn policies(mut self, input: crate::types::Policy) -> Self {
let mut v = self.policies.unwrap_or_default();
v.push(input);
self.policies = ::std::option::Option::Some(v);
self
}
pub fn set_policies(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Policy>>) -> Self {
self.policies = input;
self
}
pub fn get_policies(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Policy>> {
&self.policies
}
pub fn next_marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_marker = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_marker = input;
self
}
pub fn get_next_marker(&self) -> &::std::option::Option<::std::string::String> {
&self.next_marker
}
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::list_attached_policies::ListAttachedPoliciesOutput {
crate::operation::list_attached_policies::ListAttachedPoliciesOutput {
policies: self.policies,
next_marker: self.next_marker,
_request_id: self._request_id,
}
}
}