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