#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetReferenceInput {
pub id: ::std::option::Option<::std::string::String>,
pub reference_store_id: ::std::option::Option<::std::string::String>,
pub range: ::std::option::Option<::std::string::String>,
pub part_number: ::std::option::Option<i32>,
pub file: ::std::option::Option<crate::types::ReferenceFile>,
}
impl GetReferenceInput {
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
pub fn reference_store_id(&self) -> ::std::option::Option<&str> {
self.reference_store_id.as_deref()
}
pub fn range(&self) -> ::std::option::Option<&str> {
self.range.as_deref()
}
pub fn part_number(&self) -> ::std::option::Option<i32> {
self.part_number
}
pub fn file(&self) -> ::std::option::Option<&crate::types::ReferenceFile> {
self.file.as_ref()
}
}
impl GetReferenceInput {
pub fn builder() -> crate::operation::get_reference::builders::GetReferenceInputBuilder {
crate::operation::get_reference::builders::GetReferenceInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetReferenceInputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) reference_store_id: ::std::option::Option<::std::string::String>,
pub(crate) range: ::std::option::Option<::std::string::String>,
pub(crate) part_number: ::std::option::Option<i32>,
pub(crate) file: ::std::option::Option<crate::types::ReferenceFile>,
}
impl GetReferenceInputBuilder {
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 reference_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reference_store_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_reference_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reference_store_id = input;
self
}
pub fn get_reference_store_id(&self) -> &::std::option::Option<::std::string::String> {
&self.reference_store_id
}
pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.range = ::std::option::Option::Some(input.into());
self
}
pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.range = input;
self
}
pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
&self.range
}
pub fn part_number(mut self, input: i32) -> Self {
self.part_number = ::std::option::Option::Some(input);
self
}
pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
self.part_number = input;
self
}
pub fn get_part_number(&self) -> &::std::option::Option<i32> {
&self.part_number
}
pub fn file(mut self, input: crate::types::ReferenceFile) -> Self {
self.file = ::std::option::Option::Some(input);
self
}
pub fn set_file(mut self, input: ::std::option::Option<crate::types::ReferenceFile>) -> Self {
self.file = input;
self
}
pub fn get_file(&self) -> &::std::option::Option<crate::types::ReferenceFile> {
&self.file
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_reference::GetReferenceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_reference::GetReferenceInput {
id: self.id,
reference_store_id: self.reference_store_id,
range: self.range,
part_number: self.part_number,
file: self.file,
})
}
}