aws_sdk_elasticsearch/operation/dissociate_package/
_dissociate_package_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Container for request parameters to <code> <code>DissociatePackage</code> </code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DissociatePackageInput {
7    /// <p>Internal ID of the package that you want to associate with a domain. Use <code>DescribePackages</code> to find this value.</p>
8    pub package_id: ::std::option::Option<::std::string::String>,
9    /// <p>Name of the domain that you want to associate the package with.</p>
10    pub domain_name: ::std::option::Option<::std::string::String>,
11}
12impl DissociatePackageInput {
13    /// <p>Internal ID of the package that you want to associate with a domain. Use <code>DescribePackages</code> to find this value.</p>
14    pub fn package_id(&self) -> ::std::option::Option<&str> {
15        self.package_id.as_deref()
16    }
17    /// <p>Name of the domain that you want to associate the package with.</p>
18    pub fn domain_name(&self) -> ::std::option::Option<&str> {
19        self.domain_name.as_deref()
20    }
21}
22impl DissociatePackageInput {
23    /// Creates a new builder-style object to manufacture [`DissociatePackageInput`](crate::operation::dissociate_package::DissociatePackageInput).
24    pub fn builder() -> crate::operation::dissociate_package::builders::DissociatePackageInputBuilder {
25        crate::operation::dissociate_package::builders::DissociatePackageInputBuilder::default()
26    }
27}
28
29/// A builder for [`DissociatePackageInput`](crate::operation::dissociate_package::DissociatePackageInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DissociatePackageInputBuilder {
33    pub(crate) package_id: ::std::option::Option<::std::string::String>,
34    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
35}
36impl DissociatePackageInputBuilder {
37    /// <p>Internal ID of the package that you want to associate with a domain. Use <code>DescribePackages</code> to find this value.</p>
38    /// This field is required.
39    pub fn package_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.package_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>Internal ID of the package that you want to associate with a domain. Use <code>DescribePackages</code> to find this value.</p>
44    pub fn set_package_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.package_id = input;
46        self
47    }
48    /// <p>Internal ID of the package that you want to associate with a domain. Use <code>DescribePackages</code> to find this value.</p>
49    pub fn get_package_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.package_id
51    }
52    /// <p>Name of the domain that you want to associate the package with.</p>
53    /// This field is required.
54    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.domain_name = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>Name of the domain that you want to associate the package with.</p>
59    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.domain_name = input;
61        self
62    }
63    /// <p>Name of the domain that you want to associate the package with.</p>
64    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
65        &self.domain_name
66    }
67    /// Consumes the builder and constructs a [`DissociatePackageInput`](crate::operation::dissociate_package::DissociatePackageInput).
68    pub fn build(
69        self,
70    ) -> ::std::result::Result<crate::operation::dissociate_package::DissociatePackageInput, ::aws_smithy_types::error::operation::BuildError> {
71        ::std::result::Result::Ok(crate::operation::dissociate_package::DissociatePackageInput {
72            package_id: self.package_id,
73            domain_name: self.domain_name,
74        })
75    }
76}