#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetFileOutput {
pub file_path: ::std::string::String,
pub content: ::aws_smithy_types::Blob,
pub sha: ::std::string::String,
pub size: i64,
_request_id: Option<String>,
}
impl GetFileOutput {
pub fn file_path(&self) -> &str {
use std::ops::Deref;
self.file_path.deref()
}
pub fn content(&self) -> &::aws_smithy_types::Blob {
&self.content
}
pub fn sha(&self) -> &str {
use std::ops::Deref;
self.sha.deref()
}
pub fn size(&self) -> i64 {
self.size
}
}
impl ::aws_types::request_id::RequestId for GetFileOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetFileOutput {
pub fn builder() -> crate::operation::get_file::builders::GetFileOutputBuilder {
crate::operation::get_file::builders::GetFileOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetFileOutputBuilder {
pub(crate) file_path: ::std::option::Option<::std::string::String>,
pub(crate) content: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) sha: ::std::option::Option<::std::string::String>,
pub(crate) size: ::std::option::Option<i64>,
_request_id: Option<String>,
}
impl GetFileOutputBuilder {
pub fn file_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_path = ::std::option::Option::Some(input.into());
self
}
pub fn set_file_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_path = input;
self
}
pub fn get_file_path(&self) -> &::std::option::Option<::std::string::String> {
&self.file_path
}
pub fn content(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.content = ::std::option::Option::Some(input);
self
}
pub fn set_content(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.content = input;
self
}
pub fn get_content(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.content
}
pub fn sha(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sha = ::std::option::Option::Some(input.into());
self
}
pub fn set_sha(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sha = input;
self
}
pub fn get_sha(&self) -> &::std::option::Option<::std::string::String> {
&self.sha
}
pub fn size(mut self, input: i64) -> Self {
self.size = ::std::option::Option::Some(input);
self
}
pub fn set_size(mut self, input: ::std::option::Option<i64>) -> Self {
self.size = input;
self
}
pub fn get_size(&self) -> &::std::option::Option<i64> {
&self.size
}
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_file::GetFileOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_file::GetFileOutput {
file_path: self.file_path.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_path",
"file_path was not specified but it is required when building GetFileOutput",
)
})?,
content: self.content.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"content",
"content was not specified but it is required when building GetFileOutput",
)
})?,
sha: self.sha.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"sha",
"sha was not specified but it is required when building GetFileOutput",
)
})?,
size: self.size.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"size",
"size was not specified but it is required when building GetFileOutput",
)
})?,
_request_id: self._request_id,
})
}
}