aws_sdk_iotanalytics/operation/update_channel/_update_channel_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 UpdateChannelInput {
6 /// <p>The name of the channel to be updated.</p>
7 pub channel_name: ::std::option::Option<::std::string::String>,
8 /// <p>Where channel data is stored. You can choose one of <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not specified, the default is <code>serviceManagedS3</code>. You can't change this storage option after the channel is created.</p>
9 pub channel_storage: ::std::option::Option<crate::types::ChannelStorage>,
10 /// <p>How long, in days, message data is kept for the channel. The retention period can't be updated if the channel's Amazon S3 storage is customer-managed.</p>
11 pub retention_period: ::std::option::Option<crate::types::RetentionPeriod>,
12}
13impl UpdateChannelInput {
14 /// <p>The name of the channel to be updated.</p>
15 pub fn channel_name(&self) -> ::std::option::Option<&str> {
16 self.channel_name.as_deref()
17 }
18 /// <p>Where channel data is stored. You can choose one of <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not specified, the default is <code>serviceManagedS3</code>. You can't change this storage option after the channel is created.</p>
19 pub fn channel_storage(&self) -> ::std::option::Option<&crate::types::ChannelStorage> {
20 self.channel_storage.as_ref()
21 }
22 /// <p>How long, in days, message data is kept for the channel. The retention period can't be updated if the channel's Amazon S3 storage is customer-managed.</p>
23 pub fn retention_period(&self) -> ::std::option::Option<&crate::types::RetentionPeriod> {
24 self.retention_period.as_ref()
25 }
26}
27impl UpdateChannelInput {
28 /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
29 pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
30 crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
31 }
32}
33
34/// A builder for [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateChannelInputBuilder {
38 pub(crate) channel_name: ::std::option::Option<::std::string::String>,
39 pub(crate) channel_storage: ::std::option::Option<crate::types::ChannelStorage>,
40 pub(crate) retention_period: ::std::option::Option<crate::types::RetentionPeriod>,
41}
42impl UpdateChannelInputBuilder {
43 /// <p>The name of the channel to be updated.</p>
44 /// This field is required.
45 pub fn channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.channel_name = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// <p>The name of the channel to be updated.</p>
50 pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.channel_name = input;
52 self
53 }
54 /// <p>The name of the channel to be updated.</p>
55 pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
56 &self.channel_name
57 }
58 /// <p>Where channel data is stored. You can choose one of <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not specified, the default is <code>serviceManagedS3</code>. You can't change this storage option after the channel is created.</p>
59 pub fn channel_storage(mut self, input: crate::types::ChannelStorage) -> Self {
60 self.channel_storage = ::std::option::Option::Some(input);
61 self
62 }
63 /// <p>Where channel data is stored. You can choose one of <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not specified, the default is <code>serviceManagedS3</code>. You can't change this storage option after the channel is created.</p>
64 pub fn set_channel_storage(mut self, input: ::std::option::Option<crate::types::ChannelStorage>) -> Self {
65 self.channel_storage = input;
66 self
67 }
68 /// <p>Where channel data is stored. You can choose one of <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not specified, the default is <code>serviceManagedS3</code>. You can't change this storage option after the channel is created.</p>
69 pub fn get_channel_storage(&self) -> &::std::option::Option<crate::types::ChannelStorage> {
70 &self.channel_storage
71 }
72 /// <p>How long, in days, message data is kept for the channel. The retention period can't be updated if the channel's Amazon S3 storage is customer-managed.</p>
73 pub fn retention_period(mut self, input: crate::types::RetentionPeriod) -> Self {
74 self.retention_period = ::std::option::Option::Some(input);
75 self
76 }
77 /// <p>How long, in days, message data is kept for the channel. The retention period can't be updated if the channel's Amazon S3 storage is customer-managed.</p>
78 pub fn set_retention_period(mut self, input: ::std::option::Option<crate::types::RetentionPeriod>) -> Self {
79 self.retention_period = input;
80 self
81 }
82 /// <p>How long, in days, message data is kept for the channel. The retention period can't be updated if the channel's Amazon S3 storage is customer-managed.</p>
83 pub fn get_retention_period(&self) -> &::std::option::Option<crate::types::RetentionPeriod> {
84 &self.retention_period
85 }
86 /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
87 pub fn build(
88 self,
89 ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::update_channel::UpdateChannelInput {
91 channel_name: self.channel_name,
92 channel_storage: self.channel_storage,
93 retention_period: self.retention_period,
94 })
95 }
96}