#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchGetThreatsInput {
pub threat_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub agent_space_id: ::std::option::Option<::std::string::String>,
}
impl BatchGetThreatsInput {
pub fn threat_ids(&self) -> &[::std::string::String] {
self.threat_ids.as_deref().unwrap_or_default()
}
pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
self.agent_space_id.as_deref()
}
}
impl BatchGetThreatsInput {
pub fn builder() -> crate::operation::batch_get_threats::builders::BatchGetThreatsInputBuilder {
crate::operation::batch_get_threats::builders::BatchGetThreatsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetThreatsInputBuilder {
pub(crate) threat_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
}
impl BatchGetThreatsInputBuilder {
pub fn threat_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.threat_ids.unwrap_or_default();
v.push(input.into());
self.threat_ids = ::std::option::Option::Some(v);
self
}
pub fn set_threat_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.threat_ids = input;
self
}
pub fn get_threat_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.threat_ids
}
pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_space_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_space_id = input;
self
}
pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_space_id
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::batch_get_threats::BatchGetThreatsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::batch_get_threats::BatchGetThreatsInput {
threat_ids: self.threat_ids,
agent_space_id: self.agent_space_id,
})
}
}