Skip to main content

aws_sdk_apigateway/operation/delete_base_path_mapping/
_delete_base_path_mapping_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A request to delete the BasePathMapping resource.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteBasePathMappingInput {
7    /// <p>The domain name of the BasePathMapping resource to delete.</p>
8    pub domain_name: ::std::option::Option<::std::string::String>,
9    /// <p>The identifier for the domain name resource. Supported only for private custom domain names.</p>
10    pub domain_name_id: ::std::option::Option<::std::string::String>,
11    /// <p>The base path name of the BasePathMapping resource to delete.</p>
12    /// <p>To specify an empty base path, set this parameter to <code>'(none)'</code>.</p>
13    pub base_path: ::std::option::Option<::std::string::String>,
14}
15impl DeleteBasePathMappingInput {
16    /// <p>The domain name of the BasePathMapping resource to delete.</p>
17    pub fn domain_name(&self) -> ::std::option::Option<&str> {
18        self.domain_name.as_deref()
19    }
20    /// <p>The identifier for the domain name resource. Supported only for private custom domain names.</p>
21    pub fn domain_name_id(&self) -> ::std::option::Option<&str> {
22        self.domain_name_id.as_deref()
23    }
24    /// <p>The base path name of the BasePathMapping resource to delete.</p>
25    /// <p>To specify an empty base path, set this parameter to <code>'(none)'</code>.</p>
26    pub fn base_path(&self) -> ::std::option::Option<&str> {
27        self.base_path.as_deref()
28    }
29}
30impl DeleteBasePathMappingInput {
31    /// Creates a new builder-style object to manufacture [`DeleteBasePathMappingInput`](crate::operation::delete_base_path_mapping::DeleteBasePathMappingInput).
32    pub fn builder() -> crate::operation::delete_base_path_mapping::builders::DeleteBasePathMappingInputBuilder {
33        crate::operation::delete_base_path_mapping::builders::DeleteBasePathMappingInputBuilder::default()
34    }
35}
36
37/// A builder for [`DeleteBasePathMappingInput`](crate::operation::delete_base_path_mapping::DeleteBasePathMappingInput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct DeleteBasePathMappingInputBuilder {
41    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
42    pub(crate) domain_name_id: ::std::option::Option<::std::string::String>,
43    pub(crate) base_path: ::std::option::Option<::std::string::String>,
44}
45impl DeleteBasePathMappingInputBuilder {
46    /// <p>The domain name of the BasePathMapping resource to delete.</p>
47    /// This field is required.
48    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49        self.domain_name = ::std::option::Option::Some(input.into());
50        self
51    }
52    /// <p>The domain name of the BasePathMapping resource to delete.</p>
53    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54        self.domain_name = input;
55        self
56    }
57    /// <p>The domain name of the BasePathMapping resource to delete.</p>
58    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
59        &self.domain_name
60    }
61    /// <p>The identifier for the domain name resource. Supported only for private custom domain names.</p>
62    pub fn domain_name_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.domain_name_id = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The identifier for the domain name resource. Supported only for private custom domain names.</p>
67    pub fn set_domain_name_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68        self.domain_name_id = input;
69        self
70    }
71    /// <p>The identifier for the domain name resource. Supported only for private custom domain names.</p>
72    pub fn get_domain_name_id(&self) -> &::std::option::Option<::std::string::String> {
73        &self.domain_name_id
74    }
75    /// <p>The base path name of the BasePathMapping resource to delete.</p>
76    /// <p>To specify an empty base path, set this parameter to <code>'(none)'</code>.</p>
77    /// This field is required.
78    pub fn base_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79        self.base_path = ::std::option::Option::Some(input.into());
80        self
81    }
82    /// <p>The base path name of the BasePathMapping resource to delete.</p>
83    /// <p>To specify an empty base path, set this parameter to <code>'(none)'</code>.</p>
84    pub fn set_base_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.base_path = input;
86        self
87    }
88    /// <p>The base path name of the BasePathMapping resource to delete.</p>
89    /// <p>To specify an empty base path, set this parameter to <code>'(none)'</code>.</p>
90    pub fn get_base_path(&self) -> &::std::option::Option<::std::string::String> {
91        &self.base_path
92    }
93    /// Consumes the builder and constructs a [`DeleteBasePathMappingInput`](crate::operation::delete_base_path_mapping::DeleteBasePathMappingInput).
94    pub fn build(
95        self,
96    ) -> ::std::result::Result<crate::operation::delete_base_path_mapping::DeleteBasePathMappingInput, ::aws_smithy_types::error::operation::BuildError>
97    {
98        ::std::result::Result::Ok(crate::operation::delete_base_path_mapping::DeleteBasePathMappingInput {
99            domain_name: self.domain_name,
100            domain_name_id: self.domain_name_id,
101            base_path: self.base_path,
102        })
103    }
104}