#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AddFlowSourcesOutput {
pub flow_arn: ::std::option::Option<::std::string::String>,
pub sources: ::std::option::Option<::std::vec::Vec<crate::types::Source>>,
_request_id: Option<String>,
}
impl AddFlowSourcesOutput {
pub fn flow_arn(&self) -> ::std::option::Option<&str> {
self.flow_arn.as_deref()
}
pub fn sources(&self) -> &[crate::types::Source] {
self.sources.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for AddFlowSourcesOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl AddFlowSourcesOutput {
pub fn builder() -> crate::operation::add_flow_sources::builders::AddFlowSourcesOutputBuilder {
crate::operation::add_flow_sources::builders::AddFlowSourcesOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddFlowSourcesOutputBuilder {
pub(crate) flow_arn: ::std::option::Option<::std::string::String>,
pub(crate) sources: ::std::option::Option<::std::vec::Vec<crate::types::Source>>,
_request_id: Option<String>,
}
impl AddFlowSourcesOutputBuilder {
pub fn flow_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.flow_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_flow_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.flow_arn = input;
self
}
pub fn get_flow_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.flow_arn
}
pub fn sources(mut self, input: crate::types::Source) -> Self {
let mut v = self.sources.unwrap_or_default();
v.push(input);
self.sources = ::std::option::Option::Some(v);
self
}
pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Source>>) -> Self {
self.sources = input;
self
}
pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Source>> {
&self.sources
}
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::add_flow_sources::AddFlowSourcesOutput {
crate::operation::add_flow_sources::AddFlowSourcesOutput {
flow_arn: self.flow_arn,
sources: self.sources,
_request_id: self._request_id,
}
}
}