aws_sdk_quicksight/operation/create_group/
_create_group_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The response object for this operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateGroupOutput {
7    /// <p>The name of the group.</p>
8    pub group: ::std::option::Option<crate::types::Group>,
9    /// <p>The Amazon Web Services request ID for this operation.</p>
10    pub request_id: ::std::option::Option<::std::string::String>,
11    /// <p>The HTTP status of the request.</p>
12    pub status: i32,
13    _request_id: Option<String>,
14}
15impl CreateGroupOutput {
16    /// <p>The name of the group.</p>
17    pub fn group(&self) -> ::std::option::Option<&crate::types::Group> {
18        self.group.as_ref()
19    }
20    /// <p>The Amazon Web Services request ID for this operation.</p>
21    pub fn request_id(&self) -> ::std::option::Option<&str> {
22        self.request_id.as_deref()
23    }
24    /// <p>The HTTP status of the request.</p>
25    pub fn status(&self) -> i32 {
26        self.status
27    }
28}
29impl ::aws_types::request_id::RequestId for CreateGroupOutput {
30    fn request_id(&self) -> Option<&str> {
31        self._request_id.as_deref()
32    }
33}
34impl CreateGroupOutput {
35    /// Creates a new builder-style object to manufacture [`CreateGroupOutput`](crate::operation::create_group::CreateGroupOutput).
36    pub fn builder() -> crate::operation::create_group::builders::CreateGroupOutputBuilder {
37        crate::operation::create_group::builders::CreateGroupOutputBuilder::default()
38    }
39}
40
41/// A builder for [`CreateGroupOutput`](crate::operation::create_group::CreateGroupOutput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct CreateGroupOutputBuilder {
45    pub(crate) group: ::std::option::Option<crate::types::Group>,
46    pub(crate) request_id: ::std::option::Option<::std::string::String>,
47    pub(crate) status: ::std::option::Option<i32>,
48    _request_id: Option<String>,
49}
50impl CreateGroupOutputBuilder {
51    /// <p>The name of the group.</p>
52    pub fn group(mut self, input: crate::types::Group) -> Self {
53        self.group = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>The name of the group.</p>
57    pub fn set_group(mut self, input: ::std::option::Option<crate::types::Group>) -> Self {
58        self.group = input;
59        self
60    }
61    /// <p>The name of the group.</p>
62    pub fn get_group(&self) -> &::std::option::Option<crate::types::Group> {
63        &self.group
64    }
65    /// <p>The Amazon Web Services request ID for this operation.</p>
66    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.request_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The Amazon Web Services request ID for this operation.</p>
71    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.request_id = input;
73        self
74    }
75    /// <p>The Amazon Web Services request ID for this operation.</p>
76    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.request_id
78    }
79    /// <p>The HTTP status of the request.</p>
80    pub fn status(mut self, input: i32) -> Self {
81        self.status = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>The HTTP status of the request.</p>
85    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
86        self.status = input;
87        self
88    }
89    /// <p>The HTTP status of the request.</p>
90    pub fn get_status(&self) -> &::std::option::Option<i32> {
91        &self.status
92    }
93    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
94        self._request_id = Some(request_id.into());
95        self
96    }
97
98    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
99        self._request_id = request_id;
100        self
101    }
102    /// Consumes the builder and constructs a [`CreateGroupOutput`](crate::operation::create_group::CreateGroupOutput).
103    pub fn build(self) -> crate::operation::create_group::CreateGroupOutput {
104        crate::operation::create_group::CreateGroupOutput {
105            group: self.group,
106            request_id: self.request_id,
107            status: self.status.unwrap_or_default(),
108            _request_id: self._request_id,
109        }
110    }
111}