#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetArtifactOutput {
pub agent_space_id: ::std::string::String,
pub artifact_id: ::std::string::String,
pub artifact: ::std::option::Option<crate::types::Artifact>,
pub file_name: ::std::string::String,
pub updated_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl GetArtifactOutput {
pub fn agent_space_id(&self) -> &str {
use std::ops::Deref;
self.agent_space_id.deref()
}
pub fn artifact_id(&self) -> &str {
use std::ops::Deref;
self.artifact_id.deref()
}
pub fn artifact(&self) -> ::std::option::Option<&crate::types::Artifact> {
self.artifact.as_ref()
}
pub fn file_name(&self) -> &str {
use std::ops::Deref;
self.file_name.deref()
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
}
impl ::aws_types::request_id::RequestId for GetArtifactOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetArtifactOutput {
pub fn builder() -> crate::operation::get_artifact::builders::GetArtifactOutputBuilder {
crate::operation::get_artifact::builders::GetArtifactOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetArtifactOutputBuilder {
pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
pub(crate) artifact_id: ::std::option::Option<::std::string::String>,
pub(crate) artifact: ::std::option::Option<crate::types::Artifact>,
pub(crate) file_name: ::std::option::Option<::std::string::String>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetArtifactOutputBuilder {
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 artifact_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.artifact_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_artifact_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.artifact_id = input;
self
}
pub fn get_artifact_id(&self) -> &::std::option::Option<::std::string::String> {
&self.artifact_id
}
pub fn artifact(mut self, input: crate::types::Artifact) -> Self {
self.artifact = ::std::option::Option::Some(input);
self
}
pub fn set_artifact(mut self, input: ::std::option::Option<crate::types::Artifact>) -> Self {
self.artifact = input;
self
}
pub fn get_artifact(&self) -> &::std::option::Option<crate::types::Artifact> {
&self.artifact
}
pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_name = input;
self
}
pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
&self.file_name
}
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(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> ::std::result::Result<crate::operation::get_artifact::GetArtifactOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_artifact::GetArtifactOutput {
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 GetArtifactOutput",
)
})?,
artifact_id: self.artifact_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"artifact_id",
"artifact_id was not specified but it is required when building GetArtifactOutput",
)
})?,
artifact: self.artifact,
file_name: self.file_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_name",
"file_name was not specified but it is required when building GetArtifactOutput",
)
})?,
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 GetArtifactOutput",
)
})?,
_request_id: self._request_id,
})
}
}