aws_sdk_elasticsearch/operation/create_package/
_create_package_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Container for response returned by <code> <code>CreatePackage</code> </code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreatePackageOutput {
7    /// <p>Information about the package <code>PackageDetails</code>.</p>
8    pub package_details: ::std::option::Option<crate::types::PackageDetails>,
9    _request_id: Option<String>,
10}
11impl CreatePackageOutput {
12    /// <p>Information about the package <code>PackageDetails</code>.</p>
13    pub fn package_details(&self) -> ::std::option::Option<&crate::types::PackageDetails> {
14        self.package_details.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for CreatePackageOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl CreatePackageOutput {
23    /// Creates a new builder-style object to manufacture [`CreatePackageOutput`](crate::operation::create_package::CreatePackageOutput).
24    pub fn builder() -> crate::operation::create_package::builders::CreatePackageOutputBuilder {
25        crate::operation::create_package::builders::CreatePackageOutputBuilder::default()
26    }
27}
28
29/// A builder for [`CreatePackageOutput`](crate::operation::create_package::CreatePackageOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct CreatePackageOutputBuilder {
33    pub(crate) package_details: ::std::option::Option<crate::types::PackageDetails>,
34    _request_id: Option<String>,
35}
36impl CreatePackageOutputBuilder {
37    /// <p>Information about the package <code>PackageDetails</code>.</p>
38    pub fn package_details(mut self, input: crate::types::PackageDetails) -> Self {
39        self.package_details = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>Information about the package <code>PackageDetails</code>.</p>
43    pub fn set_package_details(mut self, input: ::std::option::Option<crate::types::PackageDetails>) -> Self {
44        self.package_details = input;
45        self
46    }
47    /// <p>Information about the package <code>PackageDetails</code>.</p>
48    pub fn get_package_details(&self) -> &::std::option::Option<crate::types::PackageDetails> {
49        &self.package_details
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`CreatePackageOutput`](crate::operation::create_package::CreatePackageOutput).
61    pub fn build(self) -> crate::operation::create_package::CreatePackageOutput {
62        crate::operation::create_package::CreatePackageOutput {
63            package_details: self.package_details,
64            _request_id: self._request_id,
65        }
66    }
67}