#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Step {
pub step_name: ::std::string::String,
pub start_time: ::aws_smithy_types::DateTime,
pub status: crate::types::JobStatus,
pub end_time: ::aws_smithy_types::DateTime,
pub log_url: ::std::option::Option<::std::string::String>,
pub artifacts_url: ::std::option::Option<::std::string::String>,
pub test_artifacts_url: ::std::option::Option<::std::string::String>,
pub test_config_url: ::std::option::Option<::std::string::String>,
pub screenshots: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub status_reason: ::std::option::Option<::std::string::String>,
pub context: ::std::option::Option<::std::string::String>,
}
impl Step {
pub fn step_name(&self) -> &str {
use std::ops::Deref;
self.step_name.deref()
}
pub fn start_time(&self) -> &::aws_smithy_types::DateTime {
&self.start_time
}
pub fn status(&self) -> &crate::types::JobStatus {
&self.status
}
pub fn end_time(&self) -> &::aws_smithy_types::DateTime {
&self.end_time
}
pub fn log_url(&self) -> ::std::option::Option<&str> {
self.log_url.as_deref()
}
pub fn artifacts_url(&self) -> ::std::option::Option<&str> {
self.artifacts_url.as_deref()
}
pub fn test_artifacts_url(&self) -> ::std::option::Option<&str> {
self.test_artifacts_url.as_deref()
}
pub fn test_config_url(&self) -> ::std::option::Option<&str> {
self.test_config_url.as_deref()
}
pub fn screenshots(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.screenshots.as_ref()
}
pub fn status_reason(&self) -> ::std::option::Option<&str> {
self.status_reason.as_deref()
}
pub fn context(&self) -> ::std::option::Option<&str> {
self.context.as_deref()
}
}
impl Step {
pub fn builder() -> crate::types::builders::StepBuilder {
crate::types::builders::StepBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StepBuilder {
pub(crate) step_name: ::std::option::Option<::std::string::String>,
pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status: ::std::option::Option<crate::types::JobStatus>,
pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) log_url: ::std::option::Option<::std::string::String>,
pub(crate) artifacts_url: ::std::option::Option<::std::string::String>,
pub(crate) test_artifacts_url: ::std::option::Option<::std::string::String>,
pub(crate) test_config_url: ::std::option::Option<::std::string::String>,
pub(crate) screenshots: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) status_reason: ::std::option::Option<::std::string::String>,
pub(crate) context: ::std::option::Option<::std::string::String>,
}
impl StepBuilder {
pub fn step_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.step_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_step_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.step_name = input;
self
}
pub fn get_step_name(&self) -> &::std::option::Option<::std::string::String> {
&self.step_name
}
pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_time = ::std::option::Option::Some(input);
self
}
pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_time = input;
self
}
pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_time
}
pub fn status(mut self, input: crate::types::JobStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::JobStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::JobStatus> {
&self.status
}
pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_time = ::std::option::Option::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 get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_time
}
pub fn log_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.log_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_log_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.log_url = input;
self
}
pub fn get_log_url(&self) -> &::std::option::Option<::std::string::String> {
&self.log_url
}
pub fn artifacts_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.artifacts_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_artifacts_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.artifacts_url = input;
self
}
pub fn get_artifacts_url(&self) -> &::std::option::Option<::std::string::String> {
&self.artifacts_url
}
pub fn test_artifacts_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.test_artifacts_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_test_artifacts_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.test_artifacts_url = input;
self
}
pub fn get_test_artifacts_url(&self) -> &::std::option::Option<::std::string::String> {
&self.test_artifacts_url
}
pub fn test_config_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.test_config_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_test_config_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.test_config_url = input;
self
}
pub fn get_test_config_url(&self) -> &::std::option::Option<::std::string::String> {
&self.test_config_url
}
pub fn screenshots(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.screenshots.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.screenshots = ::std::option::Option::Some(hash_map);
self
}
pub fn set_screenshots(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.screenshots = input;
self
}
pub fn get_screenshots(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.screenshots
}
pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_reason = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_reason = input;
self
}
pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.status_reason
}
pub fn context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.context = ::std::option::Option::Some(input.into());
self
}
pub fn set_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.context = input;
self
}
pub fn get_context(&self) -> &::std::option::Option<::std::string::String> {
&self.context
}
pub fn build(self) -> ::std::result::Result<crate::types::Step, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Step {
step_name: self.step_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"step_name",
"step_name was not specified but it is required when building Step",
)
})?,
start_time: self.start_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"start_time",
"start_time was not specified but it is required when building Step",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building Step",
)
})?,
end_time: self.end_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"end_time",
"end_time was not specified but it is required when building Step",
)
})?,
log_url: self.log_url,
artifacts_url: self.artifacts_url,
test_artifacts_url: self.test_artifacts_url,
test_config_url: self.test_config_url,
screenshots: self.screenshots,
status_reason: self.status_reason,
context: self.context,
})
}
}