aws_sdk_s3/types/_restore_request.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Container for restore job parameters.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RestoreRequest {
7 /// <p>Lifetime of the active copy in days. Do not use with restores that specify <code>OutputLocation</code>.</p>
8 /// <p>The Days element is required for regular restores, and must not be provided for select requests.</p>
9 pub days: ::std::option::Option<i32>,
10 /// <p>S3 Glacier related parameters pertaining to this job. Do not use with restores that specify <code>OutputLocation</code>.</p>
11 pub glacier_job_parameters: ::std::option::Option<crate::types::GlacierJobParameters>,
12 /// <important>
13 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
14 /// </important>
15 /// <p>Type of restore request.</p>
16 pub r#type: ::std::option::Option<crate::types::RestoreRequestType>,
17 /// <p>Retrieval tier at which the restore will be processed.</p>
18 pub tier: ::std::option::Option<crate::types::Tier>,
19 /// <p>The optional description for the job.</p>
20 pub description: ::std::option::Option<::std::string::String>,
21 /// <important>
22 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
23 /// </important>
24 /// <p>Describes the parameters for Select job types.</p>
25 pub select_parameters: ::std::option::Option<crate::types::SelectParameters>,
26 /// <p>Describes the location where the restore job's output is stored.</p>
27 pub output_location: ::std::option::Option<crate::types::OutputLocation>,
28}
29impl RestoreRequest {
30 /// <p>Lifetime of the active copy in days. Do not use with restores that specify <code>OutputLocation</code>.</p>
31 /// <p>The Days element is required for regular restores, and must not be provided for select requests.</p>
32 pub fn days(&self) -> ::std::option::Option<i32> {
33 self.days
34 }
35 /// <p>S3 Glacier related parameters pertaining to this job. Do not use with restores that specify <code>OutputLocation</code>.</p>
36 pub fn glacier_job_parameters(&self) -> ::std::option::Option<&crate::types::GlacierJobParameters> {
37 self.glacier_job_parameters.as_ref()
38 }
39 /// <important>
40 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
41 /// </important>
42 /// <p>Type of restore request.</p>
43 pub fn r#type(&self) -> ::std::option::Option<&crate::types::RestoreRequestType> {
44 self.r#type.as_ref()
45 }
46 /// <p>Retrieval tier at which the restore will be processed.</p>
47 pub fn tier(&self) -> ::std::option::Option<&crate::types::Tier> {
48 self.tier.as_ref()
49 }
50 /// <p>The optional description for the job.</p>
51 pub fn description(&self) -> ::std::option::Option<&str> {
52 self.description.as_deref()
53 }
54 /// <important>
55 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
56 /// </important>
57 /// <p>Describes the parameters for Select job types.</p>
58 pub fn select_parameters(&self) -> ::std::option::Option<&crate::types::SelectParameters> {
59 self.select_parameters.as_ref()
60 }
61 /// <p>Describes the location where the restore job's output is stored.</p>
62 pub fn output_location(&self) -> ::std::option::Option<&crate::types::OutputLocation> {
63 self.output_location.as_ref()
64 }
65}
66impl RestoreRequest {
67 /// Creates a new builder-style object to manufacture [`RestoreRequest`](crate::types::RestoreRequest).
68 pub fn builder() -> crate::types::builders::RestoreRequestBuilder {
69 crate::types::builders::RestoreRequestBuilder::default()
70 }
71}
72
73/// A builder for [`RestoreRequest`](crate::types::RestoreRequest).
74#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
75#[non_exhaustive]
76pub struct RestoreRequestBuilder {
77 pub(crate) days: ::std::option::Option<i32>,
78 pub(crate) glacier_job_parameters: ::std::option::Option<crate::types::GlacierJobParameters>,
79 pub(crate) r#type: ::std::option::Option<crate::types::RestoreRequestType>,
80 pub(crate) tier: ::std::option::Option<crate::types::Tier>,
81 pub(crate) description: ::std::option::Option<::std::string::String>,
82 pub(crate) select_parameters: ::std::option::Option<crate::types::SelectParameters>,
83 pub(crate) output_location: ::std::option::Option<crate::types::OutputLocation>,
84}
85impl RestoreRequestBuilder {
86 /// <p>Lifetime of the active copy in days. Do not use with restores that specify <code>OutputLocation</code>.</p>
87 /// <p>The Days element is required for regular restores, and must not be provided for select requests.</p>
88 pub fn days(mut self, input: i32) -> Self {
89 self.days = ::std::option::Option::Some(input);
90 self
91 }
92 /// <p>Lifetime of the active copy in days. Do not use with restores that specify <code>OutputLocation</code>.</p>
93 /// <p>The Days element is required for regular restores, and must not be provided for select requests.</p>
94 pub fn set_days(mut self, input: ::std::option::Option<i32>) -> Self {
95 self.days = input;
96 self
97 }
98 /// <p>Lifetime of the active copy in days. Do not use with restores that specify <code>OutputLocation</code>.</p>
99 /// <p>The Days element is required for regular restores, and must not be provided for select requests.</p>
100 pub fn get_days(&self) -> &::std::option::Option<i32> {
101 &self.days
102 }
103 /// <p>S3 Glacier related parameters pertaining to this job. Do not use with restores that specify <code>OutputLocation</code>.</p>
104 pub fn glacier_job_parameters(mut self, input: crate::types::GlacierJobParameters) -> Self {
105 self.glacier_job_parameters = ::std::option::Option::Some(input);
106 self
107 }
108 /// <p>S3 Glacier related parameters pertaining to this job. Do not use with restores that specify <code>OutputLocation</code>.</p>
109 pub fn set_glacier_job_parameters(mut self, input: ::std::option::Option<crate::types::GlacierJobParameters>) -> Self {
110 self.glacier_job_parameters = input;
111 self
112 }
113 /// <p>S3 Glacier related parameters pertaining to this job. Do not use with restores that specify <code>OutputLocation</code>.</p>
114 pub fn get_glacier_job_parameters(&self) -> &::std::option::Option<crate::types::GlacierJobParameters> {
115 &self.glacier_job_parameters
116 }
117 /// <important>
118 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
119 /// </important>
120 /// <p>Type of restore request.</p>
121 pub fn r#type(mut self, input: crate::types::RestoreRequestType) -> Self {
122 self.r#type = ::std::option::Option::Some(input);
123 self
124 }
125 /// <important>
126 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
127 /// </important>
128 /// <p>Type of restore request.</p>
129 pub fn set_type(mut self, input: ::std::option::Option<crate::types::RestoreRequestType>) -> Self {
130 self.r#type = input;
131 self
132 }
133 /// <important>
134 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
135 /// </important>
136 /// <p>Type of restore request.</p>
137 pub fn get_type(&self) -> &::std::option::Option<crate::types::RestoreRequestType> {
138 &self.r#type
139 }
140 /// <p>Retrieval tier at which the restore will be processed.</p>
141 pub fn tier(mut self, input: crate::types::Tier) -> Self {
142 self.tier = ::std::option::Option::Some(input);
143 self
144 }
145 /// <p>Retrieval tier at which the restore will be processed.</p>
146 pub fn set_tier(mut self, input: ::std::option::Option<crate::types::Tier>) -> Self {
147 self.tier = input;
148 self
149 }
150 /// <p>Retrieval tier at which the restore will be processed.</p>
151 pub fn get_tier(&self) -> &::std::option::Option<crate::types::Tier> {
152 &self.tier
153 }
154 /// <p>The optional description for the job.</p>
155 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.description = ::std::option::Option::Some(input.into());
157 self
158 }
159 /// <p>The optional description for the job.</p>
160 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.description = input;
162 self
163 }
164 /// <p>The optional description for the job.</p>
165 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
166 &self.description
167 }
168 /// <important>
169 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
170 /// </important>
171 /// <p>Describes the parameters for Select job types.</p>
172 pub fn select_parameters(mut self, input: crate::types::SelectParameters) -> Self {
173 self.select_parameters = ::std::option::Option::Some(input);
174 self
175 }
176 /// <important>
177 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
178 /// </important>
179 /// <p>Describes the parameters for Select job types.</p>
180 pub fn set_select_parameters(mut self, input: ::std::option::Option<crate::types::SelectParameters>) -> Self {
181 self.select_parameters = input;
182 self
183 }
184 /// <important>
185 /// <p>Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. <a href="http://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/">Learn more</a></p>
186 /// </important>
187 /// <p>Describes the parameters for Select job types.</p>
188 pub fn get_select_parameters(&self) -> &::std::option::Option<crate::types::SelectParameters> {
189 &self.select_parameters
190 }
191 /// <p>Describes the location where the restore job's output is stored.</p>
192 pub fn output_location(mut self, input: crate::types::OutputLocation) -> Self {
193 self.output_location = ::std::option::Option::Some(input);
194 self
195 }
196 /// <p>Describes the location where the restore job's output is stored.</p>
197 pub fn set_output_location(mut self, input: ::std::option::Option<crate::types::OutputLocation>) -> Self {
198 self.output_location = input;
199 self
200 }
201 /// <p>Describes the location where the restore job's output is stored.</p>
202 pub fn get_output_location(&self) -> &::std::option::Option<crate::types::OutputLocation> {
203 &self.output_location
204 }
205 /// Consumes the builder and constructs a [`RestoreRequest`](crate::types::RestoreRequest).
206 pub fn build(self) -> crate::types::RestoreRequest {
207 crate::types::RestoreRequest {
208 days: self.days,
209 glacier_job_parameters: self.glacier_job_parameters,
210 r#type: self.r#type,
211 tier: self.tier,
212 description: self.description,
213 select_parameters: self.select_parameters,
214 output_location: self.output_location,
215 }
216 }
217}