Skip to main content

aws_sdk_securityhub/types/
_aws_kinesis_stream_details.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides information about an Amazon Kinesis data stream.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AwsKinesisStreamDetails {
7    /// <p>The name of the Kinesis stream. If you don't specify a name, CloudFront generates a unique physical ID and uses that ID for the stream name.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the Kinesis data stream.</p>
10    pub arn: ::std::option::Option<::std::string::String>,
11    /// <p>When specified, enables or updates server-side encryption using an KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.</p>
12    pub stream_encryption: ::std::option::Option<crate::types::AwsKinesisStreamStreamEncryptionDetails>,
13    /// <p>The number of shards that the stream uses.</p>
14    pub shard_count: ::std::option::Option<i32>,
15    /// <p>The number of hours for the data records that are stored in shards to remain accessible.</p>
16    pub retention_period_hours: ::std::option::Option<i32>,
17}
18impl AwsKinesisStreamDetails {
19    /// <p>The name of the Kinesis stream. If you don't specify a name, CloudFront generates a unique physical ID and uses that ID for the stream name.</p>
20    pub fn name(&self) -> ::std::option::Option<&str> {
21        self.name.as_deref()
22    }
23    /// <p>The Amazon Resource Name (ARN) of the Kinesis data stream.</p>
24    pub fn arn(&self) -> ::std::option::Option<&str> {
25        self.arn.as_deref()
26    }
27    /// <p>When specified, enables or updates server-side encryption using an KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.</p>
28    pub fn stream_encryption(&self) -> ::std::option::Option<&crate::types::AwsKinesisStreamStreamEncryptionDetails> {
29        self.stream_encryption.as_ref()
30    }
31    /// <p>The number of shards that the stream uses.</p>
32    pub fn shard_count(&self) -> ::std::option::Option<i32> {
33        self.shard_count
34    }
35    /// <p>The number of hours for the data records that are stored in shards to remain accessible.</p>
36    pub fn retention_period_hours(&self) -> ::std::option::Option<i32> {
37        self.retention_period_hours
38    }
39}
40impl AwsKinesisStreamDetails {
41    /// Creates a new builder-style object to manufacture [`AwsKinesisStreamDetails`](crate::types::AwsKinesisStreamDetails).
42    pub fn builder() -> crate::types::builders::AwsKinesisStreamDetailsBuilder {
43        crate::types::builders::AwsKinesisStreamDetailsBuilder::default()
44    }
45}
46
47/// A builder for [`AwsKinesisStreamDetails`](crate::types::AwsKinesisStreamDetails).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct AwsKinesisStreamDetailsBuilder {
51    pub(crate) name: ::std::option::Option<::std::string::String>,
52    pub(crate) arn: ::std::option::Option<::std::string::String>,
53    pub(crate) stream_encryption: ::std::option::Option<crate::types::AwsKinesisStreamStreamEncryptionDetails>,
54    pub(crate) shard_count: ::std::option::Option<i32>,
55    pub(crate) retention_period_hours: ::std::option::Option<i32>,
56}
57impl AwsKinesisStreamDetailsBuilder {
58    /// <p>The name of the Kinesis stream. If you don't specify a name, CloudFront generates a unique physical ID and uses that ID for the stream name.</p>
59    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The name of the Kinesis stream. If you don't specify a name, CloudFront generates a unique physical ID and uses that ID for the stream name.</p>
64    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.name = input;
66        self
67    }
68    /// <p>The name of the Kinesis stream. If you don't specify a name, CloudFront generates a unique physical ID and uses that ID for the stream name.</p>
69    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.name
71    }
72    /// <p>The Amazon Resource Name (ARN) of the Kinesis data stream.</p>
73    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The Amazon Resource Name (ARN) of the Kinesis data stream.</p>
78    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.arn = input;
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) of the Kinesis data stream.</p>
83    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.arn
85    }
86    /// <p>When specified, enables or updates server-side encryption using an KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.</p>
87    pub fn stream_encryption(mut self, input: crate::types::AwsKinesisStreamStreamEncryptionDetails) -> Self {
88        self.stream_encryption = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>When specified, enables or updates server-side encryption using an KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.</p>
92    pub fn set_stream_encryption(mut self, input: ::std::option::Option<crate::types::AwsKinesisStreamStreamEncryptionDetails>) -> Self {
93        self.stream_encryption = input;
94        self
95    }
96    /// <p>When specified, enables or updates server-side encryption using an KMS key for a specified stream. Removing this property from your stack template and updating your stack disables encryption.</p>
97    pub fn get_stream_encryption(&self) -> &::std::option::Option<crate::types::AwsKinesisStreamStreamEncryptionDetails> {
98        &self.stream_encryption
99    }
100    /// <p>The number of shards that the stream uses.</p>
101    pub fn shard_count(mut self, input: i32) -> Self {
102        self.shard_count = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The number of shards that the stream uses.</p>
106    pub fn set_shard_count(mut self, input: ::std::option::Option<i32>) -> Self {
107        self.shard_count = input;
108        self
109    }
110    /// <p>The number of shards that the stream uses.</p>
111    pub fn get_shard_count(&self) -> &::std::option::Option<i32> {
112        &self.shard_count
113    }
114    /// <p>The number of hours for the data records that are stored in shards to remain accessible.</p>
115    pub fn retention_period_hours(mut self, input: i32) -> Self {
116        self.retention_period_hours = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>The number of hours for the data records that are stored in shards to remain accessible.</p>
120    pub fn set_retention_period_hours(mut self, input: ::std::option::Option<i32>) -> Self {
121        self.retention_period_hours = input;
122        self
123    }
124    /// <p>The number of hours for the data records that are stored in shards to remain accessible.</p>
125    pub fn get_retention_period_hours(&self) -> &::std::option::Option<i32> {
126        &self.retention_period_hours
127    }
128    /// Consumes the builder and constructs a [`AwsKinesisStreamDetails`](crate::types::AwsKinesisStreamDetails).
129    pub fn build(self) -> crate::types::AwsKinesisStreamDetails {
130        crate::types::AwsKinesisStreamDetails {
131            name: self.name,
132            arn: self.arn,
133            stream_encryption: self.stream_encryption,
134            shard_count: self.shard_count,
135            retention_period_hours: self.retention_period_hours,
136        }
137    }
138}