#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StartRunInput {
#[doc(hidden)]
pub workflow_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub workflow_type: std::option::Option<crate::types::WorkflowType>,
#[doc(hidden)]
pub run_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub run_group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub priority: std::option::Option<i32>,
#[doc(hidden)]
pub parameters: std::option::Option<aws_smithy_types::Document>,
#[doc(hidden)]
pub storage_capacity: std::option::Option<i32>,
#[doc(hidden)]
pub output_uri: std::option::Option<std::string::String>,
#[doc(hidden)]
pub log_level: std::option::Option<crate::types::RunLogLevel>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
}
impl StartRunInput {
pub fn workflow_id(&self) -> std::option::Option<&str> {
self.workflow_id.as_deref()
}
pub fn workflow_type(&self) -> std::option::Option<&crate::types::WorkflowType> {
self.workflow_type.as_ref()
}
pub fn run_id(&self) -> std::option::Option<&str> {
self.run_id.as_deref()
}
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn run_group_id(&self) -> std::option::Option<&str> {
self.run_group_id.as_deref()
}
pub fn priority(&self) -> std::option::Option<i32> {
self.priority
}
pub fn parameters(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.parameters.as_ref()
}
pub fn storage_capacity(&self) -> std::option::Option<i32> {
self.storage_capacity
}
pub fn output_uri(&self) -> std::option::Option<&str> {
self.output_uri.as_deref()
}
pub fn log_level(&self) -> std::option::Option<&crate::types::RunLogLevel> {
self.log_level.as_ref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
}
impl StartRunInput {
pub fn builder() -> crate::operation::start_run::builders::StartRunInputBuilder {
crate::operation::start_run::builders::StartRunInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct StartRunInputBuilder {
pub(crate) workflow_id: std::option::Option<std::string::String>,
pub(crate) workflow_type: std::option::Option<crate::types::WorkflowType>,
pub(crate) run_id: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) run_group_id: std::option::Option<std::string::String>,
pub(crate) priority: std::option::Option<i32>,
pub(crate) parameters: std::option::Option<aws_smithy_types::Document>,
pub(crate) storage_capacity: std::option::Option<i32>,
pub(crate) output_uri: std::option::Option<std::string::String>,
pub(crate) log_level: std::option::Option<crate::types::RunLogLevel>,
pub(crate) tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
pub(crate) request_id: std::option::Option<std::string::String>,
}
impl StartRunInputBuilder {
pub fn workflow_id(mut self, input: impl Into<std::string::String>) -> Self {
self.workflow_id = Some(input.into());
self
}
pub fn set_workflow_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.workflow_id = input;
self
}
pub fn workflow_type(mut self, input: crate::types::WorkflowType) -> Self {
self.workflow_type = Some(input);
self
}
pub fn set_workflow_type(
mut self,
input: std::option::Option<crate::types::WorkflowType>,
) -> Self {
self.workflow_type = input;
self
}
pub fn run_id(mut self, input: impl Into<std::string::String>) -> Self {
self.run_id = Some(input.into());
self
}
pub fn set_run_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.run_id = input;
self
}
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn run_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.run_group_id = Some(input.into());
self
}
pub fn set_run_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.run_group_id = input;
self
}
pub fn priority(mut self, input: i32) -> Self {
self.priority = Some(input);
self
}
pub fn set_priority(mut self, input: std::option::Option<i32>) -> Self {
self.priority = input;
self
}
pub fn parameters(mut self, input: aws_smithy_types::Document) -> Self {
self.parameters = Some(input);
self
}
pub fn set_parameters(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.parameters = input;
self
}
pub fn storage_capacity(mut self, input: i32) -> Self {
self.storage_capacity = Some(input);
self
}
pub fn set_storage_capacity(mut self, input: std::option::Option<i32>) -> Self {
self.storage_capacity = input;
self
}
pub fn output_uri(mut self, input: impl Into<std::string::String>) -> Self {
self.output_uri = Some(input.into());
self
}
pub fn set_output_uri(mut self, input: std::option::Option<std::string::String>) -> Self {
self.output_uri = input;
self
}
pub fn log_level(mut self, input: crate::types::RunLogLevel) -> Self {
self.log_level = Some(input);
self
}
pub fn set_log_level(mut self, input: std::option::Option<crate::types::RunLogLevel>) -> Self {
self.log_level = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = Some(hash_map);
self
}
pub fn set_tags(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.tags = input;
self
}
pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::start_run::StartRunInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::start_run::StartRunInput {
workflow_id: self.workflow_id,
workflow_type: self.workflow_type,
run_id: self.run_id,
role_arn: self.role_arn,
name: self.name,
run_group_id: self.run_group_id,
priority: self.priority,
parameters: self.parameters,
storage_capacity: self.storage_capacity,
output_uri: self.output_uri,
log_level: self.log_level,
tags: self.tags,
request_id: self.request_id,
})
}
}