#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Execution {
pub agent_space_id: ::std::string::String,
pub execution_id: ::std::string::String,
pub parent_execution_id: ::std::option::Option<::std::string::String>,
pub agent_sub_task: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::aws_smithy_types::DateTime,
pub execution_status: crate::types::ExecutionStatus,
pub agent_type: ::std::option::Option<::std::string::String>,
pub uid: ::std::option::Option<::std::string::String>,
}
impl Execution {
pub fn agent_space_id(&self) -> &str {
use std::ops::Deref;
self.agent_space_id.deref()
}
pub fn execution_id(&self) -> &str {
use std::ops::Deref;
self.execution_id.deref()
}
pub fn parent_execution_id(&self) -> ::std::option::Option<&str> {
self.parent_execution_id.as_deref()
}
pub fn agent_sub_task(&self) -> &str {
use std::ops::Deref;
self.agent_sub_task.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
pub fn execution_status(&self) -> &crate::types::ExecutionStatus {
&self.execution_status
}
pub fn agent_type(&self) -> ::std::option::Option<&str> {
self.agent_type.as_deref()
}
pub fn uid(&self) -> ::std::option::Option<&str> {
self.uid.as_deref()
}
}
impl Execution {
pub fn builder() -> crate::types::builders::ExecutionBuilder {
crate::types::builders::ExecutionBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExecutionBuilder {
pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
pub(crate) execution_id: ::std::option::Option<::std::string::String>,
pub(crate) parent_execution_id: ::std::option::Option<::std::string::String>,
pub(crate) agent_sub_task: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) execution_status: ::std::option::Option<crate::types::ExecutionStatus>,
pub(crate) agent_type: ::std::option::Option<::std::string::String>,
pub(crate) uid: ::std::option::Option<::std::string::String>,
}
impl ExecutionBuilder {
pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_space_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_space_id = input;
self
}
pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_space_id
}
pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.execution_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.execution_id = input;
self
}
pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
&self.execution_id
}
pub fn parent_execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.parent_execution_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_parent_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.parent_execution_id = input;
self
}
pub fn get_parent_execution_id(&self) -> &::std::option::Option<::std::string::String> {
&self.parent_execution_id
}
pub fn agent_sub_task(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_sub_task = ::std::option::Option::Some(input.into());
self
}
pub fn set_agent_sub_task(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_sub_task = input;
self
}
pub fn get_agent_sub_task(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_sub_task
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn execution_status(mut self, input: crate::types::ExecutionStatus) -> Self {
self.execution_status = ::std::option::Option::Some(input);
self
}
pub fn set_execution_status(mut self, input: ::std::option::Option<crate::types::ExecutionStatus>) -> Self {
self.execution_status = input;
self
}
pub fn get_execution_status(&self) -> &::std::option::Option<crate::types::ExecutionStatus> {
&self.execution_status
}
pub fn agent_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_agent_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_type = input;
self
}
pub fn get_agent_type(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_type
}
pub fn uid(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.uid = ::std::option::Option::Some(input.into());
self
}
pub fn set_uid(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.uid = input;
self
}
pub fn get_uid(&self) -> &::std::option::Option<::std::string::String> {
&self.uid
}
pub fn build(self) -> ::std::result::Result<crate::types::Execution, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Execution {
agent_space_id: self.agent_space_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"agent_space_id",
"agent_space_id was not specified but it is required when building Execution",
)
})?,
execution_id: self.execution_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"execution_id",
"execution_id was not specified but it is required when building Execution",
)
})?,
parent_execution_id: self.parent_execution_id,
agent_sub_task: self.agent_sub_task.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"agent_sub_task",
"agent_sub_task was not specified but it is required when building Execution",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building Execution",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building Execution",
)
})?,
execution_status: self.execution_status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"execution_status",
"execution_status was not specified but it is required when building Execution",
)
})?,
agent_type: self.agent_type,
uid: self.uid,
})
}
}