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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SelfManagedKafkaEventSourceConfig {
/// <p>The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id">Customizable consumer group ID</a>.</p>
#[doc(hidden)]
pub consumer_group_id: std::option::Option<std::string::String>,
}
impl SelfManagedKafkaEventSourceConfig {
/// <p>The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id">Customizable consumer group ID</a>.</p>
pub fn consumer_group_id(&self) -> std::option::Option<&str> {
self.consumer_group_id.as_deref()
}
}
impl SelfManagedKafkaEventSourceConfig {
/// Creates a new builder-style object to manufacture [`SelfManagedKafkaEventSourceConfig`](crate::types::SelfManagedKafkaEventSourceConfig).
pub fn builder() -> crate::types::builders::SelfManagedKafkaEventSourceConfigBuilder {
crate::types::builders::SelfManagedKafkaEventSourceConfigBuilder::default()
}
}
/// A builder for [`SelfManagedKafkaEventSourceConfig`](crate::types::SelfManagedKafkaEventSourceConfig).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SelfManagedKafkaEventSourceConfigBuilder {
pub(crate) consumer_group_id: std::option::Option<std::string::String>,
}
impl SelfManagedKafkaEventSourceConfigBuilder {
/// <p>The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id">Customizable consumer group ID</a>.</p>
pub fn consumer_group_id(mut self, input: impl Into<std::string::String>) -> Self {
self.consumer_group_id = Some(input.into());
self
}
/// <p>The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id">Customizable consumer group ID</a>.</p>
pub fn set_consumer_group_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.consumer_group_id = input;
self
}
/// Consumes the builder and constructs a [`SelfManagedKafkaEventSourceConfig`](crate::types::SelfManagedKafkaEventSourceConfig).
pub fn build(self) -> crate::types::SelfManagedKafkaEventSourceConfig {
crate::types::SelfManagedKafkaEventSourceConfig {
consumer_group_id: self.consumer_group_id,
}
}
}