aws_sdk_macie2/types/_group_count.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides a group of results for a query that retrieved aggregated statistical data about findings.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GroupCount {
7 /// <p>The total number of findings in the group of query results.</p>
8 pub count: ::std::option::Option<i64>,
9 /// <p>The name of the property that defines the group in the query results, as specified by the groupBy property in the query request.</p>
10 pub group_key: ::std::option::Option<::std::string::String>,
11}
12impl GroupCount {
13 /// <p>The total number of findings in the group of query results.</p>
14 pub fn count(&self) -> ::std::option::Option<i64> {
15 self.count
16 }
17 /// <p>The name of the property that defines the group in the query results, as specified by the groupBy property in the query request.</p>
18 pub fn group_key(&self) -> ::std::option::Option<&str> {
19 self.group_key.as_deref()
20 }
21}
22impl GroupCount {
23 /// Creates a new builder-style object to manufacture [`GroupCount`](crate::types::GroupCount).
24 pub fn builder() -> crate::types::builders::GroupCountBuilder {
25 crate::types::builders::GroupCountBuilder::default()
26 }
27}
28
29/// A builder for [`GroupCount`](crate::types::GroupCount).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct GroupCountBuilder {
33 pub(crate) count: ::std::option::Option<i64>,
34 pub(crate) group_key: ::std::option::Option<::std::string::String>,
35}
36impl GroupCountBuilder {
37 /// <p>The total number of findings in the group of query results.</p>
38 pub fn count(mut self, input: i64) -> Self {
39 self.count = ::std::option::Option::Some(input);
40 self
41 }
42 /// <p>The total number of findings in the group of query results.</p>
43 pub fn set_count(mut self, input: ::std::option::Option<i64>) -> Self {
44 self.count = input;
45 self
46 }
47 /// <p>The total number of findings in the group of query results.</p>
48 pub fn get_count(&self) -> &::std::option::Option<i64> {
49 &self.count
50 }
51 /// <p>The name of the property that defines the group in the query results, as specified by the groupBy property in the query request.</p>
52 pub fn group_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.group_key = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The name of the property that defines the group in the query results, as specified by the groupBy property in the query request.</p>
57 pub fn set_group_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.group_key = input;
59 self
60 }
61 /// <p>The name of the property that defines the group in the query results, as specified by the groupBy property in the query request.</p>
62 pub fn get_group_key(&self) -> &::std::option::Option<::std::string::String> {
63 &self.group_key
64 }
65 /// Consumes the builder and constructs a [`GroupCount`](crate::types::GroupCount).
66 pub fn build(self) -> crate::types::GroupCount {
67 crate::types::GroupCount {
68 count: self.count,
69 group_key: self.group_key,
70 }
71 }
72}