aws_sdk_appmesh/operation/update_mesh/
_update_mesh_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 UpdateMeshInput {
6    /// <p>The name of the service mesh to update.</p>
7    pub mesh_name: ::std::option::Option<::std::string::String>,
8    /// <p>The service mesh specification to apply.</p>
9    pub spec: ::std::option::Option<crate::types::MeshSpec>,
10    /// <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>
11    pub client_token: ::std::option::Option<::std::string::String>,
12}
13impl UpdateMeshInput {
14    /// <p>The name of the service mesh to update.</p>
15    pub fn mesh_name(&self) -> ::std::option::Option<&str> {
16        self.mesh_name.as_deref()
17    }
18    /// <p>The service mesh specification to apply.</p>
19    pub fn spec(&self) -> ::std::option::Option<&crate::types::MeshSpec> {
20        self.spec.as_ref()
21    }
22    /// <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>
23    pub fn client_token(&self) -> ::std::option::Option<&str> {
24        self.client_token.as_deref()
25    }
26}
27impl UpdateMeshInput {
28    /// Creates a new builder-style object to manufacture [`UpdateMeshInput`](crate::operation::update_mesh::UpdateMeshInput).
29    pub fn builder() -> crate::operation::update_mesh::builders::UpdateMeshInputBuilder {
30        crate::operation::update_mesh::builders::UpdateMeshInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateMeshInput`](crate::operation::update_mesh::UpdateMeshInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateMeshInputBuilder {
38    pub(crate) mesh_name: ::std::option::Option<::std::string::String>,
39    pub(crate) spec: ::std::option::Option<crate::types::MeshSpec>,
40    pub(crate) client_token: ::std::option::Option<::std::string::String>,
41}
42impl UpdateMeshInputBuilder {
43    /// <p>The name of the service mesh to update.</p>
44    /// This field is required.
45    pub fn mesh_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.mesh_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The name of the service mesh to update.</p>
50    pub fn set_mesh_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.mesh_name = input;
52        self
53    }
54    /// <p>The name of the service mesh to update.</p>
55    pub fn get_mesh_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.mesh_name
57    }
58    /// <p>The service mesh specification to apply.</p>
59    pub fn spec(mut self, input: crate::types::MeshSpec) -> Self {
60        self.spec = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The service mesh specification to apply.</p>
64    pub fn set_spec(mut self, input: ::std::option::Option<crate::types::MeshSpec>) -> Self {
65        self.spec = input;
66        self
67    }
68    /// <p>The service mesh specification to apply.</p>
69    pub fn get_spec(&self) -> &::std::option::Option<crate::types::MeshSpec> {
70        &self.spec
71    }
72    /// <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>
73    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.client_token = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <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>
78    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.client_token = input;
80        self
81    }
82    /// <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>
83    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
84        &self.client_token
85    }
86    /// Consumes the builder and constructs a [`UpdateMeshInput`](crate::operation::update_mesh::UpdateMeshInput).
87    pub fn build(self) -> ::std::result::Result<crate::operation::update_mesh::UpdateMeshInput, ::aws_smithy_types::error::operation::BuildError> {
88        ::std::result::Result::Ok(crate::operation::update_mesh::UpdateMeshInput {
89            mesh_name: self.mesh_name,
90            spec: self.spec,
91            client_token: self.client_token,
92        })
93    }
94}