aws-sdk-sagemaker 1.190.0

AWS SDK for Amazon SageMaker Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Defines the stairs traffic pattern for an Inference Recommender load test. This pattern type consists of multiple steps where the number of users increases at each step.</p>
/// <p>Specify either the stairs or phases traffic pattern.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Stairs {
    /// <p>Defines how long each traffic step should be.</p>
    pub duration_in_seconds: ::std::option::Option<i32>,
    /// <p>Specifies how many steps to perform during traffic.</p>
    pub number_of_steps: ::std::option::Option<i32>,
    /// <p>Specifies how many new users to spawn in each step.</p>
    pub users_per_step: ::std::option::Option<i32>,
}
impl Stairs {
    /// <p>Defines how long each traffic step should be.</p>
    pub fn duration_in_seconds(&self) -> ::std::option::Option<i32> {
        self.duration_in_seconds
    }
    /// <p>Specifies how many steps to perform during traffic.</p>
    pub fn number_of_steps(&self) -> ::std::option::Option<i32> {
        self.number_of_steps
    }
    /// <p>Specifies how many new users to spawn in each step.</p>
    pub fn users_per_step(&self) -> ::std::option::Option<i32> {
        self.users_per_step
    }
}
impl Stairs {
    /// Creates a new builder-style object to manufacture [`Stairs`](crate::types::Stairs).
    pub fn builder() -> crate::types::builders::StairsBuilder {
        crate::types::builders::StairsBuilder::default()
    }
}

/// A builder for [`Stairs`](crate::types::Stairs).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StairsBuilder {
    pub(crate) duration_in_seconds: ::std::option::Option<i32>,
    pub(crate) number_of_steps: ::std::option::Option<i32>,
    pub(crate) users_per_step: ::std::option::Option<i32>,
}
impl StairsBuilder {
    /// <p>Defines how long each traffic step should be.</p>
    pub fn duration_in_seconds(mut self, input: i32) -> Self {
        self.duration_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>Defines how long each traffic step should be.</p>
    pub fn set_duration_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.duration_in_seconds = input;
        self
    }
    /// <p>Defines how long each traffic step should be.</p>
    pub fn get_duration_in_seconds(&self) -> &::std::option::Option<i32> {
        &self.duration_in_seconds
    }
    /// <p>Specifies how many steps to perform during traffic.</p>
    pub fn number_of_steps(mut self, input: i32) -> Self {
        self.number_of_steps = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies how many steps to perform during traffic.</p>
    pub fn set_number_of_steps(mut self, input: ::std::option::Option<i32>) -> Self {
        self.number_of_steps = input;
        self
    }
    /// <p>Specifies how many steps to perform during traffic.</p>
    pub fn get_number_of_steps(&self) -> &::std::option::Option<i32> {
        &self.number_of_steps
    }
    /// <p>Specifies how many new users to spawn in each step.</p>
    pub fn users_per_step(mut self, input: i32) -> Self {
        self.users_per_step = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies how many new users to spawn in each step.</p>
    pub fn set_users_per_step(mut self, input: ::std::option::Option<i32>) -> Self {
        self.users_per_step = input;
        self
    }
    /// <p>Specifies how many new users to spawn in each step.</p>
    pub fn get_users_per_step(&self) -> &::std::option::Option<i32> {
        &self.users_per_step
    }
    /// Consumes the builder and constructs a [`Stairs`](crate::types::Stairs).
    pub fn build(self) -> crate::types::Stairs {
        crate::types::Stairs {
            duration_in_seconds: self.duration_in_seconds,
            number_of_steps: self.number_of_steps,
            users_per_step: self.users_per_step,
        }
    }
}