aws-sdk-kafka 1.126.0

AWS SDK for Managed Streaming for Kafka
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Update information relating to replication between a given source and target Kafka cluster.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateReplicationInfoInput {
    /// <p>Updated consumer group replication information.</p>
    pub consumer_group_replication: ::std::option::Option<crate::types::ConsumerGroupReplicationUpdate>,
    /// <p>Current replicator version.</p>
    pub current_version: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the replicator to be updated.</p>
    pub replicator_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the source Kafka cluster.</p>
    pub source_kafka_cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the source Kafka cluster.</p>
    pub source_kafka_cluster_id: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the target Kafka cluster.</p>
    pub target_kafka_cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the target Kafka cluster.</p>
    pub target_kafka_cluster_id: ::std::option::Option<::std::string::String>,
    /// <p>Updated topic replication information.</p>
    pub topic_replication: ::std::option::Option<crate::types::TopicReplicationUpdate>,
    /// <p>Configuration for delivering replicator logs to customer destinations.</p>
    pub log_delivery: ::std::option::Option<crate::types::LogDelivery>,
}
impl UpdateReplicationInfoInput {
    /// <p>Updated consumer group replication information.</p>
    pub fn consumer_group_replication(&self) -> ::std::option::Option<&crate::types::ConsumerGroupReplicationUpdate> {
        self.consumer_group_replication.as_ref()
    }
    /// <p>Current replicator version.</p>
    pub fn current_version(&self) -> ::std::option::Option<&str> {
        self.current_version.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator to be updated.</p>
    pub fn replicator_arn(&self) -> ::std::option::Option<&str> {
        self.replicator_arn.as_deref()
    }
    /// <p>The ARN of the source Kafka cluster.</p>
    pub fn source_kafka_cluster_arn(&self) -> ::std::option::Option<&str> {
        self.source_kafka_cluster_arn.as_deref()
    }
    /// <p>The ID of the source Kafka cluster.</p>
    pub fn source_kafka_cluster_id(&self) -> ::std::option::Option<&str> {
        self.source_kafka_cluster_id.as_deref()
    }
    /// <p>The ARN of the target Kafka cluster.</p>
    pub fn target_kafka_cluster_arn(&self) -> ::std::option::Option<&str> {
        self.target_kafka_cluster_arn.as_deref()
    }
    /// <p>The ID of the target Kafka cluster.</p>
    pub fn target_kafka_cluster_id(&self) -> ::std::option::Option<&str> {
        self.target_kafka_cluster_id.as_deref()
    }
    /// <p>Updated topic replication information.</p>
    pub fn topic_replication(&self) -> ::std::option::Option<&crate::types::TopicReplicationUpdate> {
        self.topic_replication.as_ref()
    }
    /// <p>Configuration for delivering replicator logs to customer destinations.</p>
    pub fn log_delivery(&self) -> ::std::option::Option<&crate::types::LogDelivery> {
        self.log_delivery.as_ref()
    }
}
impl UpdateReplicationInfoInput {
    /// Creates a new builder-style object to manufacture [`UpdateReplicationInfoInput`](crate::operation::update_replication_info::UpdateReplicationInfoInput).
    pub fn builder() -> crate::operation::update_replication_info::builders::UpdateReplicationInfoInputBuilder {
        crate::operation::update_replication_info::builders::UpdateReplicationInfoInputBuilder::default()
    }
}

/// A builder for [`UpdateReplicationInfoInput`](crate::operation::update_replication_info::UpdateReplicationInfoInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateReplicationInfoInputBuilder {
    pub(crate) consumer_group_replication: ::std::option::Option<crate::types::ConsumerGroupReplicationUpdate>,
    pub(crate) current_version: ::std::option::Option<::std::string::String>,
    pub(crate) replicator_arn: ::std::option::Option<::std::string::String>,
    pub(crate) source_kafka_cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) source_kafka_cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) target_kafka_cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) target_kafka_cluster_id: ::std::option::Option<::std::string::String>,
    pub(crate) topic_replication: ::std::option::Option<crate::types::TopicReplicationUpdate>,
    pub(crate) log_delivery: ::std::option::Option<crate::types::LogDelivery>,
}
impl UpdateReplicationInfoInputBuilder {
    /// <p>Updated consumer group replication information.</p>
    pub fn consumer_group_replication(mut self, input: crate::types::ConsumerGroupReplicationUpdate) -> Self {
        self.consumer_group_replication = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updated consumer group replication information.</p>
    pub fn set_consumer_group_replication(mut self, input: ::std::option::Option<crate::types::ConsumerGroupReplicationUpdate>) -> Self {
        self.consumer_group_replication = input;
        self
    }
    /// <p>Updated consumer group replication information.</p>
    pub fn get_consumer_group_replication(&self) -> &::std::option::Option<crate::types::ConsumerGroupReplicationUpdate> {
        &self.consumer_group_replication
    }
    /// <p>Current replicator version.</p>
    /// This field is required.
    pub fn current_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.current_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Current replicator version.</p>
    pub fn set_current_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.current_version = input;
        self
    }
    /// <p>Current replicator version.</p>
    pub fn get_current_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.current_version
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator to be updated.</p>
    /// This field is required.
    pub fn replicator_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replicator_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator to be updated.</p>
    pub fn set_replicator_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replicator_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator to be updated.</p>
    pub fn get_replicator_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.replicator_arn
    }
    /// <p>The ARN of the source Kafka cluster.</p>
    pub fn source_kafka_cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_kafka_cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the source Kafka cluster.</p>
    pub fn set_source_kafka_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_kafka_cluster_arn = input;
        self
    }
    /// <p>The ARN of the source Kafka cluster.</p>
    pub fn get_source_kafka_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_kafka_cluster_arn
    }
    /// <p>The ID of the source Kafka cluster.</p>
    pub fn source_kafka_cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_kafka_cluster_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the source Kafka cluster.</p>
    pub fn set_source_kafka_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_kafka_cluster_id = input;
        self
    }
    /// <p>The ID of the source Kafka cluster.</p>
    pub fn get_source_kafka_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_kafka_cluster_id
    }
    /// <p>The ARN of the target Kafka cluster.</p>
    pub fn target_kafka_cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_kafka_cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the target Kafka cluster.</p>
    pub fn set_target_kafka_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_kafka_cluster_arn = input;
        self
    }
    /// <p>The ARN of the target Kafka cluster.</p>
    pub fn get_target_kafka_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_kafka_cluster_arn
    }
    /// <p>The ID of the target Kafka cluster.</p>
    pub fn target_kafka_cluster_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_kafka_cluster_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the target Kafka cluster.</p>
    pub fn set_target_kafka_cluster_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_kafka_cluster_id = input;
        self
    }
    /// <p>The ID of the target Kafka cluster.</p>
    pub fn get_target_kafka_cluster_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_kafka_cluster_id
    }
    /// <p>Updated topic replication information.</p>
    pub fn topic_replication(mut self, input: crate::types::TopicReplicationUpdate) -> Self {
        self.topic_replication = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updated topic replication information.</p>
    pub fn set_topic_replication(mut self, input: ::std::option::Option<crate::types::TopicReplicationUpdate>) -> Self {
        self.topic_replication = input;
        self
    }
    /// <p>Updated topic replication information.</p>
    pub fn get_topic_replication(&self) -> &::std::option::Option<crate::types::TopicReplicationUpdate> {
        &self.topic_replication
    }
    /// <p>Configuration for delivering replicator logs to customer destinations.</p>
    pub fn log_delivery(mut self, input: crate::types::LogDelivery) -> Self {
        self.log_delivery = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration for delivering replicator logs to customer destinations.</p>
    pub fn set_log_delivery(mut self, input: ::std::option::Option<crate::types::LogDelivery>) -> Self {
        self.log_delivery = input;
        self
    }
    /// <p>Configuration for delivering replicator logs to customer destinations.</p>
    pub fn get_log_delivery(&self) -> &::std::option::Option<crate::types::LogDelivery> {
        &self.log_delivery
    }
    /// Consumes the builder and constructs a [`UpdateReplicationInfoInput`](crate::operation::update_replication_info::UpdateReplicationInfoInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_replication_info::UpdateReplicationInfoInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_replication_info::UpdateReplicationInfoInput {
            consumer_group_replication: self.consumer_group_replication,
            current_version: self.current_version,
            replicator_arn: self.replicator_arn,
            source_kafka_cluster_arn: self.source_kafka_cluster_arn,
            source_kafka_cluster_id: self.source_kafka_cluster_id,
            target_kafka_cluster_arn: self.target_kafka_cluster_arn,
            target_kafka_cluster_id: self.target_kafka_cluster_id,
            topic_replication: self.topic_replication,
            log_delivery: self.log_delivery,
        })
    }
}