#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSourceUploadOutput {
pub source_upload_id: ::std::string::String,
pub zip_upload: ::std::option::Option<crate::types::ZipUpload>,
pub upload_expires_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl CreateSourceUploadOutput {
pub fn source_upload_id(&self) -> &str {
use std::ops::Deref;
self.source_upload_id.deref()
}
pub fn zip_upload(&self) -> ::std::option::Option<&crate::types::ZipUpload> {
self.zip_upload.as_ref()
}
pub fn upload_expires_at(&self) -> &::aws_smithy_types::DateTime {
&self.upload_expires_at
}
}
impl ::aws_types::request_id::RequestId for CreateSourceUploadOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateSourceUploadOutput {
pub fn builder() -> crate::operation::create_source_upload::builders::CreateSourceUploadOutputBuilder {
crate::operation::create_source_upload::builders::CreateSourceUploadOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSourceUploadOutputBuilder {
pub(crate) source_upload_id: ::std::option::Option<::std::string::String>,
pub(crate) zip_upload: ::std::option::Option<crate::types::ZipUpload>,
pub(crate) upload_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl CreateSourceUploadOutputBuilder {
pub fn source_upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_upload_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_source_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_upload_id = input;
self
}
pub fn get_source_upload_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_upload_id
}
pub fn zip_upload(mut self, input: crate::types::ZipUpload) -> Self {
self.zip_upload = ::std::option::Option::Some(input);
self
}
pub fn set_zip_upload(mut self, input: ::std::option::Option<crate::types::ZipUpload>) -> Self {
self.zip_upload = input;
self
}
pub fn get_zip_upload(&self) -> &::std::option::Option<crate::types::ZipUpload> {
&self.zip_upload
}
pub fn upload_expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.upload_expires_at = ::std::option::Option::Some(input);
self
}
pub fn set_upload_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.upload_expires_at = input;
self
}
pub fn get_upload_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.upload_expires_at
}
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::create_source_upload::CreateSourceUploadOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_source_upload::CreateSourceUploadOutput {
source_upload_id: self.source_upload_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"source_upload_id",
"source_upload_id was not specified but it is required when building CreateSourceUploadOutput",
)
})?,
zip_upload: self.zip_upload,
upload_expires_at: self.upload_expires_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"upload_expires_at",
"upload_expires_at was not specified but it is required when building CreateSourceUploadOutput",
)
})?,
_request_id: self._request_id,
})
}
}