#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WorkflowStepGroupSummary {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub owner: std::option::Option<crate::model::Owner>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::StepGroupStatus>,
#[doc(hidden)]
pub previous: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl WorkflowStepGroupSummary {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
pub fn status(&self) -> std::option::Option<&crate::model::StepGroupStatus> {
self.status.as_ref()
}
pub fn previous(&self) -> std::option::Option<&[std::string::String]> {
self.previous.as_deref()
}
pub fn next(&self) -> std::option::Option<&[std::string::String]> {
self.next.as_deref()
}
}
pub mod workflow_step_group_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) owner: std::option::Option<crate::model::Owner>,
pub(crate) status: std::option::Option<crate::model::StepGroupStatus>,
pub(crate) previous: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = 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 owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = input;
self
}
pub fn status(mut self, input: crate::model::StepGroupStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::StepGroupStatus>,
) -> Self {
self.status = input;
self
}
pub fn previous(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.previous.unwrap_or_default();
v.push(input.into());
self.previous = Some(v);
self
}
pub fn set_previous(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.previous = input;
self
}
pub fn next(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.next.unwrap_or_default();
v.push(input.into());
self.next = Some(v);
self
}
pub fn set_next(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.next = input;
self
}
pub fn build(self) -> crate::model::WorkflowStepGroupSummary {
crate::model::WorkflowStepGroupSummary {
id: self.id,
name: self.name,
owner: self.owner,
status: self.status,
previous: self.previous,
next: self.next,
}
}
}
}
impl WorkflowStepGroupSummary {
pub fn builder() -> crate::model::workflow_step_group_summary::Builder {
crate::model::workflow_step_group_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum StepGroupStatus {
#[allow(missing_docs)] AwaitingDependencies,
#[allow(missing_docs)] Completed,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] InProgress,
#[allow(missing_docs)] Paused,
#[allow(missing_docs)] Pausing,
#[allow(missing_docs)] Ready,
#[allow(missing_docs)] UserAttentionRequired,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StepGroupStatus {
fn from(s: &str) -> Self {
match s {
"AWAITING_DEPENDENCIES" => StepGroupStatus::AwaitingDependencies,
"COMPLETED" => StepGroupStatus::Completed,
"FAILED" => StepGroupStatus::Failed,
"IN_PROGRESS" => StepGroupStatus::InProgress,
"PAUSED" => StepGroupStatus::Paused,
"PAUSING" => StepGroupStatus::Pausing,
"READY" => StepGroupStatus::Ready,
"USER_ATTENTION_REQUIRED" => StepGroupStatus::UserAttentionRequired,
other => StepGroupStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for StepGroupStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StepGroupStatus::from(s))
}
}
impl StepGroupStatus {
pub fn as_str(&self) -> &str {
match self {
StepGroupStatus::AwaitingDependencies => "AWAITING_DEPENDENCIES",
StepGroupStatus::Completed => "COMPLETED",
StepGroupStatus::Failed => "FAILED",
StepGroupStatus::InProgress => "IN_PROGRESS",
StepGroupStatus::Paused => "PAUSED",
StepGroupStatus::Pausing => "PAUSING",
StepGroupStatus::Ready => "READY",
StepGroupStatus::UserAttentionRequired => "USER_ATTENTION_REQUIRED",
StepGroupStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"AWAITING_DEPENDENCIES",
"COMPLETED",
"FAILED",
"IN_PROGRESS",
"PAUSED",
"PAUSING",
"READY",
"USER_ATTENTION_REQUIRED",
]
}
}
impl AsRef<str> for StepGroupStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum Owner {
#[allow(missing_docs)] AwsManaged,
#[allow(missing_docs)] Custom,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for Owner {
fn from(s: &str) -> Self {
match s {
"AWS_MANAGED" => Owner::AwsManaged,
"CUSTOM" => Owner::Custom,
other => Owner::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for Owner {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(Owner::from(s))
}
}
impl Owner {
pub fn as_str(&self) -> &str {
match self {
Owner::AwsManaged => "AWS_MANAGED",
Owner::Custom => "CUSTOM",
Owner::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["AWS_MANAGED", "CUSTOM"]
}
}
impl AsRef<str> for Owner {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Tool {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub url: std::option::Option<std::string::String>,
}
impl Tool {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn url(&self) -> std::option::Option<&str> {
self.url.as_deref()
}
}
pub mod tool {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) url: std::option::Option<std::string::String>,
}
impl Builder {
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 url(mut self, input: impl Into<std::string::String>) -> Self {
self.url = Some(input.into());
self
}
pub fn set_url(mut self, input: std::option::Option<std::string::String>) -> Self {
self.url = input;
self
}
pub fn build(self) -> crate::model::Tool {
crate::model::Tool {
name: self.name,
url: self.url,
}
}
}
}
impl Tool {
pub fn builder() -> crate::model::tool::Builder {
crate::model::tool::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum StepStatus {
#[allow(missing_docs)] AwaitingDependencies,
#[allow(missing_docs)] Completed,
#[allow(missing_docs)] Failed,
#[allow(missing_docs)] InProgress,
#[allow(missing_docs)] Paused,
#[allow(missing_docs)] Ready,
#[allow(missing_docs)] UserAttentionRequired,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StepStatus {
fn from(s: &str) -> Self {
match s {
"AWAITING_DEPENDENCIES" => StepStatus::AwaitingDependencies,
"COMPLETED" => StepStatus::Completed,
"FAILED" => StepStatus::Failed,
"IN_PROGRESS" => StepStatus::InProgress,
"PAUSED" => StepStatus::Paused,
"READY" => StepStatus::Ready,
"USER_ATTENTION_REQUIRED" => StepStatus::UserAttentionRequired,
other => StepStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for StepStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StepStatus::from(s))
}
}
impl StepStatus {
pub fn as_str(&self) -> &str {
match self {
StepStatus::AwaitingDependencies => "AWAITING_DEPENDENCIES",
StepStatus::Completed => "COMPLETED",
StepStatus::Failed => "FAILED",
StepStatus::InProgress => "IN_PROGRESS",
StepStatus::Paused => "PAUSED",
StepStatus::Ready => "READY",
StepStatus::UserAttentionRequired => "USER_ATTENTION_REQUIRED",
StepStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"AWAITING_DEPENDENCIES",
"COMPLETED",
"FAILED",
"IN_PROGRESS",
"PAUSED",
"READY",
"USER_ATTENTION_REQUIRED",
]
}
}
impl AsRef<str> for StepStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WorkflowStepSummary {
#[doc(hidden)]
pub step_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub step_action_type: std::option::Option<crate::model::StepActionType>,
#[doc(hidden)]
pub owner: std::option::Option<crate::model::Owner>,
#[doc(hidden)]
pub previous: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::StepStatus>,
#[doc(hidden)]
pub status_message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub no_of_srv_completed: std::option::Option<i32>,
#[doc(hidden)]
pub no_of_srv_failed: std::option::Option<i32>,
#[doc(hidden)]
pub total_no_of_srv: std::option::Option<i32>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub script_location: std::option::Option<std::string::String>,
}
impl WorkflowStepSummary {
pub fn step_id(&self) -> std::option::Option<&str> {
self.step_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn step_action_type(&self) -> std::option::Option<&crate::model::StepActionType> {
self.step_action_type.as_ref()
}
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
pub fn previous(&self) -> std::option::Option<&[std::string::String]> {
self.previous.as_deref()
}
pub fn next(&self) -> std::option::Option<&[std::string::String]> {
self.next.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::StepStatus> {
self.status.as_ref()
}
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
pub fn no_of_srv_completed(&self) -> std::option::Option<i32> {
self.no_of_srv_completed
}
pub fn no_of_srv_failed(&self) -> std::option::Option<i32> {
self.no_of_srv_failed
}
pub fn total_no_of_srv(&self) -> std::option::Option<i32> {
self.total_no_of_srv
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn script_location(&self) -> std::option::Option<&str> {
self.script_location.as_deref()
}
}
pub mod workflow_step_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) step_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) step_action_type: std::option::Option<crate::model::StepActionType>,
pub(crate) owner: std::option::Option<crate::model::Owner>,
pub(crate) previous: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) status: std::option::Option<crate::model::StepStatus>,
pub(crate) status_message: std::option::Option<std::string::String>,
pub(crate) no_of_srv_completed: std::option::Option<i32>,
pub(crate) no_of_srv_failed: std::option::Option<i32>,
pub(crate) total_no_of_srv: std::option::Option<i32>,
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) script_location: std::option::Option<std::string::String>,
}
impl Builder {
pub fn step_id(mut self, input: impl Into<std::string::String>) -> Self {
self.step_id = Some(input.into());
self
}
pub fn set_step_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.step_id = 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 step_action_type(mut self, input: crate::model::StepActionType) -> Self {
self.step_action_type = Some(input);
self
}
pub fn set_step_action_type(
mut self,
input: std::option::Option<crate::model::StepActionType>,
) -> Self {
self.step_action_type = input;
self
}
pub fn owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = input;
self
}
pub fn previous(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.previous.unwrap_or_default();
v.push(input.into());
self.previous = Some(v);
self
}
pub fn set_previous(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.previous = input;
self
}
pub fn next(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.next.unwrap_or_default();
v.push(input.into());
self.next = Some(v);
self
}
pub fn set_next(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.next = input;
self
}
pub fn status(mut self, input: crate::model::StepStatus) -> Self {
self.status = Some(input);
self
}
pub fn set_status(mut self, input: std::option::Option<crate::model::StepStatus>) -> Self {
self.status = input;
self
}
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
pub fn no_of_srv_completed(mut self, input: i32) -> Self {
self.no_of_srv_completed = Some(input);
self
}
pub fn set_no_of_srv_completed(mut self, input: std::option::Option<i32>) -> Self {
self.no_of_srv_completed = input;
self
}
pub fn no_of_srv_failed(mut self, input: i32) -> Self {
self.no_of_srv_failed = Some(input);
self
}
pub fn set_no_of_srv_failed(mut self, input: std::option::Option<i32>) -> Self {
self.no_of_srv_failed = input;
self
}
pub fn total_no_of_srv(mut self, input: i32) -> Self {
self.total_no_of_srv = Some(input);
self
}
pub fn set_total_no_of_srv(mut self, input: std::option::Option<i32>) -> Self {
self.total_no_of_srv = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn script_location(mut self, input: impl Into<std::string::String>) -> Self {
self.script_location = Some(input.into());
self
}
pub fn set_script_location(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.script_location = input;
self
}
pub fn build(self) -> crate::model::WorkflowStepSummary {
crate::model::WorkflowStepSummary {
step_id: self.step_id,
name: self.name,
step_action_type: self.step_action_type,
owner: self.owner,
previous: self.previous,
next: self.next,
status: self.status,
status_message: self.status_message,
no_of_srv_completed: self.no_of_srv_completed,
no_of_srv_failed: self.no_of_srv_failed,
total_no_of_srv: self.total_no_of_srv,
description: self.description,
script_location: self.script_location,
}
}
}
}
impl WorkflowStepSummary {
pub fn builder() -> crate::model::workflow_step_summary::Builder {
crate::model::workflow_step_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum StepActionType {
#[allow(missing_docs)] Automated,
#[allow(missing_docs)] Manual,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for StepActionType {
fn from(s: &str) -> Self {
match s {
"AUTOMATED" => StepActionType::Automated,
"MANUAL" => StepActionType::Manual,
other => StepActionType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for StepActionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StepActionType::from(s))
}
}
impl StepActionType {
pub fn as_str(&self) -> &str {
match self {
StepActionType::Automated => "AUTOMATED",
StepActionType::Manual => "MANUAL",
StepActionType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["AUTOMATED", "MANUAL"]
}
}
impl AsRef<str> for StepActionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WorkflowStepOutput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub data_type: std::option::Option<crate::model::DataType>,
#[doc(hidden)]
pub required: std::option::Option<bool>,
#[doc(hidden)]
pub value: std::option::Option<crate::model::WorkflowStepOutputUnion>,
}
impl WorkflowStepOutput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn data_type(&self) -> std::option::Option<&crate::model::DataType> {
self.data_type.as_ref()
}
pub fn required(&self) -> std::option::Option<bool> {
self.required
}
pub fn value(&self) -> std::option::Option<&crate::model::WorkflowStepOutputUnion> {
self.value.as_ref()
}
}
pub mod workflow_step_output {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) data_type: std::option::Option<crate::model::DataType>,
pub(crate) required: std::option::Option<bool>,
pub(crate) value: std::option::Option<crate::model::WorkflowStepOutputUnion>,
}
impl Builder {
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 data_type(mut self, input: crate::model::DataType) -> Self {
self.data_type = Some(input);
self
}
pub fn set_data_type(mut self, input: std::option::Option<crate::model::DataType>) -> Self {
self.data_type = input;
self
}
pub fn required(mut self, input: bool) -> Self {
self.required = Some(input);
self
}
pub fn set_required(mut self, input: std::option::Option<bool>) -> Self {
self.required = input;
self
}
pub fn value(mut self, input: crate::model::WorkflowStepOutputUnion) -> Self {
self.value = Some(input);
self
}
pub fn set_value(
mut self,
input: std::option::Option<crate::model::WorkflowStepOutputUnion>,
) -> Self {
self.value = input;
self
}
pub fn build(self) -> crate::model::WorkflowStepOutput {
crate::model::WorkflowStepOutput {
name: self.name,
data_type: self.data_type,
required: self.required,
value: self.value,
}
}
}
}
impl WorkflowStepOutput {
pub fn builder() -> crate::model::workflow_step_output::Builder {
crate::model::workflow_step_output::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum WorkflowStepOutputUnion {
IntegerValue(i32),
ListOfStringValue(std::vec::Vec<std::string::String>),
StringValue(std::string::String),
#[non_exhaustive]
Unknown,
}
impl WorkflowStepOutputUnion {
pub fn as_integer_value(&self) -> std::result::Result<&i32, &Self> {
if let WorkflowStepOutputUnion::IntegerValue(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_integer_value(&self) -> bool {
self.as_integer_value().is_ok()
}
pub fn as_list_of_string_value(
&self,
) -> std::result::Result<&std::vec::Vec<std::string::String>, &Self> {
if let WorkflowStepOutputUnion::ListOfStringValue(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_list_of_string_value(&self) -> bool {
self.as_list_of_string_value().is_ok()
}
pub fn as_string_value(&self) -> std::result::Result<&std::string::String, &Self> {
if let WorkflowStepOutputUnion::StringValue(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_string_value(&self) -> bool {
self.as_string_value().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum DataType {
#[allow(missing_docs)] Integer,
#[allow(missing_docs)] String,
#[allow(missing_docs)] Stringlist,
#[allow(missing_docs)] Stringmap,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for DataType {
fn from(s: &str) -> Self {
match s {
"INTEGER" => DataType::Integer,
"STRING" => DataType::String,
"STRINGLIST" => DataType::Stringlist,
"STRINGMAP" => DataType::Stringmap,
other => DataType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for DataType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(DataType::from(s))
}
}
impl DataType {
pub fn as_str(&self) -> &str {
match self {
DataType::Integer => "INTEGER",
DataType::String => "STRING",
DataType::Stringlist => "STRINGLIST",
DataType::Stringmap => "STRINGMAP",
DataType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["INTEGER", "STRING", "STRINGLIST", "STRINGMAP"]
}
}
impl AsRef<str> for DataType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct WorkflowStepAutomationConfiguration {
#[doc(hidden)]
pub script_location_s3_bucket: std::option::Option<std::string::String>,
#[doc(hidden)]
pub script_location_s3_key: std::option::Option<crate::model::PlatformScriptKey>,
#[doc(hidden)]
pub command: std::option::Option<crate::model::PlatformCommand>,
#[doc(hidden)]
pub run_environment: std::option::Option<crate::model::RunEnvironment>,
#[doc(hidden)]
pub target_type: std::option::Option<crate::model::TargetType>,
}
impl WorkflowStepAutomationConfiguration {
pub fn script_location_s3_bucket(&self) -> std::option::Option<&str> {
self.script_location_s3_bucket.as_deref()
}
pub fn script_location_s3_key(&self) -> std::option::Option<&crate::model::PlatformScriptKey> {
self.script_location_s3_key.as_ref()
}
pub fn command(&self) -> std::option::Option<&crate::model::PlatformCommand> {
self.command.as_ref()
}
pub fn run_environment(&self) -> std::option::Option<&crate::model::RunEnvironment> {
self.run_environment.as_ref()
}
pub fn target_type(&self) -> std::option::Option<&crate::model::TargetType> {
self.target_type.as_ref()
}
}
pub mod workflow_step_automation_configuration {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) script_location_s3_bucket: std::option::Option<std::string::String>,
pub(crate) script_location_s3_key: std::option::Option<crate::model::PlatformScriptKey>,
pub(crate) command: std::option::Option<crate::model::PlatformCommand>,
pub(crate) run_environment: std::option::Option<crate::model::RunEnvironment>,
pub(crate) target_type: std::option::Option<crate::model::TargetType>,
}
impl Builder {
pub fn script_location_s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.script_location_s3_bucket = Some(input.into());
self
}
pub fn set_script_location_s3_bucket(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.script_location_s3_bucket = input;
self
}
pub fn script_location_s3_key(mut self, input: crate::model::PlatformScriptKey) -> Self {
self.script_location_s3_key = Some(input);
self
}
pub fn set_script_location_s3_key(
mut self,
input: std::option::Option<crate::model::PlatformScriptKey>,
) -> Self {
self.script_location_s3_key = input;
self
}
pub fn command(mut self, input: crate::model::PlatformCommand) -> Self {
self.command = Some(input);
self
}
pub fn set_command(
mut self,
input: std::option::Option<crate::model::PlatformCommand>,
) -> Self {
self.command = input;
self
}
pub fn run_environment(mut self, input: crate::model::RunEnvironment) -> Self {
self.run_environment = Some(input);
self
}
pub fn set_run_environment(
mut self,
input: std::option::Option<crate::model::RunEnvironment>,
) -> Self {
self.run_environment = input;
self
}
pub fn target_type(mut self, input: crate::model::TargetType) -> Self {
self.target_type = Some(input);
self
}
pub fn set_target_type(
mut self,
input: std::option::Option<crate::model::TargetType>,
) -> Self {
self.target_type = input;
self
}
pub fn build(self) -> crate::model::WorkflowStepAutomationConfiguration {
crate::model::WorkflowStepAutomationConfiguration {
script_location_s3_bucket: self.script_location_s3_bucket,
script_location_s3_key: self.script_location_s3_key,
command: self.command,
run_environment: self.run_environment,
target_type: self.target_type,
}
}
}
}
impl WorkflowStepAutomationConfiguration {
pub fn builder() -> crate::model::workflow_step_automation_configuration::Builder {
crate::model::workflow_step_automation_configuration::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TargetType {
#[allow(missing_docs)] All,
#[allow(missing_docs)] None,
#[allow(missing_docs)] Single,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TargetType {
fn from(s: &str) -> Self {
match s {
"ALL" => TargetType::All,
"NONE" => TargetType::None,
"SINGLE" => TargetType::Single,
other => TargetType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for TargetType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TargetType::from(s))
}
}
impl TargetType {
pub fn as_str(&self) -> &str {
match self {
TargetType::All => "ALL",
TargetType::None => "NONE",
TargetType::Single => "SINGLE",
TargetType::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["ALL", "NONE", "SINGLE"]
}
}
impl AsRef<str> for TargetType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum RunEnvironment {
#[allow(missing_docs)] Aws,
#[allow(missing_docs)] Onpremise,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for RunEnvironment {
fn from(s: &str) -> Self {
match s {
"AWS" => RunEnvironment::Aws,
"ONPREMISE" => RunEnvironment::Onpremise,
other => RunEnvironment::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for RunEnvironment {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(RunEnvironment::from(s))
}
}
impl RunEnvironment {
pub fn as_str(&self) -> &str {
match self {
RunEnvironment::Aws => "AWS",
RunEnvironment::Onpremise => "ONPREMISE",
RunEnvironment::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["AWS", "ONPREMISE"]
}
}
impl AsRef<str> for RunEnvironment {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PlatformCommand {
#[doc(hidden)]
pub linux: std::option::Option<std::string::String>,
#[doc(hidden)]
pub windows: std::option::Option<std::string::String>,
}
impl PlatformCommand {
pub fn linux(&self) -> std::option::Option<&str> {
self.linux.as_deref()
}
pub fn windows(&self) -> std::option::Option<&str> {
self.windows.as_deref()
}
}
pub mod platform_command {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) linux: std::option::Option<std::string::String>,
pub(crate) windows: std::option::Option<std::string::String>,
}
impl Builder {
pub fn linux(mut self, input: impl Into<std::string::String>) -> Self {
self.linux = Some(input.into());
self
}
pub fn set_linux(mut self, input: std::option::Option<std::string::String>) -> Self {
self.linux = input;
self
}
pub fn windows(mut self, input: impl Into<std::string::String>) -> Self {
self.windows = Some(input.into());
self
}
pub fn set_windows(mut self, input: std::option::Option<std::string::String>) -> Self {
self.windows = input;
self
}
pub fn build(self) -> crate::model::PlatformCommand {
crate::model::PlatformCommand {
linux: self.linux,
windows: self.windows,
}
}
}
}
impl PlatformCommand {
pub fn builder() -> crate::model::platform_command::Builder {
crate::model::platform_command::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PlatformScriptKey {
#[doc(hidden)]
pub linux: std::option::Option<std::string::String>,
#[doc(hidden)]
pub windows: std::option::Option<std::string::String>,
}
impl PlatformScriptKey {
pub fn linux(&self) -> std::option::Option<&str> {
self.linux.as_deref()
}
pub fn windows(&self) -> std::option::Option<&str> {
self.windows.as_deref()
}
}
pub mod platform_script_key {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) linux: std::option::Option<std::string::String>,
pub(crate) windows: std::option::Option<std::string::String>,
}
impl Builder {
pub fn linux(mut self, input: impl Into<std::string::String>) -> Self {
self.linux = Some(input.into());
self
}
pub fn set_linux(mut self, input: std::option::Option<std::string::String>) -> Self {
self.linux = input;
self
}
pub fn windows(mut self, input: impl Into<std::string::String>) -> Self {
self.windows = Some(input.into());
self
}
pub fn set_windows(mut self, input: std::option::Option<std::string::String>) -> Self {
self.windows = input;
self
}
pub fn build(self) -> crate::model::PlatformScriptKey {
crate::model::PlatformScriptKey {
linux: self.linux,
windows: self.windows,
}
}
}
}
impl PlatformScriptKey {
pub fn builder() -> crate::model::platform_script_key::Builder {
crate::model::platform_script_key::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateStepGroupSummary {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub previous: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl TemplateStepGroupSummary {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn previous(&self) -> std::option::Option<&[std::string::String]> {
self.previous.as_deref()
}
pub fn next(&self) -> std::option::Option<&[std::string::String]> {
self.next.as_deref()
}
}
pub mod template_step_group_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) previous: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = 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 previous(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.previous.unwrap_or_default();
v.push(input.into());
self.previous = Some(v);
self
}
pub fn set_previous(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.previous = input;
self
}
pub fn next(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.next.unwrap_or_default();
v.push(input.into());
self.next = Some(v);
self
}
pub fn set_next(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.next = input;
self
}
pub fn build(self) -> crate::model::TemplateStepGroupSummary {
crate::model::TemplateStepGroupSummary {
id: self.id,
name: self.name,
previous: self.previous,
next: self.next,
}
}
}
}
impl TemplateStepGroupSummary {
pub fn builder() -> crate::model::template_step_group_summary::Builder {
crate::model::template_step_group_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateStepSummary {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub step_group_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub step_action_type: std::option::Option<crate::model::StepActionType>,
#[doc(hidden)]
pub target_type: std::option::Option<crate::model::TargetType>,
#[doc(hidden)]
pub owner: std::option::Option<crate::model::Owner>,
#[doc(hidden)]
pub previous: std::option::Option<std::vec::Vec<std::string::String>>,
#[doc(hidden)]
pub next: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl TemplateStepSummary {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn step_group_id(&self) -> std::option::Option<&str> {
self.step_group_id.as_deref()
}
pub fn template_id(&self) -> std::option::Option<&str> {
self.template_id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn step_action_type(&self) -> std::option::Option<&crate::model::StepActionType> {
self.step_action_type.as_ref()
}
pub fn target_type(&self) -> std::option::Option<&crate::model::TargetType> {
self.target_type.as_ref()
}
pub fn owner(&self) -> std::option::Option<&crate::model::Owner> {
self.owner.as_ref()
}
pub fn previous(&self) -> std::option::Option<&[std::string::String]> {
self.previous.as_deref()
}
pub fn next(&self) -> std::option::Option<&[std::string::String]> {
self.next.as_deref()
}
}
pub mod template_step_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) step_group_id: std::option::Option<std::string::String>,
pub(crate) template_id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) step_action_type: std::option::Option<crate::model::StepActionType>,
pub(crate) target_type: std::option::Option<crate::model::TargetType>,
pub(crate) owner: std::option::Option<crate::model::Owner>,
pub(crate) previous: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) next: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn step_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.step_group_id = Some(input.into());
self
}
pub fn set_step_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.step_group_id = input;
self
}
pub fn template_id(mut self, input: impl Into<std::string::String>) -> Self {
self.template_id = Some(input.into());
self
}
pub fn set_template_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.template_id = 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 step_action_type(mut self, input: crate::model::StepActionType) -> Self {
self.step_action_type = Some(input);
self
}
pub fn set_step_action_type(
mut self,
input: std::option::Option<crate::model::StepActionType>,
) -> Self {
self.step_action_type = input;
self
}
pub fn target_type(mut self, input: crate::model::TargetType) -> Self {
self.target_type = Some(input);
self
}
pub fn set_target_type(
mut self,
input: std::option::Option<crate::model::TargetType>,
) -> Self {
self.target_type = input;
self
}
pub fn owner(mut self, input: crate::model::Owner) -> Self {
self.owner = Some(input);
self
}
pub fn set_owner(mut self, input: std::option::Option<crate::model::Owner>) -> Self {
self.owner = input;
self
}
pub fn previous(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.previous.unwrap_or_default();
v.push(input.into());
self.previous = Some(v);
self
}
pub fn set_previous(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.previous = input;
self
}
pub fn next(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.next.unwrap_or_default();
v.push(input.into());
self.next = Some(v);
self
}
pub fn set_next(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.next = input;
self
}
pub fn build(self) -> crate::model::TemplateStepSummary {
crate::model::TemplateStepSummary {
id: self.id,
step_group_id: self.step_group_id,
template_id: self.template_id,
name: self.name,
step_action_type: self.step_action_type,
target_type: self.target_type,
owner: self.owner,
previous: self.previous,
next: self.next,
}
}
}
}
impl TemplateStepSummary {
pub fn builder() -> crate::model::template_step_summary::Builder {
crate::model::template_step_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StepAutomationConfiguration {
#[doc(hidden)]
pub script_location_s3_bucket: std::option::Option<std::string::String>,
#[doc(hidden)]
pub script_location_s3_key: std::option::Option<crate::model::PlatformScriptKey>,
#[doc(hidden)]
pub command: std::option::Option<crate::model::PlatformCommand>,
#[doc(hidden)]
pub run_environment: std::option::Option<crate::model::RunEnvironment>,
#[doc(hidden)]
pub target_type: std::option::Option<crate::model::TargetType>,
}
impl StepAutomationConfiguration {
pub fn script_location_s3_bucket(&self) -> std::option::Option<&str> {
self.script_location_s3_bucket.as_deref()
}
pub fn script_location_s3_key(&self) -> std::option::Option<&crate::model::PlatformScriptKey> {
self.script_location_s3_key.as_ref()
}
pub fn command(&self) -> std::option::Option<&crate::model::PlatformCommand> {
self.command.as_ref()
}
pub fn run_environment(&self) -> std::option::Option<&crate::model::RunEnvironment> {
self.run_environment.as_ref()
}
pub fn target_type(&self) -> std::option::Option<&crate::model::TargetType> {
self.target_type.as_ref()
}
}
pub mod step_automation_configuration {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) script_location_s3_bucket: std::option::Option<std::string::String>,
pub(crate) script_location_s3_key: std::option::Option<crate::model::PlatformScriptKey>,
pub(crate) command: std::option::Option<crate::model::PlatformCommand>,
pub(crate) run_environment: std::option::Option<crate::model::RunEnvironment>,
pub(crate) target_type: std::option::Option<crate::model::TargetType>,
}
impl Builder {
pub fn script_location_s3_bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.script_location_s3_bucket = Some(input.into());
self
}
pub fn set_script_location_s3_bucket(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.script_location_s3_bucket = input;
self
}
pub fn script_location_s3_key(mut self, input: crate::model::PlatformScriptKey) -> Self {
self.script_location_s3_key = Some(input);
self
}
pub fn set_script_location_s3_key(
mut self,
input: std::option::Option<crate::model::PlatformScriptKey>,
) -> Self {
self.script_location_s3_key = input;
self
}
pub fn command(mut self, input: crate::model::PlatformCommand) -> Self {
self.command = Some(input);
self
}
pub fn set_command(
mut self,
input: std::option::Option<crate::model::PlatformCommand>,
) -> Self {
self.command = input;
self
}
pub fn run_environment(mut self, input: crate::model::RunEnvironment) -> Self {
self.run_environment = Some(input);
self
}
pub fn set_run_environment(
mut self,
input: std::option::Option<crate::model::RunEnvironment>,
) -> Self {
self.run_environment = input;
self
}
pub fn target_type(mut self, input: crate::model::TargetType) -> Self {
self.target_type = Some(input);
self
}
pub fn set_target_type(
mut self,
input: std::option::Option<crate::model::TargetType>,
) -> Self {
self.target_type = input;
self
}
pub fn build(self) -> crate::model::StepAutomationConfiguration {
crate::model::StepAutomationConfiguration {
script_location_s3_bucket: self.script_location_s3_bucket,
script_location_s3_key: self.script_location_s3_key,
command: self.command,
run_environment: self.run_environment,
target_type: self.target_type,
}
}
}
}
impl StepAutomationConfiguration {
pub fn builder() -> crate::model::step_automation_configuration::Builder {
crate::model::step_automation_configuration::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct StepOutput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub data_type: std::option::Option<crate::model::DataType>,
#[doc(hidden)]
pub required: std::option::Option<bool>,
}
impl StepOutput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn data_type(&self) -> std::option::Option<&crate::model::DataType> {
self.data_type.as_ref()
}
pub fn required(&self) -> std::option::Option<bool> {
self.required
}
}
pub mod step_output {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) data_type: std::option::Option<crate::model::DataType>,
pub(crate) required: std::option::Option<bool>,
}
impl Builder {
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 data_type(mut self, input: crate::model::DataType) -> Self {
self.data_type = Some(input);
self
}
pub fn set_data_type(mut self, input: std::option::Option<crate::model::DataType>) -> Self {
self.data_type = input;
self
}
pub fn required(mut self, input: bool) -> Self {
self.required = Some(input);
self
}
pub fn set_required(mut self, input: std::option::Option<bool>) -> Self {
self.required = input;
self
}
pub fn build(self) -> crate::model::StepOutput {
crate::model::StepOutput {
name: self.name,
data_type: self.data_type,
required: self.required,
}
}
}
}
impl StepOutput {
pub fn builder() -> crate::model::step_output::Builder {
crate::model::step_output::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PluginSummary {
#[doc(hidden)]
pub plugin_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub hostname: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::PluginHealth>,
#[doc(hidden)]
pub ip_address: std::option::Option<std::string::String>,
#[doc(hidden)]
pub version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub registered_time: std::option::Option<std::string::String>,
}
impl PluginSummary {
pub fn plugin_id(&self) -> std::option::Option<&str> {
self.plugin_id.as_deref()
}
pub fn hostname(&self) -> std::option::Option<&str> {
self.hostname.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::PluginHealth> {
self.status.as_ref()
}
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
pub fn version(&self) -> std::option::Option<&str> {
self.version.as_deref()
}
pub fn registered_time(&self) -> std::option::Option<&str> {
self.registered_time.as_deref()
}
}
pub mod plugin_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) plugin_id: std::option::Option<std::string::String>,
pub(crate) hostname: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::PluginHealth>,
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) version: std::option::Option<std::string::String>,
pub(crate) registered_time: std::option::Option<std::string::String>,
}
impl Builder {
pub fn plugin_id(mut self, input: impl Into<std::string::String>) -> Self {
self.plugin_id = Some(input.into());
self
}
pub fn set_plugin_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.plugin_id = input;
self
}
pub fn hostname(mut self, input: impl Into<std::string::String>) -> Self {
self.hostname = Some(input.into());
self
}
pub fn set_hostname(mut self, input: std::option::Option<std::string::String>) -> Self {
self.hostname = input;
self
}
pub fn status(mut self, input: crate::model::PluginHealth) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::PluginHealth>,
) -> Self {
self.status = input;
self
}
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
pub fn version(mut self, input: impl Into<std::string::String>) -> Self {
self.version = Some(input.into());
self
}
pub fn set_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.version = input;
self
}
pub fn registered_time(mut self, input: impl Into<std::string::String>) -> Self {
self.registered_time = Some(input.into());
self
}
pub fn set_registered_time(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.registered_time = input;
self
}
pub fn build(self) -> crate::model::PluginSummary {
crate::model::PluginSummary {
plugin_id: self.plugin_id,
hostname: self.hostname,
status: self.status,
ip_address: self.ip_address,
version: self.version,
registered_time: self.registered_time,
}
}
}
}
impl PluginSummary {
pub fn builder() -> crate::model::plugin_summary::Builder {
crate::model::plugin_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PluginHealth {
#[allow(missing_docs)] PluginHealthy,
#[allow(missing_docs)] PluginUnhealthy,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for PluginHealth {
fn from(s: &str) -> Self {
match s {
"HEALTHY" => PluginHealth::PluginHealthy,
"UNHEALTHY" => PluginHealth::PluginUnhealthy,
other => PluginHealth::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for PluginHealth {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PluginHealth::from(s))
}
}
impl PluginHealth {
pub fn as_str(&self) -> &str {
match self {
PluginHealth::PluginHealthy => "HEALTHY",
PluginHealth::PluginUnhealthy => "UNHEALTHY",
PluginHealth::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["HEALTHY", "UNHEALTHY"]
}
}
impl AsRef<str> for PluginHealth {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateSummary {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
}
impl TemplateSummary {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
}
pub mod template_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) description: std::option::Option<std::string::String>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = 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 arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn build(self) -> crate::model::TemplateSummary {
crate::model::TemplateSummary {
id: self.id,
name: self.name,
arn: self.arn,
description: self.description,
}
}
}
}
impl TemplateSummary {
pub fn builder() -> crate::model::template_summary::Builder {
crate::model::template_summary::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum TemplateStatus {
#[allow(missing_docs)] Created,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TemplateStatus {
fn from(s: &str) -> Self {
match s {
"CREATED" => TemplateStatus::Created,
other => TemplateStatus::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
}
}
}
impl std::str::FromStr for TemplateStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(TemplateStatus::from(s))
}
}
impl TemplateStatus {
pub fn as_str(&self) -> &str {
match self {
TemplateStatus::Created => "CREATED",
TemplateStatus::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&["CREATED"]
}
}
impl AsRef<str> for TemplateStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TemplateInput {
#[doc(hidden)]
pub input_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub data_type: std::option::Option<crate::model::DataType>,
#[doc(hidden)]
pub required: std::option::Option<bool>,
}
impl TemplateInput {
pub fn input_name(&self) -> std::option::Option<&str> {
self.input_name.as_deref()
}
pub fn data_type(&self) -> std::option::Option<&crate::model::DataType> {
self.data_type.as_ref()
}
pub fn required(&self) -> std::option::Option<bool> {
self.required
}
}
pub mod template_input {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) input_name: std::option::Option<std::string::String>,
pub(crate) data_type: std::option::Option<crate::model::DataType>,
pub(crate) required: std::option::Option<bool>,
}
impl Builder {
pub fn input_name(mut self, input: impl Into<std::string::String>) -> Self {
self.input_name = Some(input.into());
self
}
pub fn set_input_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.input_name = input;
self
}
pub fn data_type(mut self, input: crate::model::DataType) -> Self {
self.data_type = Some(input);
self
}
pub fn set_data_type(mut self, input: std::option::Option<crate::model::DataType>) -> Self {
self.data_type = input;
self
}
pub fn required(mut self, input: bool) -> Self {
self.required = Some(input);
self
}
pub fn set_required(mut self, input: std::option::Option<bool>) -> Self {
self.required = input;
self
}
pub fn build(self) -> crate::model::TemplateInput {
crate::model::TemplateInput {
input_name: self.input_name,
data_type: self.data_type,
required: self.required,
}
}
}
}
impl TemplateInput {
pub fn builder() -> crate::model::template_input::Builder {
crate::model::template_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum MigrationWorkflowStatusEnum {
#[allow(missing_docs)] Completed,
#[allow(missing_docs)] Creating,
#[allow(missing_docs)] CreationFailed,
#[allow(missing_docs)] Deleted,
#[allow(missing_docs)] Deleting,
#[allow(missing_docs)] DeletionFailed,
#[allow(missing_docs)] InProgress,
#[allow(missing_docs)] NotStarted,
#[allow(missing_docs)] Paused,
#[allow(missing_docs)] Pausing,
#[allow(missing_docs)] PausingFailed,
#[allow(missing_docs)] Starting,
#[allow(missing_docs)] UserAttentionRequired,
#[allow(missing_docs)] WorkflowFailed,
Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for MigrationWorkflowStatusEnum {
fn from(s: &str) -> Self {
match s {
"COMPLETED" => MigrationWorkflowStatusEnum::Completed,
"CREATING" => MigrationWorkflowStatusEnum::Creating,
"CREATION_FAILED" => MigrationWorkflowStatusEnum::CreationFailed,
"DELETED" => MigrationWorkflowStatusEnum::Deleted,
"DELETING" => MigrationWorkflowStatusEnum::Deleting,
"DELETION_FAILED" => MigrationWorkflowStatusEnum::DeletionFailed,
"IN_PROGRESS" => MigrationWorkflowStatusEnum::InProgress,
"NOT_STARTED" => MigrationWorkflowStatusEnum::NotStarted,
"PAUSED" => MigrationWorkflowStatusEnum::Paused,
"PAUSING" => MigrationWorkflowStatusEnum::Pausing,
"PAUSING_FAILED" => MigrationWorkflowStatusEnum::PausingFailed,
"STARTING" => MigrationWorkflowStatusEnum::Starting,
"USER_ATTENTION_REQUIRED" => MigrationWorkflowStatusEnum::UserAttentionRequired,
"WORKFLOW_FAILED" => MigrationWorkflowStatusEnum::WorkflowFailed,
other => MigrationWorkflowStatusEnum::Unknown(crate::types::UnknownVariantValue(
other.to_owned(),
)),
}
}
}
impl std::str::FromStr for MigrationWorkflowStatusEnum {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(MigrationWorkflowStatusEnum::from(s))
}
}
impl MigrationWorkflowStatusEnum {
pub fn as_str(&self) -> &str {
match self {
MigrationWorkflowStatusEnum::Completed => "COMPLETED",
MigrationWorkflowStatusEnum::Creating => "CREATING",
MigrationWorkflowStatusEnum::CreationFailed => "CREATION_FAILED",
MigrationWorkflowStatusEnum::Deleted => "DELETED",
MigrationWorkflowStatusEnum::Deleting => "DELETING",
MigrationWorkflowStatusEnum::DeletionFailed => "DELETION_FAILED",
MigrationWorkflowStatusEnum::InProgress => "IN_PROGRESS",
MigrationWorkflowStatusEnum::NotStarted => "NOT_STARTED",
MigrationWorkflowStatusEnum::Paused => "PAUSED",
MigrationWorkflowStatusEnum::Pausing => "PAUSING",
MigrationWorkflowStatusEnum::PausingFailed => "PAUSING_FAILED",
MigrationWorkflowStatusEnum::Starting => "STARTING",
MigrationWorkflowStatusEnum::UserAttentionRequired => "USER_ATTENTION_REQUIRED",
MigrationWorkflowStatusEnum::WorkflowFailed => "WORKFLOW_FAILED",
MigrationWorkflowStatusEnum::Unknown(value) => value.as_str(),
}
}
pub const fn values() -> &'static [&'static str] {
&[
"COMPLETED",
"CREATING",
"CREATION_FAILED",
"DELETED",
"DELETING",
"DELETION_FAILED",
"IN_PROGRESS",
"NOT_STARTED",
"PAUSED",
"PAUSING",
"PAUSING_FAILED",
"STARTING",
"USER_ATTENTION_REQUIRED",
"WORKFLOW_FAILED",
]
}
}
impl AsRef<str> for MigrationWorkflowStatusEnum {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MigrationWorkflowSummary {
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub template_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub ads_application_configuration_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub status: std::option::Option<crate::model::MigrationWorkflowStatusEnum>,
#[doc(hidden)]
pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub end_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub status_message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub completed_steps: std::option::Option<i32>,
#[doc(hidden)]
pub total_steps: std::option::Option<i32>,
}
impl MigrationWorkflowSummary {
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn template_id(&self) -> std::option::Option<&str> {
self.template_id.as_deref()
}
pub fn ads_application_configuration_name(&self) -> std::option::Option<&str> {
self.ads_application_configuration_name.as_deref()
}
pub fn status(&self) -> std::option::Option<&crate::model::MigrationWorkflowStatusEnum> {
self.status.as_ref()
}
pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.end_time.as_ref()
}
pub fn status_message(&self) -> std::option::Option<&str> {
self.status_message.as_deref()
}
pub fn completed_steps(&self) -> std::option::Option<i32> {
self.completed_steps
}
pub fn total_steps(&self) -> std::option::Option<i32> {
self.total_steps
}
}
pub mod migration_workflow_summary {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) template_id: std::option::Option<std::string::String>,
pub(crate) ads_application_configuration_name: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::MigrationWorkflowStatusEnum>,
pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) status_message: std::option::Option<std::string::String>,
pub(crate) completed_steps: std::option::Option<i32>,
pub(crate) total_steps: std::option::Option<i32>,
}
impl Builder {
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = 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 template_id(mut self, input: impl Into<std::string::String>) -> Self {
self.template_id = Some(input.into());
self
}
pub fn set_template_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.template_id = input;
self
}
pub fn ads_application_configuration_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.ads_application_configuration_name = Some(input.into());
self
}
pub fn set_ads_application_configuration_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.ads_application_configuration_name = input;
self
}
pub fn status(mut self, input: crate::model::MigrationWorkflowStatusEnum) -> Self {
self.status = Some(input);
self
}
pub fn set_status(
mut self,
input: std::option::Option<crate::model::MigrationWorkflowStatusEnum>,
) -> Self {
self.status = input;
self
}
pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.creation_time = Some(input);
self
}
pub fn set_creation_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.creation_time = input;
self
}
pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.end_time = Some(input);
self
}
pub fn set_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.end_time = input;
self
}
pub fn status_message(mut self, input: impl Into<std::string::String>) -> Self {
self.status_message = Some(input.into());
self
}
pub fn set_status_message(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.status_message = input;
self
}
pub fn completed_steps(mut self, input: i32) -> Self {
self.completed_steps = Some(input);
self
}
pub fn set_completed_steps(mut self, input: std::option::Option<i32>) -> Self {
self.completed_steps = input;
self
}
pub fn total_steps(mut self, input: i32) -> Self {
self.total_steps = Some(input);
self
}
pub fn set_total_steps(mut self, input: std::option::Option<i32>) -> Self {
self.total_steps = input;
self
}
pub fn build(self) -> crate::model::MigrationWorkflowSummary {
crate::model::MigrationWorkflowSummary {
id: self.id,
name: self.name,
template_id: self.template_id,
ads_application_configuration_name: self.ads_application_configuration_name,
status: self.status,
creation_time: self.creation_time,
end_time: self.end_time,
status_message: self.status_message,
completed_steps: self.completed_steps,
total_steps: self.total_steps,
}
}
}
}
impl MigrationWorkflowSummary {
pub fn builder() -> crate::model::migration_workflow_summary::Builder {
crate::model::migration_workflow_summary::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum StepInput {
IntegerValue(i32),
ListOfStringsValue(std::vec::Vec<std::string::String>),
MapOfStringValue(std::collections::HashMap<std::string::String, std::string::String>),
StringValue(std::string::String),
#[non_exhaustive]
Unknown,
}
impl StepInput {
pub fn as_integer_value(&self) -> std::result::Result<&i32, &Self> {
if let StepInput::IntegerValue(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_integer_value(&self) -> bool {
self.as_integer_value().is_ok()
}
pub fn as_list_of_strings_value(
&self,
) -> std::result::Result<&std::vec::Vec<std::string::String>, &Self> {
if let StepInput::ListOfStringsValue(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_list_of_strings_value(&self) -> bool {
self.as_list_of_strings_value().is_ok()
}
pub fn as_map_of_string_value(
&self,
) -> std::result::Result<
&std::collections::HashMap<std::string::String, std::string::String>,
&Self,
> {
if let StepInput::MapOfStringValue(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_map_of_string_value(&self) -> bool {
self.as_map_of_string_value().is_ok()
}
pub fn as_string_value(&self) -> std::result::Result<&std::string::String, &Self> {
if let StepInput::StringValue(val) = &self {
Ok(val)
} else {
Err(self)
}
}
pub fn is_string_value(&self) -> bool {
self.as_string_value().is_ok()
}
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}