#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeDeploymentsOutput {
#[doc(hidden)]
pub deployments: std::option::Option<std::vec::Vec<crate::types::Deployment>>,
_request_id: Option<String>,
}
impl DescribeDeploymentsOutput {
pub fn deployments(&self) -> std::option::Option<&[crate::types::Deployment]> {
self.deployments.as_deref()
}
}
impl aws_http::request_id::RequestId for DescribeDeploymentsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeDeploymentsOutput {
pub fn builder(
) -> crate::operation::describe_deployments::builders::DescribeDeploymentsOutputBuilder {
crate::operation::describe_deployments::builders::DescribeDeploymentsOutputBuilder::default(
)
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeDeploymentsOutputBuilder {
pub(crate) deployments: std::option::Option<std::vec::Vec<crate::types::Deployment>>,
_request_id: Option<String>,
}
impl DescribeDeploymentsOutputBuilder {
pub fn deployments(mut self, input: crate::types::Deployment) -> Self {
let mut v = self.deployments.unwrap_or_default();
v.push(input);
self.deployments = Some(v);
self
}
pub fn set_deployments(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Deployment>>,
) -> Self {
self.deployments = 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::describe_deployments::DescribeDeploymentsOutput {
crate::operation::describe_deployments::DescribeDeploymentsOutput {
deployments: self.deployments,
_request_id: self._request_id,
}
}
}