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