aws_sdk_s3/operation/restore_object/
_restore_object_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RestoreObjectOutput {
6    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
7    /// <p>This functionality is not supported for directory buckets.</p>
8    /// </note>
9    pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
10    /// <p>Indicates the path in the provided S3 output location where Select results will be restored to.</p>
11    pub restore_output_path: ::std::option::Option<::std::string::String>,
12    _extended_request_id: Option<String>,
13    _request_id: Option<String>,
14}
15impl RestoreObjectOutput {
16    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
17    /// <p>This functionality is not supported for directory buckets.</p>
18    /// </note>
19    pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
20        self.request_charged.as_ref()
21    }
22    /// <p>Indicates the path in the provided S3 output location where Select results will be restored to.</p>
23    pub fn restore_output_path(&self) -> ::std::option::Option<&str> {
24        self.restore_output_path.as_deref()
25    }
26}
27impl crate::s3_request_id::RequestIdExt for RestoreObjectOutput {
28    fn extended_request_id(&self) -> Option<&str> {
29        self._extended_request_id.as_deref()
30    }
31}
32impl ::aws_types::request_id::RequestId for RestoreObjectOutput {
33    fn request_id(&self) -> Option<&str> {
34        self._request_id.as_deref()
35    }
36}
37impl RestoreObjectOutput {
38    /// Creates a new builder-style object to manufacture [`RestoreObjectOutput`](crate::operation::restore_object::RestoreObjectOutput).
39    pub fn builder() -> crate::operation::restore_object::builders::RestoreObjectOutputBuilder {
40        crate::operation::restore_object::builders::RestoreObjectOutputBuilder::default()
41    }
42}
43
44/// A builder for [`RestoreObjectOutput`](crate::operation::restore_object::RestoreObjectOutput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct RestoreObjectOutputBuilder {
48    pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
49    pub(crate) restore_output_path: ::std::option::Option<::std::string::String>,
50    _extended_request_id: Option<String>,
51    _request_id: Option<String>,
52}
53impl RestoreObjectOutputBuilder {
54    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
55    /// <p>This functionality is not supported for directory buckets.</p>
56    /// </note>
57    pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
58        self.request_charged = ::std::option::Option::Some(input);
59        self
60    }
61    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
62    /// <p>This functionality is not supported for directory buckets.</p>
63    /// </note>
64    pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
65        self.request_charged = input;
66        self
67    }
68    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
69    /// <p>This functionality is not supported for directory buckets.</p>
70    /// </note>
71    pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
72        &self.request_charged
73    }
74    /// <p>Indicates the path in the provided S3 output location where Select results will be restored to.</p>
75    pub fn restore_output_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.restore_output_path = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>Indicates the path in the provided S3 output location where Select results will be restored to.</p>
80    pub fn set_restore_output_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.restore_output_path = input;
82        self
83    }
84    /// <p>Indicates the path in the provided S3 output location where Select results will be restored to.</p>
85    pub fn get_restore_output_path(&self) -> &::std::option::Option<::std::string::String> {
86        &self.restore_output_path
87    }
88    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
89        self._extended_request_id = Some(extended_request_id.into());
90        self
91    }
92
93    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
94        self._extended_request_id = extended_request_id;
95        self
96    }
97    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
98        self._request_id = Some(request_id.into());
99        self
100    }
101
102    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
103        self._request_id = request_id;
104        self
105    }
106    /// Consumes the builder and constructs a [`RestoreObjectOutput`](crate::operation::restore_object::RestoreObjectOutput).
107    pub fn build(self) -> crate::operation::restore_object::RestoreObjectOutput {
108        crate::operation::restore_object::RestoreObjectOutput {
109            request_charged: self.request_charged,
110            restore_output_path: self.restore_output_path,
111            _extended_request_id: self._extended_request_id,
112            _request_id: self._request_id,
113        }
114    }
115}