aws_sdk_xray/operation/get_group/
_get_group_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 GetGroupInput {
6    /// <p>The case-sensitive name of the group.</p>
7    pub group_name: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the group that was generated on creation.</p>
9    pub group_arn: ::std::option::Option<::std::string::String>,
10}
11impl GetGroupInput {
12    /// <p>The case-sensitive name of the group.</p>
13    pub fn group_name(&self) -> ::std::option::Option<&str> {
14        self.group_name.as_deref()
15    }
16    /// <p>The ARN of the group that was generated on creation.</p>
17    pub fn group_arn(&self) -> ::std::option::Option<&str> {
18        self.group_arn.as_deref()
19    }
20}
21impl GetGroupInput {
22    /// Creates a new builder-style object to manufacture [`GetGroupInput`](crate::operation::get_group::GetGroupInput).
23    pub fn builder() -> crate::operation::get_group::builders::GetGroupInputBuilder {
24        crate::operation::get_group::builders::GetGroupInputBuilder::default()
25    }
26}
27
28/// A builder for [`GetGroupInput`](crate::operation::get_group::GetGroupInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetGroupInputBuilder {
32    pub(crate) group_name: ::std::option::Option<::std::string::String>,
33    pub(crate) group_arn: ::std::option::Option<::std::string::String>,
34}
35impl GetGroupInputBuilder {
36    /// <p>The case-sensitive name of the group.</p>
37    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38        self.group_name = ::std::option::Option::Some(input.into());
39        self
40    }
41    /// <p>The case-sensitive name of the group.</p>
42    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43        self.group_name = input;
44        self
45    }
46    /// <p>The case-sensitive name of the group.</p>
47    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
48        &self.group_name
49    }
50    /// <p>The ARN of the group that was generated on creation.</p>
51    pub fn group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.group_arn = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The ARN of the group that was generated on creation.</p>
56    pub fn set_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.group_arn = input;
58        self
59    }
60    /// <p>The ARN of the group that was generated on creation.</p>
61    pub fn get_group_arn(&self) -> &::std::option::Option<::std::string::String> {
62        &self.group_arn
63    }
64    /// Consumes the builder and constructs a [`GetGroupInput`](crate::operation::get_group::GetGroupInput).
65    pub fn build(self) -> ::std::result::Result<crate::operation::get_group::GetGroupInput, ::aws_smithy_types::error::operation::BuildError> {
66        ::std::result::Result::Ok(crate::operation::get_group::GetGroupInput {
67            group_name: self.group_name,
68            group_arn: self.group_arn,
69        })
70    }
71}