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.

/// <p>Describes an experiment run, including its status, exposure settings, and treatment overrides.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateExperimentRunOutput {
    /// <p>The application ID.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The experiment definition ID.</p>
    pub experiment_definition_id: ::std::option::Option<::std::string::String>,
    /// <p>The experiment run number.</p>
    pub run: i32,
    /// <p>A description of the experiment run.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the experiment run. Valid values: <code>RUNNING</code>, <code>DONE</code>.</p>
    pub status: ::std::option::Option<crate::types::ExperimentRunStatus>,
    /// <p>The percentage of the target audience exposed to treatments.</p>
    pub exposure_percentage: ::std::option::Option<f32>,
    /// <p>Treatment assignment overrides that assign specific entity IDs to treatments.</p>
    pub treatment_overrides: ::std::option::Option<crate::types::TreatmentOverrides>,
    /// <p>The result of the experiment run, including the executive summary and launch decision rationale.</p>
    pub result: ::std::option::Option<crate::types::ExperimentRunResult>,
    /// <p>The date and time the experiment run started, in ISO 8601 format.</p>
    pub started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the experiment run was last updated, in ISO 8601 format.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the experiment run ended, in ISO 8601 format.</p>
    pub ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A snapshot of the experiment definition at the time the run was started.</p>
    pub experiment_definition_snapshot: ::std::option::Option<crate::types::ExperimentDefinitionSnapshot>,
    _request_id: Option<String>,
}
impl UpdateExperimentRunOutput {
    /// <p>The application ID.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The experiment definition ID.</p>
    pub fn experiment_definition_id(&self) -> ::std::option::Option<&str> {
        self.experiment_definition_id.as_deref()
    }
    /// <p>The experiment run number.</p>
    pub fn run(&self) -> i32 {
        self.run
    }
    /// <p>A description of the experiment run.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The current status of the experiment run. Valid values: <code>RUNNING</code>, <code>DONE</code>.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ExperimentRunStatus> {
        self.status.as_ref()
    }
    /// <p>The percentage of the target audience exposed to treatments.</p>
    pub fn exposure_percentage(&self) -> ::std::option::Option<f32> {
        self.exposure_percentage
    }
    /// <p>Treatment assignment overrides that assign specific entity IDs to treatments.</p>
    pub fn treatment_overrides(&self) -> ::std::option::Option<&crate::types::TreatmentOverrides> {
        self.treatment_overrides.as_ref()
    }
    /// <p>The result of the experiment run, including the executive summary and launch decision rationale.</p>
    pub fn result(&self) -> ::std::option::Option<&crate::types::ExperimentRunResult> {
        self.result.as_ref()
    }
    /// <p>The date and time the experiment run started, in ISO 8601 format.</p>
    pub fn started_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.started_at.as_ref()
    }
    /// <p>The date and time the experiment run was last updated, in ISO 8601 format.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The date and time the experiment run ended, in ISO 8601 format.</p>
    pub fn ended_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.ended_at.as_ref()
    }
    /// <p>A snapshot of the experiment definition at the time the run was started.</p>
    pub fn experiment_definition_snapshot(&self) -> ::std::option::Option<&crate::types::ExperimentDefinitionSnapshot> {
        self.experiment_definition_snapshot.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateExperimentRunOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateExperimentRunOutput {
    /// Creates a new builder-style object to manufacture [`UpdateExperimentRunOutput`](crate::operation::update_experiment_run::UpdateExperimentRunOutput).
    pub fn builder() -> crate::operation::update_experiment_run::builders::UpdateExperimentRunOutputBuilder {
        crate::operation::update_experiment_run::builders::UpdateExperimentRunOutputBuilder::default()
    }
}

/// A builder for [`UpdateExperimentRunOutput`](crate::operation::update_experiment_run::UpdateExperimentRunOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateExperimentRunOutputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) experiment_definition_id: ::std::option::Option<::std::string::String>,
    pub(crate) run: ::std::option::Option<i32>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ExperimentRunStatus>,
    pub(crate) exposure_percentage: ::std::option::Option<f32>,
    pub(crate) treatment_overrides: ::std::option::Option<crate::types::TreatmentOverrides>,
    pub(crate) result: ::std::option::Option<crate::types::ExperimentRunResult>,
    pub(crate) started_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) experiment_definition_snapshot: ::std::option::Option<crate::types::ExperimentDefinitionSnapshot>,
    _request_id: Option<String>,
}
impl UpdateExperimentRunOutputBuilder {
    /// <p>The application ID.</p>
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The application ID.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The application ID.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>The experiment definition ID.</p>
    pub fn experiment_definition_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.experiment_definition_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The experiment definition ID.</p>
    pub fn set_experiment_definition_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.experiment_definition_id = input;
        self
    }
    /// <p>The experiment definition ID.</p>
    pub fn get_experiment_definition_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.experiment_definition_id
    }
    /// <p>The experiment run number.</p>
    pub fn run(mut self, input: i32) -> Self {
        self.run = ::std::option::Option::Some(input);
        self
    }
    /// <p>The experiment run number.</p>
    pub fn set_run(mut self, input: ::std::option::Option<i32>) -> Self {
        self.run = input;
        self
    }
    /// <p>The experiment run number.</p>
    pub fn get_run(&self) -> &::std::option::Option<i32> {
        &self.run
    }
    /// <p>A description of the 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 the 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 the experiment run.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The current status of the experiment run. Valid values: <code>RUNNING</code>, <code>DONE</code>.</p>
    pub fn status(mut self, input: crate::types::ExperimentRunStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the experiment run. Valid values: <code>RUNNING</code>, <code>DONE</code>.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ExperimentRunStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the experiment run. Valid values: <code>RUNNING</code>, <code>DONE</code>.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ExperimentRunStatus> {
        &self.status
    }
    /// <p>The percentage of the target audience exposed to treatments.</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 exposed to treatments.</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 exposed to treatments.</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.</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.</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.</p>
    pub fn get_treatment_overrides(&self) -> &::std::option::Option<crate::types::TreatmentOverrides> {
        &self.treatment_overrides
    }
    /// <p>The result of the experiment run, including the executive summary and launch decision rationale.</p>
    pub fn result(mut self, input: crate::types::ExperimentRunResult) -> Self {
        self.result = ::std::option::Option::Some(input);
        self
    }
    /// <p>The result of the experiment run, including the executive summary and launch decision rationale.</p>
    pub fn set_result(mut self, input: ::std::option::Option<crate::types::ExperimentRunResult>) -> Self {
        self.result = input;
        self
    }
    /// <p>The result of the experiment run, including the executive summary and launch decision rationale.</p>
    pub fn get_result(&self) -> &::std::option::Option<crate::types::ExperimentRunResult> {
        &self.result
    }
    /// <p>The date and time the experiment run started, in ISO 8601 format.</p>
    pub fn started_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.started_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the experiment run started, in ISO 8601 format.</p>
    pub fn set_started_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.started_at = input;
        self
    }
    /// <p>The date and time the experiment run started, in ISO 8601 format.</p>
    pub fn get_started_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.started_at
    }
    /// <p>The date and time the experiment run was last updated, in ISO 8601 format.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the experiment run was last updated, in ISO 8601 format.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The date and time the experiment run was last updated, in ISO 8601 format.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The date and time the experiment run ended, in ISO 8601 format.</p>
    pub fn ended_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.ended_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the experiment run ended, in ISO 8601 format.</p>
    pub fn set_ended_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.ended_at = input;
        self
    }
    /// <p>The date and time the experiment run ended, in ISO 8601 format.</p>
    pub fn get_ended_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.ended_at
    }
    /// <p>A snapshot of the experiment definition at the time the run was started.</p>
    pub fn experiment_definition_snapshot(mut self, input: crate::types::ExperimentDefinitionSnapshot) -> Self {
        self.experiment_definition_snapshot = ::std::option::Option::Some(input);
        self
    }
    /// <p>A snapshot of the experiment definition at the time the run was started.</p>
    pub fn set_experiment_definition_snapshot(mut self, input: ::std::option::Option<crate::types::ExperimentDefinitionSnapshot>) -> Self {
        self.experiment_definition_snapshot = input;
        self
    }
    /// <p>A snapshot of the experiment definition at the time the run was started.</p>
    pub fn get_experiment_definition_snapshot(&self) -> &::std::option::Option<crate::types::ExperimentDefinitionSnapshot> {
        &self.experiment_definition_snapshot
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`UpdateExperimentRunOutput`](crate::operation::update_experiment_run::UpdateExperimentRunOutput).
    pub fn build(self) -> crate::operation::update_experiment_run::UpdateExperimentRunOutput {
        crate::operation::update_experiment_run::UpdateExperimentRunOutput {
            application_id: self.application_id,
            experiment_definition_id: self.experiment_definition_id,
            run: self.run.unwrap_or_default(),
            description: self.description,
            status: self.status,
            exposure_percentage: self.exposure_percentage,
            treatment_overrides: self.treatment_overrides,
            result: self.result,
            started_at: self.started_at,
            updated_at: self.updated_at,
            ended_at: self.ended_at,
            experiment_definition_snapshot: self.experiment_definition_snapshot,
            _request_id: self._request_id,
        }
    }
}