aws-sdk-appconfig 1.110.0

AWS SDK for Amazon AppConfig
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateExperimentDefinitionInput {
    /// <p>The application ID or name.</p>
    pub application_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The experiment definition ID or name.</p>
    pub experiment_definition_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The updated list of treatments to evaluate during the experiment. Each treatment defines a distinct variation compared to the control.</p>
    pub treatments: ::std::option::Option<::std::vec::Vec<crate::types::TreatmentInput>>,
    /// <p>An updated control treatment.</p>
    pub control: ::std::option::Option<crate::types::TreatmentInput>,
    /// <p>An updated hypothesis.</p>
    pub hypothesis: ::std::option::Option<::std::string::String>,
    /// <p>An updated audience rule.</p>
    pub audience_rule: ::std::option::Option<::std::string::String>,
    /// <p>An updated audience description.</p>
    pub audience_description: ::std::option::Option<::std::string::String>,
    /// <p>Updated launch criteria.</p>
    pub launch_criteria: ::std::option::Option<::std::string::String>,
}
impl UpdateExperimentDefinitionInput {
    /// <p>The application ID or name.</p>
    pub fn application_identifier(&self) -> ::std::option::Option<&str> {
        self.application_identifier.as_deref()
    }
    /// <p>The experiment definition ID or name.</p>
    pub fn experiment_definition_identifier(&self) -> ::std::option::Option<&str> {
        self.experiment_definition_identifier.as_deref()
    }
    /// <p>The updated list of treatments to evaluate during the experiment. Each treatment defines a distinct variation compared to the control.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.treatments.is_none()`.
    pub fn treatments(&self) -> &[crate::types::TreatmentInput] {
        self.treatments.as_deref().unwrap_or_default()
    }
    /// <p>An updated control treatment.</p>
    pub fn control(&self) -> ::std::option::Option<&crate::types::TreatmentInput> {
        self.control.as_ref()
    }
    /// <p>An updated hypothesis.</p>
    pub fn hypothesis(&self) -> ::std::option::Option<&str> {
        self.hypothesis.as_deref()
    }
    /// <p>An updated audience rule.</p>
    pub fn audience_rule(&self) -> ::std::option::Option<&str> {
        self.audience_rule.as_deref()
    }
    /// <p>An updated audience description.</p>
    pub fn audience_description(&self) -> ::std::option::Option<&str> {
        self.audience_description.as_deref()
    }
    /// <p>Updated launch criteria.</p>
    pub fn launch_criteria(&self) -> ::std::option::Option<&str> {
        self.launch_criteria.as_deref()
    }
}
impl UpdateExperimentDefinitionInput {
    /// Creates a new builder-style object to manufacture [`UpdateExperimentDefinitionInput`](crate::operation::update_experiment_definition::UpdateExperimentDefinitionInput).
    pub fn builder() -> crate::operation::update_experiment_definition::builders::UpdateExperimentDefinitionInputBuilder {
        crate::operation::update_experiment_definition::builders::UpdateExperimentDefinitionInputBuilder::default()
    }
}

/// A builder for [`UpdateExperimentDefinitionInput`](crate::operation::update_experiment_definition::UpdateExperimentDefinitionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateExperimentDefinitionInputBuilder {
    pub(crate) application_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) experiment_definition_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) treatments: ::std::option::Option<::std::vec::Vec<crate::types::TreatmentInput>>,
    pub(crate) control: ::std::option::Option<crate::types::TreatmentInput>,
    pub(crate) hypothesis: ::std::option::Option<::std::string::String>,
    pub(crate) audience_rule: ::std::option::Option<::std::string::String>,
    pub(crate) audience_description: ::std::option::Option<::std::string::String>,
    pub(crate) launch_criteria: ::std::option::Option<::std::string::String>,
}
impl UpdateExperimentDefinitionInputBuilder {
    /// <p>The application ID or name.</p>
    /// This field is required.
    pub fn application_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The application ID or name.</p>
    pub fn set_application_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_identifier = input;
        self
    }
    /// <p>The application ID or name.</p>
    pub fn get_application_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_identifier
    }
    /// <p>The experiment definition ID or name.</p>
    /// This field is required.
    pub fn experiment_definition_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.experiment_definition_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The experiment definition ID or name.</p>
    pub fn set_experiment_definition_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.experiment_definition_identifier = input;
        self
    }
    /// <p>The experiment definition ID or name.</p>
    pub fn get_experiment_definition_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.experiment_definition_identifier
    }
    /// Appends an item to `treatments`.
    ///
    /// To override the contents of this collection use [`set_treatments`](Self::set_treatments).
    ///
    /// <p>The updated list of treatments to evaluate during the experiment. Each treatment defines a distinct variation compared to the control.</p>
    pub fn treatments(mut self, input: crate::types::TreatmentInput) -> Self {
        let mut v = self.treatments.unwrap_or_default();
        v.push(input);
        self.treatments = ::std::option::Option::Some(v);
        self
    }
    /// <p>The updated list of treatments to evaluate during the experiment. Each treatment defines a distinct variation compared to the control.</p>
    pub fn set_treatments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TreatmentInput>>) -> Self {
        self.treatments = input;
        self
    }
    /// <p>The updated list of treatments to evaluate during the experiment. Each treatment defines a distinct variation compared to the control.</p>
    pub fn get_treatments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TreatmentInput>> {
        &self.treatments
    }
    /// <p>An updated control treatment.</p>
    pub fn control(mut self, input: crate::types::TreatmentInput) -> Self {
        self.control = ::std::option::Option::Some(input);
        self
    }
    /// <p>An updated control treatment.</p>
    pub fn set_control(mut self, input: ::std::option::Option<crate::types::TreatmentInput>) -> Self {
        self.control = input;
        self
    }
    /// <p>An updated control treatment.</p>
    pub fn get_control(&self) -> &::std::option::Option<crate::types::TreatmentInput> {
        &self.control
    }
    /// <p>An updated hypothesis.</p>
    pub fn hypothesis(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hypothesis = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An updated hypothesis.</p>
    pub fn set_hypothesis(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hypothesis = input;
        self
    }
    /// <p>An updated hypothesis.</p>
    pub fn get_hypothesis(&self) -> &::std::option::Option<::std::string::String> {
        &self.hypothesis
    }
    /// <p>An updated audience rule.</p>
    pub fn audience_rule(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.audience_rule = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An updated audience rule.</p>
    pub fn set_audience_rule(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.audience_rule = input;
        self
    }
    /// <p>An updated audience rule.</p>
    pub fn get_audience_rule(&self) -> &::std::option::Option<::std::string::String> {
        &self.audience_rule
    }
    /// <p>An updated audience description.</p>
    pub fn audience_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.audience_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An updated audience description.</p>
    pub fn set_audience_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.audience_description = input;
        self
    }
    /// <p>An updated audience description.</p>
    pub fn get_audience_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.audience_description
    }
    /// <p>Updated launch criteria.</p>
    pub fn launch_criteria(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.launch_criteria = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Updated launch criteria.</p>
    pub fn set_launch_criteria(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.launch_criteria = input;
        self
    }
    /// <p>Updated launch criteria.</p>
    pub fn get_launch_criteria(&self) -> &::std::option::Option<::std::string::String> {
        &self.launch_criteria
    }
    /// Consumes the builder and constructs a [`UpdateExperimentDefinitionInput`](crate::operation::update_experiment_definition::UpdateExperimentDefinitionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_experiment_definition::UpdateExperimentDefinitionInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_experiment_definition::UpdateExperimentDefinitionInput {
            application_identifier: self.application_identifier,
            experiment_definition_identifier: self.experiment_definition_identifier,
            treatments: self.treatments,
            control: self.control,
            hypothesis: self.hypothesis,
            audience_rule: self.audience_rule,
            audience_description: self.audience_description,
            launch_criteria: self.launch_criteria,
        })
    }
}