#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Artifact {
pub artifact_file_name: ::std::string::String,
pub artifact_id: ::std::string::String,
}
impl Artifact {
pub fn artifact_file_name(&self) -> &str {
use std::ops::Deref;
self.artifact_file_name.deref()
}
pub fn artifact_id(&self) -> &str {
use std::ops::Deref;
self.artifact_id.deref()
}
}
impl Artifact {
pub fn builder() -> crate::types::builders::ArtifactBuilder {
crate::types::builders::ArtifactBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ArtifactBuilder {
pub(crate) artifact_file_name: ::std::option::Option<::std::string::String>,
pub(crate) artifact_id: ::std::option::Option<::std::string::String>,
}
impl ArtifactBuilder {
pub fn artifact_file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.artifact_file_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_artifact_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.artifact_file_name = input;
self
}
pub fn get_artifact_file_name(&self) -> &::std::option::Option<::std::string::String> {
&self.artifact_file_name
}
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 build(self) -> ::std::result::Result<crate::types::Artifact, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Artifact {
artifact_file_name: self.artifact_file_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"artifact_file_name",
"artifact_file_name was not specified but it is required when building Artifact",
)
})?,
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 Artifact",
)
})?,
})
}
}