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 StartExperimentRunInput {
    /// <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>A description of this experiment run.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The percentage of the target audience to expose to treatments. Set to 0 to validate the experiment before exposing production users.</p>
    pub exposure_percentage: ::std::option::Option<f32>,
    /// <p>Treatment assignment overrides that assign specific entity IDs to treatments directly, bypassing random assignment.</p>
    pub treatment_overrides: ::std::option::Option<crate::types::TreatmentOverrides>,
    /// <p>The tags to assign to the experiment run.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The deployment parameters for the experiment run, including a KMS key identifier for encryption.</p>
    pub deployment_parameters: ::std::option::Option<crate::types::DeploymentParameters>,
}
impl StartExperimentRunInput {
    /// <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>A description of this experiment run.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The percentage of the target audience to expose to treatments. Set to 0 to validate the experiment before exposing production users.</p>
    pub fn exposure_percentage(&self) -> ::std::option::Option<f32> {
        self.exposure_percentage
    }
    /// <p>Treatment assignment overrides that assign specific entity IDs to treatments directly, bypassing random assignment.</p>
    pub fn treatment_overrides(&self) -> ::std::option::Option<&crate::types::TreatmentOverrides> {
        self.treatment_overrides.as_ref()
    }
    /// <p>The tags to assign to the experiment run.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The deployment parameters for the experiment run, including a KMS key identifier for encryption.</p>
    pub fn deployment_parameters(&self) -> ::std::option::Option<&crate::types::DeploymentParameters> {
        self.deployment_parameters.as_ref()
    }
}
impl StartExperimentRunInput {
    /// Creates a new builder-style object to manufacture [`StartExperimentRunInput`](crate::operation::start_experiment_run::StartExperimentRunInput).
    pub fn builder() -> crate::operation::start_experiment_run::builders::StartExperimentRunInputBuilder {
        crate::operation::start_experiment_run::builders::StartExperimentRunInputBuilder::default()
    }
}

/// A builder for [`StartExperimentRunInput`](crate::operation::start_experiment_run::StartExperimentRunInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartExperimentRunInputBuilder {
    pub(crate) application_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) experiment_definition_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) exposure_percentage: ::std::option::Option<f32>,
    pub(crate) treatment_overrides: ::std::option::Option<crate::types::TreatmentOverrides>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) deployment_parameters: ::std::option::Option<crate::types::DeploymentParameters>,
}
impl StartExperimentRunInputBuilder {
    /// <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
    }
    /// <p>A description of this experiment run.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of this experiment run.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of this experiment run.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The percentage of the target audience to expose to treatments. Set to 0 to validate the experiment before exposing production users.</p>
    pub fn exposure_percentage(mut self, input: f32) -> Self {
        self.exposure_percentage = ::std::option::Option::Some(input);
        self
    }
    /// <p>The percentage of the target audience to expose to treatments. Set to 0 to validate the experiment before exposing production users.</p>
    pub fn set_exposure_percentage(mut self, input: ::std::option::Option<f32>) -> Self {
        self.exposure_percentage = input;
        self
    }
    /// <p>The percentage of the target audience to expose to treatments. Set to 0 to validate the experiment before exposing production users.</p>
    pub fn get_exposure_percentage(&self) -> &::std::option::Option<f32> {
        &self.exposure_percentage
    }
    /// <p>Treatment assignment overrides that assign specific entity IDs to treatments directly, bypassing random assignment.</p>
    pub fn treatment_overrides(mut self, input: crate::types::TreatmentOverrides) -> Self {
        self.treatment_overrides = ::std::option::Option::Some(input);
        self
    }
    /// <p>Treatment assignment overrides that assign specific entity IDs to treatments directly, bypassing random assignment.</p>
    pub fn set_treatment_overrides(mut self, input: ::std::option::Option<crate::types::TreatmentOverrides>) -> Self {
        self.treatment_overrides = input;
        self
    }
    /// <p>Treatment assignment overrides that assign specific entity IDs to treatments directly, bypassing random assignment.</p>
    pub fn get_treatment_overrides(&self) -> &::std::option::Option<crate::types::TreatmentOverrides> {
        &self.treatment_overrides
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to assign to the experiment run.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags to assign to the experiment run.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags to assign to the experiment run.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The deployment parameters for the experiment run, including a KMS key identifier for encryption.</p>
    pub fn deployment_parameters(mut self, input: crate::types::DeploymentParameters) -> Self {
        self.deployment_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The deployment parameters for the experiment run, including a KMS key identifier for encryption.</p>
    pub fn set_deployment_parameters(mut self, input: ::std::option::Option<crate::types::DeploymentParameters>) -> Self {
        self.deployment_parameters = input;
        self
    }
    /// <p>The deployment parameters for the experiment run, including a KMS key identifier for encryption.</p>
    pub fn get_deployment_parameters(&self) -> &::std::option::Option<crate::types::DeploymentParameters> {
        &self.deployment_parameters
    }
    /// Consumes the builder and constructs a [`StartExperimentRunInput`](crate::operation::start_experiment_run::StartExperimentRunInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_experiment_run::StartExperimentRunInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_experiment_run::StartExperimentRunInput {
            application_identifier: self.application_identifier,
            experiment_definition_identifier: self.experiment_definition_identifier,
            description: self.description,
            exposure_percentage: self.exposure_percentage,
            treatment_overrides: self.treatment_overrides,
            tags: self.tags,
            deployment_parameters: self.deployment_parameters,
        })
    }
}