aws_sdk_dataexchange/types/
_export_asset_to_signed_url_response_details.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ExportAssetToSignedUrlResponseDetails {
7 pub asset_id: ::std::string::String,
9 pub data_set_id: ::std::string::String,
11 pub revision_id: ::std::string::String,
13 pub signed_url: ::std::option::Option<::std::string::String>,
15 pub signed_url_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
17}
18impl ExportAssetToSignedUrlResponseDetails {
19 pub fn asset_id(&self) -> &str {
21 use std::ops::Deref;
22 self.asset_id.deref()
23 }
24 pub fn data_set_id(&self) -> &str {
26 use std::ops::Deref;
27 self.data_set_id.deref()
28 }
29 pub fn revision_id(&self) -> &str {
31 use std::ops::Deref;
32 self.revision_id.deref()
33 }
34 pub fn signed_url(&self) -> ::std::option::Option<&str> {
36 self.signed_url.as_deref()
37 }
38 pub fn signed_url_expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
40 self.signed_url_expires_at.as_ref()
41 }
42}
43impl ExportAssetToSignedUrlResponseDetails {
44 pub fn builder() -> crate::types::builders::ExportAssetToSignedUrlResponseDetailsBuilder {
46 crate::types::builders::ExportAssetToSignedUrlResponseDetailsBuilder::default()
47 }
48}
49
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct ExportAssetToSignedUrlResponseDetailsBuilder {
54 pub(crate) asset_id: ::std::option::Option<::std::string::String>,
55 pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
56 pub(crate) revision_id: ::std::option::Option<::std::string::String>,
57 pub(crate) signed_url: ::std::option::Option<::std::string::String>,
58 pub(crate) signed_url_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
59}
60impl ExportAssetToSignedUrlResponseDetailsBuilder {
61 pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.asset_id = ::std::option::Option::Some(input.into());
65 self
66 }
67 pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.asset_id = input;
70 self
71 }
72 pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
74 &self.asset_id
75 }
76 pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.data_set_id = ::std::option::Option::Some(input.into());
80 self
81 }
82 pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.data_set_id = input;
85 self
86 }
87 pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
89 &self.data_set_id
90 }
91 pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94 self.revision_id = ::std::option::Option::Some(input.into());
95 self
96 }
97 pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99 self.revision_id = input;
100 self
101 }
102 pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
104 &self.revision_id
105 }
106 pub fn signed_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.signed_url = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_signed_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.signed_url = input;
114 self
115 }
116 pub fn get_signed_url(&self) -> &::std::option::Option<::std::string::String> {
118 &self.signed_url
119 }
120 pub fn signed_url_expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
122 self.signed_url_expires_at = ::std::option::Option::Some(input);
123 self
124 }
125 pub fn set_signed_url_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
127 self.signed_url_expires_at = input;
128 self
129 }
130 pub fn get_signed_url_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132 &self.signed_url_expires_at
133 }
134 pub fn build(
140 self,
141 ) -> ::std::result::Result<crate::types::ExportAssetToSignedUrlResponseDetails, ::aws_smithy_types::error::operation::BuildError> {
142 ::std::result::Result::Ok(crate::types::ExportAssetToSignedUrlResponseDetails {
143 asset_id: self.asset_id.ok_or_else(|| {
144 ::aws_smithy_types::error::operation::BuildError::missing_field(
145 "asset_id",
146 "asset_id was not specified but it is required when building ExportAssetToSignedUrlResponseDetails",
147 )
148 })?,
149 data_set_id: self.data_set_id.ok_or_else(|| {
150 ::aws_smithy_types::error::operation::BuildError::missing_field(
151 "data_set_id",
152 "data_set_id was not specified but it is required when building ExportAssetToSignedUrlResponseDetails",
153 )
154 })?,
155 revision_id: self.revision_id.ok_or_else(|| {
156 ::aws_smithy_types::error::operation::BuildError::missing_field(
157 "revision_id",
158 "revision_id was not specified but it is required when building ExportAssetToSignedUrlResponseDetails",
159 )
160 })?,
161 signed_url: self.signed_url,
162 signed_url_expires_at: self.signed_url_expires_at,
163 })
164 }
165}