#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RampExperimentInput {
#[allow(missing_docs)] pub workspace_id: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub org_id: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub id: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub change_reason: ::std::option::Option<::std::string::String>,
#[allow(missing_docs)] pub traffic_percentage: ::std::option::Option<i32>,
}
impl RampExperimentInput {
#[allow(missing_docs)] pub fn workspace_id(&self) -> ::std::option::Option<&str> {
self.workspace_id.as_deref()
}
#[allow(missing_docs)] pub fn org_id(&self) -> ::std::option::Option<&str> {
self.org_id.as_deref()
}
#[allow(missing_docs)] pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
#[allow(missing_docs)] pub fn change_reason(&self) -> ::std::option::Option<&str> {
self.change_reason.as_deref()
}
#[allow(missing_docs)] pub fn traffic_percentage(&self) -> ::std::option::Option<i32> {
self.traffic_percentage
}
}
impl RampExperimentInput {
pub fn builder() -> crate::operation::ramp_experiment::builders::RampExperimentInputBuilder {
crate::operation::ramp_experiment::builders::RampExperimentInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RampExperimentInputBuilder {
pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
pub(crate) org_id: ::std::option::Option<::std::string::String>,
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) change_reason: ::std::option::Option<::std::string::String>,
pub(crate) traffic_percentage: ::std::option::Option<i32>,
}
impl RampExperimentInputBuilder {
#[allow(missing_docs)] pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workspace_id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workspace_id = input; self
}
#[allow(missing_docs)] pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workspace_id
}
#[allow(missing_docs)] pub fn org_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.org_id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_org_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.org_id = input; self
}
#[allow(missing_docs)] pub fn get_org_id(&self) -> &::std::option::Option<::std::string::String> {
&self.org_id
}
#[allow(missing_docs)] pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input; self
}
#[allow(missing_docs)] pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
#[allow(missing_docs)] pub fn change_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.change_reason = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_change_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.change_reason = input; self
}
#[allow(missing_docs)] pub fn get_change_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.change_reason
}
#[allow(missing_docs)] pub fn traffic_percentage(mut self, input: i32) -> Self {
self.traffic_percentage = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_traffic_percentage(mut self, input: ::std::option::Option<i32>) -> Self {
self.traffic_percentage = input; self
}
#[allow(missing_docs)] pub fn get_traffic_percentage(&self) -> &::std::option::Option<i32> {
&self.traffic_percentage
}
pub fn build(self) -> ::std::result::Result<crate::operation::ramp_experiment::RampExperimentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(
crate::operation::ramp_experiment::RampExperimentInput {
workspace_id: self.workspace_id
,
org_id: self.org_id
,
id: self.id
,
change_reason: self.change_reason
,
traffic_percentage: self.traffic_percentage
,
}
)
}
}