aws_sdk_appmesh/operation/delete_route/
_delete_route_input.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 DeleteRouteInput {
6    /// <p>The name of the route to delete.</p>
7    pub route_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the service mesh to delete the route in.</p>
9    pub mesh_name: ::std::option::Option<::std::string::String>,
10    /// <p>The name of the virtual router to delete the route in.</p>
11    pub virtual_router_name: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
13    pub mesh_owner: ::std::option::Option<::std::string::String>,
14}
15impl DeleteRouteInput {
16    /// <p>The name of the route to delete.</p>
17    pub fn route_name(&self) -> ::std::option::Option<&str> {
18        self.route_name.as_deref()
19    }
20    /// <p>The name of the service mesh to delete the route in.</p>
21    pub fn mesh_name(&self) -> ::std::option::Option<&str> {
22        self.mesh_name.as_deref()
23    }
24    /// <p>The name of the virtual router to delete the route in.</p>
25    pub fn virtual_router_name(&self) -> ::std::option::Option<&str> {
26        self.virtual_router_name.as_deref()
27    }
28    /// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
29    pub fn mesh_owner(&self) -> ::std::option::Option<&str> {
30        self.mesh_owner.as_deref()
31    }
32}
33impl DeleteRouteInput {
34    /// Creates a new builder-style object to manufacture [`DeleteRouteInput`](crate::operation::delete_route::DeleteRouteInput).
35    pub fn builder() -> crate::operation::delete_route::builders::DeleteRouteInputBuilder {
36        crate::operation::delete_route::builders::DeleteRouteInputBuilder::default()
37    }
38}
39
40/// A builder for [`DeleteRouteInput`](crate::operation::delete_route::DeleteRouteInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteRouteInputBuilder {
44    pub(crate) route_name: ::std::option::Option<::std::string::String>,
45    pub(crate) mesh_name: ::std::option::Option<::std::string::String>,
46    pub(crate) virtual_router_name: ::std::option::Option<::std::string::String>,
47    pub(crate) mesh_owner: ::std::option::Option<::std::string::String>,
48}
49impl DeleteRouteInputBuilder {
50    /// <p>The name of the route to delete.</p>
51    /// This field is required.
52    pub fn route_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.route_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The name of the route to delete.</p>
57    pub fn set_route_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.route_name = input;
59        self
60    }
61    /// <p>The name of the route to delete.</p>
62    pub fn get_route_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.route_name
64    }
65    /// <p>The name of the service mesh to delete the route in.</p>
66    /// This field is required.
67    pub fn mesh_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.mesh_name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The name of the service mesh to delete the route in.</p>
72    pub fn set_mesh_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.mesh_name = input;
74        self
75    }
76    /// <p>The name of the service mesh to delete the route in.</p>
77    pub fn get_mesh_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.mesh_name
79    }
80    /// <p>The name of the virtual router to delete the route in.</p>
81    /// This field is required.
82    pub fn virtual_router_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.virtual_router_name = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The name of the virtual router to delete the route in.</p>
87    pub fn set_virtual_router_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.virtual_router_name = input;
89        self
90    }
91    /// <p>The name of the virtual router to delete the route in.</p>
92    pub fn get_virtual_router_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.virtual_router_name
94    }
95    /// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
96    pub fn mesh_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.mesh_owner = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
101    pub fn set_mesh_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.mesh_owner = input;
103        self
104    }
105    /// <p>The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see <a href="https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html">Working with shared meshes</a>.</p>
106    pub fn get_mesh_owner(&self) -> &::std::option::Option<::std::string::String> {
107        &self.mesh_owner
108    }
109    /// Consumes the builder and constructs a [`DeleteRouteInput`](crate::operation::delete_route::DeleteRouteInput).
110    pub fn build(self) -> ::std::result::Result<crate::operation::delete_route::DeleteRouteInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::delete_route::DeleteRouteInput {
112            route_name: self.route_name,
113            mesh_name: self.mesh_name,
114            virtual_router_name: self.virtual_router_name,
115            mesh_owner: self.mesh_owner,
116        })
117    }
118}