aws_sdk_appmesh/operation/update_route/
_update_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 UpdateRouteInput {
6    /// <p>The name of the route to update.</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 name of the virtual router that the route is associated with.</p>
11    pub virtual_router_name: ::std::option::Option<::std::string::String>,
12    /// <p>The new route specification to apply. This overwrites the existing data.</p>
13    pub spec: ::std::option::Option<crate::types::RouteSpec>,
14    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.</p>
15    pub client_token: ::std::option::Option<::std::string::String>,
16    /// <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>
17    pub mesh_owner: ::std::option::Option<::std::string::String>,
18}
19impl UpdateRouteInput {
20    /// <p>The name of the route to update.</p>
21    pub fn route_name(&self) -> ::std::option::Option<&str> {
22        self.route_name.as_deref()
23    }
24    /// <p>The name of the service mesh that the route resides in.</p>
25    pub fn mesh_name(&self) -> ::std::option::Option<&str> {
26        self.mesh_name.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    /// <p>The new route specification to apply. This overwrites the existing data.</p>
33    pub fn spec(&self) -> ::std::option::Option<&crate::types::RouteSpec> {
34        self.spec.as_ref()
35    }
36    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.</p>
37    pub fn client_token(&self) -> ::std::option::Option<&str> {
38        self.client_token.as_deref()
39    }
40    /// <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>
41    pub fn mesh_owner(&self) -> ::std::option::Option<&str> {
42        self.mesh_owner.as_deref()
43    }
44}
45impl UpdateRouteInput {
46    /// Creates a new builder-style object to manufacture [`UpdateRouteInput`](crate::operation::update_route::UpdateRouteInput).
47    pub fn builder() -> crate::operation::update_route::builders::UpdateRouteInputBuilder {
48        crate::operation::update_route::builders::UpdateRouteInputBuilder::default()
49    }
50}
51
52/// A builder for [`UpdateRouteInput`](crate::operation::update_route::UpdateRouteInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct UpdateRouteInputBuilder {
56    pub(crate) route_name: ::std::option::Option<::std::string::String>,
57    pub(crate) mesh_name: ::std::option::Option<::std::string::String>,
58    pub(crate) virtual_router_name: ::std::option::Option<::std::string::String>,
59    pub(crate) spec: ::std::option::Option<crate::types::RouteSpec>,
60    pub(crate) client_token: ::std::option::Option<::std::string::String>,
61    pub(crate) mesh_owner: ::std::option::Option<::std::string::String>,
62}
63impl UpdateRouteInputBuilder {
64    /// <p>The name of the route to update.</p>
65    /// This field is required.
66    pub fn route_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.route_name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the route to update.</p>
71    pub fn set_route_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.route_name = input;
73        self
74    }
75    /// <p>The name of the route to update.</p>
76    pub fn get_route_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.route_name
78    }
79    /// <p>The name of the service mesh that the route resides in.</p>
80    /// This field is required.
81    pub fn mesh_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.mesh_name = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The name of the service mesh that the route resides in.</p>
86    pub fn set_mesh_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.mesh_name = input;
88        self
89    }
90    /// <p>The name of the service mesh that the route resides in.</p>
91    pub fn get_mesh_name(&self) -> &::std::option::Option<::std::string::String> {
92        &self.mesh_name
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    /// <p>The new route specification to apply. This overwrites the existing data.</p>
110    /// This field is required.
111    pub fn spec(mut self, input: crate::types::RouteSpec) -> Self {
112        self.spec = ::std::option::Option::Some(input);
113        self
114    }
115    /// <p>The new route specification to apply. This overwrites the existing data.</p>
116    pub fn set_spec(mut self, input: ::std::option::Option<crate::types::RouteSpec>) -> Self {
117        self.spec = input;
118        self
119    }
120    /// <p>The new route specification to apply. This overwrites the existing data.</p>
121    pub fn get_spec(&self) -> &::std::option::Option<crate::types::RouteSpec> {
122        &self.spec
123    }
124    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.</p>
125    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.client_token = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.</p>
130    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.client_token = input;
132        self
133    }
134    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 36 letters, numbers, hyphens, and underscores are allowed.</p>
135    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
136        &self.client_token
137    }
138    /// <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>
139    pub fn mesh_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.mesh_owner = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <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>
144    pub fn set_mesh_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.mesh_owner = input;
146        self
147    }
148    /// <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>
149    pub fn get_mesh_owner(&self) -> &::std::option::Option<::std::string::String> {
150        &self.mesh_owner
151    }
152    /// Consumes the builder and constructs a [`UpdateRouteInput`](crate::operation::update_route::UpdateRouteInput).
153    pub fn build(self) -> ::std::result::Result<crate::operation::update_route::UpdateRouteInput, ::aws_smithy_types::error::operation::BuildError> {
154        ::std::result::Result::Ok(crate::operation::update_route::UpdateRouteInput {
155            route_name: self.route_name,
156            mesh_name: self.mesh_name,
157            virtual_router_name: self.virtual_router_name,
158            spec: self.spec,
159            client_token: self.client_token,
160            mesh_owner: self.mesh_owner,
161        })
162    }
163}