Skip to main content

aws_sdk_dataexchange/types/
_export_asset_to_signed_url_response_details.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The details of the export to signed URL response.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ExportAssetToSignedUrlResponseDetails {
7    /// <p>The unique identifier for the asset associated with this export job.</p>
8    pub asset_id: ::std::string::String,
9    /// <p>The unique identifier for the data set associated with this export job.</p>
10    pub data_set_id: ::std::string::String,
11    /// <p>The unique identifier for the revision associated with this export response.</p>
12    pub revision_id: ::std::string::String,
13    /// <p>The signed URL for the export request.</p>
14    pub signed_url: ::std::option::Option<::std::string::String>,
15    /// <p>The date and time that the signed URL expires, in ISO 8601 format.</p>
16    pub signed_url_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
17}
18impl ExportAssetToSignedUrlResponseDetails {
19    /// <p>The unique identifier for the asset associated with this export job.</p>
20    pub fn asset_id(&self) -> &str {
21        use std::ops::Deref;
22        self.asset_id.deref()
23    }
24    /// <p>The unique identifier for the data set associated with this export job.</p>
25    pub fn data_set_id(&self) -> &str {
26        use std::ops::Deref;
27        self.data_set_id.deref()
28    }
29    /// <p>The unique identifier for the revision associated with this export response.</p>
30    pub fn revision_id(&self) -> &str {
31        use std::ops::Deref;
32        self.revision_id.deref()
33    }
34    /// <p>The signed URL for the export request.</p>
35    pub fn signed_url(&self) -> ::std::option::Option<&str> {
36        self.signed_url.as_deref()
37    }
38    /// <p>The date and time that the signed URL expires, in ISO 8601 format.</p>
39    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    /// Creates a new builder-style object to manufacture [`ExportAssetToSignedUrlResponseDetails`](crate::types::ExportAssetToSignedUrlResponseDetails).
45    pub fn builder() -> crate::types::builders::ExportAssetToSignedUrlResponseDetailsBuilder {
46        crate::types::builders::ExportAssetToSignedUrlResponseDetailsBuilder::default()
47    }
48}
49
50/// A builder for [`ExportAssetToSignedUrlResponseDetails`](crate::types::ExportAssetToSignedUrlResponseDetails).
51#[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    /// <p>The unique identifier for the asset associated with this export job.</p>
62    /// This field is required.
63    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    /// <p>The unique identifier for the asset associated with this export job.</p>
68    pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69        self.asset_id = input;
70        self
71    }
72    /// <p>The unique identifier for the asset associated with this export job.</p>
73    pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
74        &self.asset_id
75    }
76    /// <p>The unique identifier for the data set associated with this export job.</p>
77    /// This field is required.
78    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    /// <p>The unique identifier for the data set associated with this export job.</p>
83    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    /// <p>The unique identifier for the data set associated with this export job.</p>
88    pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
89        &self.data_set_id
90    }
91    /// <p>The unique identifier for the revision associated with this export response.</p>
92    /// This field is required.
93    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    /// <p>The unique identifier for the revision associated with this export response.</p>
98    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.revision_id = input;
100        self
101    }
102    /// <p>The unique identifier for the revision associated with this export response.</p>
103    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
104        &self.revision_id
105    }
106    /// <p>The signed URL for the export request.</p>
107    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    /// <p>The signed URL for the export request.</p>
112    pub fn set_signed_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.signed_url = input;
114        self
115    }
116    /// <p>The signed URL for the export request.</p>
117    pub fn get_signed_url(&self) -> &::std::option::Option<::std::string::String> {
118        &self.signed_url
119    }
120    /// <p>The date and time that the signed URL expires, in ISO 8601 format.</p>
121    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    /// <p>The date and time that the signed URL expires, in ISO 8601 format.</p>
126    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    /// <p>The date and time that the signed URL expires, in ISO 8601 format.</p>
131    pub fn get_signed_url_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132        &self.signed_url_expires_at
133    }
134    /// Consumes the builder and constructs a [`ExportAssetToSignedUrlResponseDetails`](crate::types::ExportAssetToSignedUrlResponseDetails).
135    /// This method will fail if any of the following fields are not set:
136    /// - [`asset_id`](crate::types::builders::ExportAssetToSignedUrlResponseDetailsBuilder::asset_id)
137    /// - [`data_set_id`](crate::types::builders::ExportAssetToSignedUrlResponseDetailsBuilder::data_set_id)
138    /// - [`revision_id`](crate::types::builders::ExportAssetToSignedUrlResponseDetailsBuilder::revision_id)
139    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}