aws_sdk_appmesh/operation/describe_mesh/
_describe_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 DescribeMeshInput {
6    /// <p>The name of the service mesh to describe.</p>
7    pub mesh_name: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub mesh_owner: ::std::option::Option<::std::string::String>,
10}
11impl DescribeMeshInput {
12    /// <p>The name of the service mesh to describe.</p>
13    pub fn mesh_name(&self) -> ::std::option::Option<&str> {
14        self.mesh_name.as_deref()
15    }
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 fn mesh_owner(&self) -> ::std::option::Option<&str> {
18        self.mesh_owner.as_deref()
19    }
20}
21impl DescribeMeshInput {
22    /// Creates a new builder-style object to manufacture [`DescribeMeshInput`](crate::operation::describe_mesh::DescribeMeshInput).
23    pub fn builder() -> crate::operation::describe_mesh::builders::DescribeMeshInputBuilder {
24        crate::operation::describe_mesh::builders::DescribeMeshInputBuilder::default()
25    }
26}
27
28/// A builder for [`DescribeMeshInput`](crate::operation::describe_mesh::DescribeMeshInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DescribeMeshInputBuilder {
32    pub(crate) mesh_name: ::std::option::Option<::std::string::String>,
33    pub(crate) mesh_owner: ::std::option::Option<::std::string::String>,
34}
35impl DescribeMeshInputBuilder {
36    /// <p>The name of the service mesh to describe.</p>
37    /// This field is required.
38    pub fn mesh_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.mesh_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the service mesh to describe.</p>
43    pub fn set_mesh_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.mesh_name = input;
45        self
46    }
47    /// <p>The name of the service mesh to describe.</p>
48    pub fn get_mesh_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.mesh_name
50    }
51    /// <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>
52    pub fn mesh_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.mesh_owner = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <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>
57    pub fn set_mesh_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.mesh_owner = input;
59        self
60    }
61    /// <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>
62    pub fn get_mesh_owner(&self) -> &::std::option::Option<::std::string::String> {
63        &self.mesh_owner
64    }
65    /// Consumes the builder and constructs a [`DescribeMeshInput`](crate::operation::describe_mesh::DescribeMeshInput).
66    pub fn build(
67        self,
68    ) -> ::std::result::Result<crate::operation::describe_mesh::DescribeMeshInput, ::aws_smithy_types::error::operation::BuildError> {
69        ::std::result::Result::Ok(crate::operation::describe_mesh::DescribeMeshInput {
70            mesh_name: self.mesh_name,
71            mesh_owner: self.mesh_owner,
72        })
73    }
74}