aws_sdk_datazone/operation/reject_predictions/
_reject_predictions_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RejectPredictionsInput {
pub domain_identifier: ::std::option::Option<::std::string::String>,
pub identifier: ::std::option::Option<::std::string::String>,
pub revision: ::std::option::Option<::std::string::String>,
pub reject_rule: ::std::option::Option<crate::types::RejectRule>,
pub reject_choices: ::std::option::Option<::std::vec::Vec<crate::types::RejectChoice>>,
pub client_token: ::std::option::Option<::std::string::String>,
}
impl RejectPredictionsInput {
pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
self.domain_identifier.as_deref()
}
pub fn identifier(&self) -> ::std::option::Option<&str> {
self.identifier.as_deref()
}
pub fn revision(&self) -> ::std::option::Option<&str> {
self.revision.as_deref()
}
pub fn reject_rule(&self) -> ::std::option::Option<&crate::types::RejectRule> {
self.reject_rule.as_ref()
}
pub fn reject_choices(&self) -> &[crate::types::RejectChoice] {
self.reject_choices.as_deref().unwrap_or_default()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl RejectPredictionsInput {
pub fn builder() -> crate::operation::reject_predictions::builders::RejectPredictionsInputBuilder {
crate::operation::reject_predictions::builders::RejectPredictionsInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RejectPredictionsInputBuilder {
pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
pub(crate) identifier: ::std::option::Option<::std::string::String>,
pub(crate) revision: ::std::option::Option<::std::string::String>,
pub(crate) reject_rule: ::std::option::Option<crate::types::RejectRule>,
pub(crate) reject_choices: ::std::option::Option<::std::vec::Vec<crate::types::RejectChoice>>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl RejectPredictionsInputBuilder {
pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_identifier = input;
self
}
pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_identifier
}
pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.identifier = input;
self
}
pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.identifier
}
pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revision = ::std::option::Option::Some(input.into());
self
}
pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision = input;
self
}
pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
&self.revision
}
pub fn reject_rule(mut self, input: crate::types::RejectRule) -> Self {
self.reject_rule = ::std::option::Option::Some(input);
self
}
pub fn set_reject_rule(mut self, input: ::std::option::Option<crate::types::RejectRule>) -> Self {
self.reject_rule = input;
self
}
pub fn get_reject_rule(&self) -> &::std::option::Option<crate::types::RejectRule> {
&self.reject_rule
}
pub fn reject_choices(mut self, input: crate::types::RejectChoice) -> Self {
let mut v = self.reject_choices.unwrap_or_default();
v.push(input);
self.reject_choices = ::std::option::Option::Some(v);
self
}
pub fn set_reject_choices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RejectChoice>>) -> Self {
self.reject_choices = input;
self
}
pub fn get_reject_choices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RejectChoice>> {
&self.reject_choices
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::reject_predictions::RejectPredictionsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::reject_predictions::RejectPredictionsInput {
domain_identifier: self.domain_identifier,
identifier: self.identifier,
revision: self.revision,
reject_rule: self.reject_rule,
reject_choices: self.reject_choices,
client_token: self.client_token,
})
}
}