aws_sdk_securityir/operation/update_case/
_update_case_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateCaseInput {
pub case_id: ::std::option::Option<::std::string::String>,
pub title: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub engagement_type: ::std::option::Option<crate::types::EngagementType>,
pub watchers_to_add: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
pub watchers_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
pub threat_actor_ip_addresses_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
pub threat_actor_ip_addresses_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
pub impacted_services_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub impacted_services_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub impacted_aws_regions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
pub impacted_aws_regions_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
pub impacted_accounts_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub impacted_accounts_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateCaseInput {
pub fn case_id(&self) -> ::std::option::Option<&str> {
self.case_id.as_deref()
}
pub fn title(&self) -> ::std::option::Option<&str> {
self.title.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn reported_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.reported_incident_start_date.as_ref()
}
pub fn actual_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.actual_incident_start_date.as_ref()
}
pub fn engagement_type(&self) -> ::std::option::Option<&crate::types::EngagementType> {
self.engagement_type.as_ref()
}
pub fn watchers_to_add(&self) -> &[crate::types::Watcher] {
self.watchers_to_add.as_deref().unwrap_or_default()
}
pub fn watchers_to_delete(&self) -> &[crate::types::Watcher] {
self.watchers_to_delete.as_deref().unwrap_or_default()
}
pub fn threat_actor_ip_addresses_to_add(&self) -> &[crate::types::ThreatActorIp] {
self.threat_actor_ip_addresses_to_add.as_deref().unwrap_or_default()
}
pub fn threat_actor_ip_addresses_to_delete(&self) -> &[crate::types::ThreatActorIp] {
self.threat_actor_ip_addresses_to_delete.as_deref().unwrap_or_default()
}
pub fn impacted_services_to_add(&self) -> &[::std::string::String] {
self.impacted_services_to_add.as_deref().unwrap_or_default()
}
pub fn impacted_services_to_delete(&self) -> &[::std::string::String] {
self.impacted_services_to_delete.as_deref().unwrap_or_default()
}
pub fn impacted_aws_regions_to_add(&self) -> &[crate::types::ImpactedAwsRegion] {
self.impacted_aws_regions_to_add.as_deref().unwrap_or_default()
}
pub fn impacted_aws_regions_to_delete(&self) -> &[crate::types::ImpactedAwsRegion] {
self.impacted_aws_regions_to_delete.as_deref().unwrap_or_default()
}
pub fn impacted_accounts_to_add(&self) -> &[::std::string::String] {
self.impacted_accounts_to_add.as_deref().unwrap_or_default()
}
pub fn impacted_accounts_to_delete(&self) -> &[::std::string::String] {
self.impacted_accounts_to_delete.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for UpdateCaseInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateCaseInput");
formatter.field("case_id", &self.case_id);
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
formatter.field("engagement_type", &self.engagement_type);
formatter.field("watchers_to_add", &self.watchers_to_add);
formatter.field("watchers_to_delete", &self.watchers_to_delete);
formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
formatter.finish()
}
}
impl UpdateCaseInput {
pub fn builder() -> crate::operation::update_case::builders::UpdateCaseInputBuilder {
crate::operation::update_case::builders::UpdateCaseInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateCaseInputBuilder {
pub(crate) case_id: ::std::option::Option<::std::string::String>,
pub(crate) title: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) engagement_type: ::std::option::Option<crate::types::EngagementType>,
pub(crate) watchers_to_add: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
pub(crate) watchers_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
pub(crate) threat_actor_ip_addresses_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
pub(crate) threat_actor_ip_addresses_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
pub(crate) impacted_services_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) impacted_services_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) impacted_aws_regions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
pub(crate) impacted_aws_regions_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
pub(crate) impacted_accounts_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) impacted_accounts_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateCaseInputBuilder {
pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.case_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.case_id = input;
self
}
pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
&self.case_id
}
pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.title = ::std::option::Option::Some(input.into());
self
}
pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.title = input;
self
}
pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
&self.title
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn reported_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.reported_incident_start_date = ::std::option::Option::Some(input);
self
}
pub fn set_reported_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.reported_incident_start_date = input;
self
}
pub fn get_reported_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.reported_incident_start_date
}
pub fn actual_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.actual_incident_start_date = ::std::option::Option::Some(input);
self
}
pub fn set_actual_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.actual_incident_start_date = input;
self
}
pub fn get_actual_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.actual_incident_start_date
}
pub fn engagement_type(mut self, input: crate::types::EngagementType) -> Self {
self.engagement_type = ::std::option::Option::Some(input);
self
}
pub fn set_engagement_type(mut self, input: ::std::option::Option<crate::types::EngagementType>) -> Self {
self.engagement_type = input;
self
}
pub fn get_engagement_type(&self) -> &::std::option::Option<crate::types::EngagementType> {
&self.engagement_type
}
pub fn watchers_to_add(mut self, input: crate::types::Watcher) -> Self {
let mut v = self.watchers_to_add.unwrap_or_default();
v.push(input);
self.watchers_to_add = ::std::option::Option::Some(v);
self
}
pub fn set_watchers_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
self.watchers_to_add = input;
self
}
pub fn get_watchers_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
&self.watchers_to_add
}
pub fn watchers_to_delete(mut self, input: crate::types::Watcher) -> Self {
let mut v = self.watchers_to_delete.unwrap_or_default();
v.push(input);
self.watchers_to_delete = ::std::option::Option::Some(v);
self
}
pub fn set_watchers_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
self.watchers_to_delete = input;
self
}
pub fn get_watchers_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
&self.watchers_to_delete
}
pub fn threat_actor_ip_addresses_to_add(mut self, input: crate::types::ThreatActorIp) -> Self {
let mut v = self.threat_actor_ip_addresses_to_add.unwrap_or_default();
v.push(input);
self.threat_actor_ip_addresses_to_add = ::std::option::Option::Some(v);
self
}
pub fn set_threat_actor_ip_addresses_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
self.threat_actor_ip_addresses_to_add = input;
self
}
pub fn get_threat_actor_ip_addresses_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
&self.threat_actor_ip_addresses_to_add
}
pub fn threat_actor_ip_addresses_to_delete(mut self, input: crate::types::ThreatActorIp) -> Self {
let mut v = self.threat_actor_ip_addresses_to_delete.unwrap_or_default();
v.push(input);
self.threat_actor_ip_addresses_to_delete = ::std::option::Option::Some(v);
self
}
pub fn set_threat_actor_ip_addresses_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
self.threat_actor_ip_addresses_to_delete = input;
self
}
pub fn get_threat_actor_ip_addresses_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
&self.threat_actor_ip_addresses_to_delete
}
pub fn impacted_services_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.impacted_services_to_add.unwrap_or_default();
v.push(input.into());
self.impacted_services_to_add = ::std::option::Option::Some(v);
self
}
pub fn set_impacted_services_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.impacted_services_to_add = input;
self
}
pub fn get_impacted_services_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.impacted_services_to_add
}
pub fn impacted_services_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.impacted_services_to_delete.unwrap_or_default();
v.push(input.into());
self.impacted_services_to_delete = ::std::option::Option::Some(v);
self
}
pub fn set_impacted_services_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.impacted_services_to_delete = input;
self
}
pub fn get_impacted_services_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.impacted_services_to_delete
}
pub fn impacted_aws_regions_to_add(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
let mut v = self.impacted_aws_regions_to_add.unwrap_or_default();
v.push(input);
self.impacted_aws_regions_to_add = ::std::option::Option::Some(v);
self
}
pub fn set_impacted_aws_regions_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
self.impacted_aws_regions_to_add = input;
self
}
pub fn get_impacted_aws_regions_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
&self.impacted_aws_regions_to_add
}
pub fn impacted_aws_regions_to_delete(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
let mut v = self.impacted_aws_regions_to_delete.unwrap_or_default();
v.push(input);
self.impacted_aws_regions_to_delete = ::std::option::Option::Some(v);
self
}
pub fn set_impacted_aws_regions_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
self.impacted_aws_regions_to_delete = input;
self
}
pub fn get_impacted_aws_regions_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
&self.impacted_aws_regions_to_delete
}
pub fn impacted_accounts_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.impacted_accounts_to_add.unwrap_or_default();
v.push(input.into());
self.impacted_accounts_to_add = ::std::option::Option::Some(v);
self
}
pub fn set_impacted_accounts_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.impacted_accounts_to_add = input;
self
}
pub fn get_impacted_accounts_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.impacted_accounts_to_add
}
pub fn impacted_accounts_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.impacted_accounts_to_delete.unwrap_or_default();
v.push(input.into());
self.impacted_accounts_to_delete = ::std::option::Option::Some(v);
self
}
pub fn set_impacted_accounts_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.impacted_accounts_to_delete = input;
self
}
pub fn get_impacted_accounts_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.impacted_accounts_to_delete
}
pub fn build(self) -> ::std::result::Result<crate::operation::update_case::UpdateCaseInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_case::UpdateCaseInput {
case_id: self.case_id,
title: self.title,
description: self.description,
reported_incident_start_date: self.reported_incident_start_date,
actual_incident_start_date: self.actual_incident_start_date,
engagement_type: self.engagement_type,
watchers_to_add: self.watchers_to_add,
watchers_to_delete: self.watchers_to_delete,
threat_actor_ip_addresses_to_add: self.threat_actor_ip_addresses_to_add,
threat_actor_ip_addresses_to_delete: self.threat_actor_ip_addresses_to_delete,
impacted_services_to_add: self.impacted_services_to_add,
impacted_services_to_delete: self.impacted_services_to_delete,
impacted_aws_regions_to_add: self.impacted_aws_regions_to_add,
impacted_aws_regions_to_delete: self.impacted_aws_regions_to_delete,
impacted_accounts_to_add: self.impacted_accounts_to_add,
impacted_accounts_to_delete: self.impacted_accounts_to_delete,
})
}
}
impl ::std::fmt::Debug for UpdateCaseInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateCaseInputBuilder");
formatter.field("case_id", &self.case_id);
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
formatter.field("engagement_type", &self.engagement_type);
formatter.field("watchers_to_add", &self.watchers_to_add);
formatter.field("watchers_to_delete", &self.watchers_to_delete);
formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
formatter.finish()
}
}