aws_sdk_appmesh/operation/describe_route/
_describe_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 DescribeRouteInput {
6    /// <p>The name of the route to describe.</p>
7    pub route_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the service mesh that the route resides in.</p>
9    pub mesh_name: ::std::option::Option<::std::string::String>,
10    /// <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>
11    pub mesh_owner: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the virtual router that the route is associated with.</p>
13    pub virtual_router_name: ::std::option::Option<::std::string::String>,
14}
15impl DescribeRouteInput {
16    /// <p>The name of the route to describe.</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 that the route resides in.</p>
21    pub fn mesh_name(&self) -> ::std::option::Option<&str> {
22        self.mesh_name.as_deref()
23    }
24    /// <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>
25    pub fn mesh_owner(&self) -> ::std::option::Option<&str> {
26        self.mesh_owner.as_deref()
27    }
28    /// <p>The name of the virtual router that the route is associated with.</p>
29    pub fn virtual_router_name(&self) -> ::std::option::Option<&str> {
30        self.virtual_router_name.as_deref()
31    }
32}
33impl DescribeRouteInput {
34    /// Creates a new builder-style object to manufacture [`DescribeRouteInput`](crate::operation::describe_route::DescribeRouteInput).
35    pub fn builder() -> crate::operation::describe_route::builders::DescribeRouteInputBuilder {
36        crate::operation::describe_route::builders::DescribeRouteInputBuilder::default()
37    }
38}
39
40/// A builder for [`DescribeRouteInput`](crate::operation::describe_route::DescribeRouteInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DescribeRouteInputBuilder {
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) mesh_owner: ::std::option::Option<::std::string::String>,
47    pub(crate) virtual_router_name: ::std::option::Option<::std::string::String>,
48}
49impl DescribeRouteInputBuilder {
50    /// <p>The name of the route to describe.</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 describe.</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 describe.</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 that the route resides 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 that the route resides 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 that the route resides in.</p>
77    pub fn get_mesh_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.mesh_name
79    }
80    /// <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>
81    pub fn mesh_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.mesh_owner = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <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>
86    pub fn set_mesh_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.mesh_owner = input;
88        self
89    }
90    /// <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>
91    pub fn get_mesh_owner(&self) -> &::std::option::Option<::std::string::String> {
92        &self.mesh_owner
93    }
94    /// <p>The name of the virtual router that the route is associated with.</p>
95    /// This field is required.
96    pub fn virtual_router_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.virtual_router_name = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The name of the virtual router that the route is associated with.</p>
101    pub fn set_virtual_router_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.virtual_router_name = input;
103        self
104    }
105    /// <p>The name of the virtual router that the route is associated with.</p>
106    pub fn get_virtual_router_name(&self) -> &::std::option::Option<::std::string::String> {
107        &self.virtual_router_name
108    }
109    /// Consumes the builder and constructs a [`DescribeRouteInput`](crate::operation::describe_route::DescribeRouteInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::describe_route::DescribeRouteInput, ::aws_smithy_types::error::operation::BuildError> {
113        ::std::result::Result::Ok(crate::operation::describe_route::DescribeRouteInput {
114            route_name: self.route_name,
115            mesh_name: self.mesh_name,
116            mesh_owner: self.mesh_owner,
117            virtual_router_name: self.virtual_router_name,
118        })
119    }
120}