#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeLocationsOutput {
pub locations: ::std::option::Option<::std::vec::Vec<crate::types::Location>>,
_request_id: Option<String>,
}
impl DescribeLocationsOutput {
pub fn locations(&self) -> &[crate::types::Location] {
self.locations.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for DescribeLocationsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeLocationsOutput {
pub fn builder() -> crate::operation::describe_locations::builders::DescribeLocationsOutputBuilder {
crate::operation::describe_locations::builders::DescribeLocationsOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeLocationsOutputBuilder {
pub(crate) locations: ::std::option::Option<::std::vec::Vec<crate::types::Location>>,
_request_id: Option<String>,
}
impl DescribeLocationsOutputBuilder {
pub fn locations(mut self, input: crate::types::Location) -> Self {
let mut v = self.locations.unwrap_or_default();
v.push(input);
self.locations = ::std::option::Option::Some(v);
self
}
pub fn set_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Location>>) -> Self {
self.locations = input;
self
}
pub fn get_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Location>> {
&self.locations
}
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_locations::DescribeLocationsOutput {
crate::operation::describe_locations::DescribeLocationsOutput {
locations: self.locations,
_request_id: self._request_id,
}
}
}