1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The parameters for using an MSK stream as a source.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePipeSourceManagedStreamingKafkaParameters {
    /// <p>The maximum number of records to include in each batch.</p>
    #[doc(hidden)]
    pub batch_size: ::std::option::Option<i32>,
    /// <p>The credentials needed to access the resource.</p>
    #[doc(hidden)]
    pub credentials: ::std::option::Option<crate::types::MskAccessCredentials>,
    /// <p>The maximum length of a time to wait for events.</p>
    #[doc(hidden)]
    pub maximum_batching_window_in_seconds: ::std::option::Option<i32>,
}
impl UpdatePipeSourceManagedStreamingKafkaParameters {
    /// <p>The maximum number of records to include in each batch.</p>
    pub fn batch_size(&self) -> ::std::option::Option<i32> {
        self.batch_size
    }
    /// <p>The credentials needed to access the resource.</p>
    pub fn credentials(&self) -> ::std::option::Option<&crate::types::MskAccessCredentials> {
        self.credentials.as_ref()
    }
    /// <p>The maximum length of a time to wait for events.</p>
    pub fn maximum_batching_window_in_seconds(&self) -> ::std::option::Option<i32> {
        self.maximum_batching_window_in_seconds
    }
}
impl UpdatePipeSourceManagedStreamingKafkaParameters {
    /// Creates a new builder-style object to manufacture [`UpdatePipeSourceManagedStreamingKafkaParameters`](crate::types::UpdatePipeSourceManagedStreamingKafkaParameters).
    pub fn builder(
    ) -> crate::types::builders::UpdatePipeSourceManagedStreamingKafkaParametersBuilder {
        crate::types::builders::UpdatePipeSourceManagedStreamingKafkaParametersBuilder::default()
    }
}

/// A builder for [`UpdatePipeSourceManagedStreamingKafkaParameters`](crate::types::UpdatePipeSourceManagedStreamingKafkaParameters).
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct UpdatePipeSourceManagedStreamingKafkaParametersBuilder {
    pub(crate) batch_size: ::std::option::Option<i32>,
    pub(crate) credentials: ::std::option::Option<crate::types::MskAccessCredentials>,
    pub(crate) maximum_batching_window_in_seconds: ::std::option::Option<i32>,
}
impl UpdatePipeSourceManagedStreamingKafkaParametersBuilder {
    /// <p>The maximum number of records to include in each batch.</p>
    pub fn batch_size(mut self, input: i32) -> Self {
        self.batch_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of records to include in each batch.</p>
    pub fn set_batch_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.batch_size = input;
        self
    }
    /// <p>The credentials needed to access the resource.</p>
    pub fn credentials(mut self, input: crate::types::MskAccessCredentials) -> Self {
        self.credentials = ::std::option::Option::Some(input);
        self
    }
    /// <p>The credentials needed to access the resource.</p>
    pub fn set_credentials(
        mut self,
        input: ::std::option::Option<crate::types::MskAccessCredentials>,
    ) -> Self {
        self.credentials = input;
        self
    }
    /// <p>The maximum length of a time to wait for events.</p>
    pub fn maximum_batching_window_in_seconds(mut self, input: i32) -> Self {
        self.maximum_batching_window_in_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum length of a time to wait for events.</p>
    pub fn set_maximum_batching_window_in_seconds(
        mut self,
        input: ::std::option::Option<i32>,
    ) -> Self {
        self.maximum_batching_window_in_seconds = input;
        self
    }
    /// Consumes the builder and constructs a [`UpdatePipeSourceManagedStreamingKafkaParameters`](crate::types::UpdatePipeSourceManagedStreamingKafkaParameters).
    pub fn build(self) -> crate::types::UpdatePipeSourceManagedStreamingKafkaParameters {
        crate::types::UpdatePipeSourceManagedStreamingKafkaParameters {
            batch_size: self.batch_size,
            credentials: self.credentials,
            maximum_batching_window_in_seconds: self.maximum_batching_window_in_seconds,
        }
    }
}