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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeReplicatorOutput {
    /// <p>The time when the replicator was created.</p>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The current version number of the replicator.</p>
    pub current_version: ::std::option::Option<::std::string::String>,
    /// <p>Whether this resource is a replicator reference.</p>
    pub is_replicator_reference: ::std::option::Option<bool>,
    /// <p>Kafka Clusters used in setting up sources / targets for replication.</p>
    pub kafka_clusters: ::std::option::Option<::std::vec::Vec<crate::types::KafkaClusterDescription>>,
    /// <p>A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.</p>
    pub replication_info_list: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationInfoDescription>>,
    /// <p>The Amazon Resource Name (ARN) of the replicator.</p>
    pub replicator_arn: ::std::option::Option<::std::string::String>,
    /// <p>The description of the replicator.</p>
    pub replicator_description: ::std::option::Option<::std::string::String>,
    /// <p>The name of the replicator.</p>
    pub replicator_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the replicator resource in the region where the replicator was created.</p>
    pub replicator_resource_arn: ::std::option::Option<::std::string::String>,
    /// <p>State of the replicator.</p>
    pub replicator_state: ::std::option::Option<crate::types::ReplicatorState>,
    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)</p>
    pub service_execution_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Details about the state of the replicator.</p>
    pub state_info: ::std::option::Option<crate::types::ReplicationStateInfo>,
    /// <p>List of tags attached to the Replicator.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Configuration for log delivery.</p>
    pub log_delivery: ::std::option::Option<crate::types::LogDelivery>,
    _request_id: Option<String>,
}
impl DescribeReplicatorOutput {
    /// <p>The time when the replicator was created.</p>
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The current version number of the replicator.</p>
    pub fn current_version(&self) -> ::std::option::Option<&str> {
        self.current_version.as_deref()
    }
    /// <p>Whether this resource is a replicator reference.</p>
    pub fn is_replicator_reference(&self) -> ::std::option::Option<bool> {
        self.is_replicator_reference
    }
    /// <p>Kafka Clusters used in setting up sources / targets for replication.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.kafka_clusters.is_none()`.
    pub fn kafka_clusters(&self) -> &[crate::types::KafkaClusterDescription] {
        self.kafka_clusters.as_deref().unwrap_or_default()
    }
    /// <p>A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.replication_info_list.is_none()`.
    pub fn replication_info_list(&self) -> &[crate::types::ReplicationInfoDescription] {
        self.replication_info_list.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator.</p>
    pub fn replicator_arn(&self) -> ::std::option::Option<&str> {
        self.replicator_arn.as_deref()
    }
    /// <p>The description of the replicator.</p>
    pub fn replicator_description(&self) -> ::std::option::Option<&str> {
        self.replicator_description.as_deref()
    }
    /// <p>The name of the replicator.</p>
    pub fn replicator_name(&self) -> ::std::option::Option<&str> {
        self.replicator_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator resource in the region where the replicator was created.</p>
    pub fn replicator_resource_arn(&self) -> ::std::option::Option<&str> {
        self.replicator_resource_arn.as_deref()
    }
    /// <p>State of the replicator.</p>
    pub fn replicator_state(&self) -> ::std::option::Option<&crate::types::ReplicatorState> {
        self.replicator_state.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)</p>
    pub fn service_execution_role_arn(&self) -> ::std::option::Option<&str> {
        self.service_execution_role_arn.as_deref()
    }
    /// <p>Details about the state of the replicator.</p>
    pub fn state_info(&self) -> ::std::option::Option<&crate::types::ReplicationStateInfo> {
        self.state_info.as_ref()
    }
    /// <p>List of tags attached to the Replicator.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Configuration for log delivery.</p>
    pub fn log_delivery(&self) -> ::std::option::Option<&crate::types::LogDelivery> {
        self.log_delivery.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeReplicatorOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeReplicatorOutput {
    /// Creates a new builder-style object to manufacture [`DescribeReplicatorOutput`](crate::operation::describe_replicator::DescribeReplicatorOutput).
    pub fn builder() -> crate::operation::describe_replicator::builders::DescribeReplicatorOutputBuilder {
        crate::operation::describe_replicator::builders::DescribeReplicatorOutputBuilder::default()
    }
}

/// A builder for [`DescribeReplicatorOutput`](crate::operation::describe_replicator::DescribeReplicatorOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeReplicatorOutputBuilder {
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) current_version: ::std::option::Option<::std::string::String>,
    pub(crate) is_replicator_reference: ::std::option::Option<bool>,
    pub(crate) kafka_clusters: ::std::option::Option<::std::vec::Vec<crate::types::KafkaClusterDescription>>,
    pub(crate) replication_info_list: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationInfoDescription>>,
    pub(crate) replicator_arn: ::std::option::Option<::std::string::String>,
    pub(crate) replicator_description: ::std::option::Option<::std::string::String>,
    pub(crate) replicator_name: ::std::option::Option<::std::string::String>,
    pub(crate) replicator_resource_arn: ::std::option::Option<::std::string::String>,
    pub(crate) replicator_state: ::std::option::Option<crate::types::ReplicatorState>,
    pub(crate) service_execution_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) state_info: ::std::option::Option<crate::types::ReplicationStateInfo>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) log_delivery: ::std::option::Option<crate::types::LogDelivery>,
    _request_id: Option<String>,
}
impl DescribeReplicatorOutputBuilder {
    /// <p>The time when the replicator was created.</p>
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the replicator was created.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>The time when the replicator was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The current version number of the replicator.</p>
    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>The current version number of the replicator.</p>
    pub fn set_current_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.current_version = input;
        self
    }
    /// <p>The current version number of the replicator.</p>
    pub fn get_current_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.current_version
    }
    /// <p>Whether this resource is a replicator reference.</p>
    pub fn is_replicator_reference(mut self, input: bool) -> Self {
        self.is_replicator_reference = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether this resource is a replicator reference.</p>
    pub fn set_is_replicator_reference(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_replicator_reference = input;
        self
    }
    /// <p>Whether this resource is a replicator reference.</p>
    pub fn get_is_replicator_reference(&self) -> &::std::option::Option<bool> {
        &self.is_replicator_reference
    }
    /// Appends an item to `kafka_clusters`.
    ///
    /// To override the contents of this collection use [`set_kafka_clusters`](Self::set_kafka_clusters).
    ///
    /// <p>Kafka Clusters used in setting up sources / targets for replication.</p>
    pub fn kafka_clusters(mut self, input: crate::types::KafkaClusterDescription) -> Self {
        let mut v = self.kafka_clusters.unwrap_or_default();
        v.push(input);
        self.kafka_clusters = ::std::option::Option::Some(v);
        self
    }
    /// <p>Kafka Clusters used in setting up sources / targets for replication.</p>
    pub fn set_kafka_clusters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KafkaClusterDescription>>) -> Self {
        self.kafka_clusters = input;
        self
    }
    /// <p>Kafka Clusters used in setting up sources / targets for replication.</p>
    pub fn get_kafka_clusters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KafkaClusterDescription>> {
        &self.kafka_clusters
    }
    /// Appends an item to `replication_info_list`.
    ///
    /// To override the contents of this collection use [`set_replication_info_list`](Self::set_replication_info_list).
    ///
    /// <p>A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.</p>
    pub fn replication_info_list(mut self, input: crate::types::ReplicationInfoDescription) -> Self {
        let mut v = self.replication_info_list.unwrap_or_default();
        v.push(input);
        self.replication_info_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.</p>
    pub fn set_replication_info_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationInfoDescription>>) -> Self {
        self.replication_info_list = input;
        self
    }
    /// <p>A list of replication configurations, where each configuration targets a given source cluster to target cluster replication flow.</p>
    pub fn get_replication_info_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicationInfoDescription>> {
        &self.replication_info_list
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator.</p>
    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.</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.</p>
    pub fn get_replicator_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.replicator_arn
    }
    /// <p>The description of the replicator.</p>
    pub fn replicator_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replicator_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the replicator.</p>
    pub fn set_replicator_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replicator_description = input;
        self
    }
    /// <p>The description of the replicator.</p>
    pub fn get_replicator_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.replicator_description
    }
    /// <p>The name of the replicator.</p>
    pub fn replicator_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replicator_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the replicator.</p>
    pub fn set_replicator_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replicator_name = input;
        self
    }
    /// <p>The name of the replicator.</p>
    pub fn get_replicator_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.replicator_name
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator resource in the region where the replicator was created.</p>
    pub fn replicator_resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.replicator_resource_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator resource in the region where the replicator was created.</p>
    pub fn set_replicator_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.replicator_resource_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the replicator resource in the region where the replicator was created.</p>
    pub fn get_replicator_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.replicator_resource_arn
    }
    /// <p>State of the replicator.</p>
    pub fn replicator_state(mut self, input: crate::types::ReplicatorState) -> Self {
        self.replicator_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>State of the replicator.</p>
    pub fn set_replicator_state(mut self, input: ::std::option::Option<crate::types::ReplicatorState>) -> Self {
        self.replicator_state = input;
        self
    }
    /// <p>State of the replicator.</p>
    pub fn get_replicator_state(&self) -> &::std::option::Option<crate::types::ReplicatorState> {
        &self.replicator_state
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)</p>
    pub fn service_execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_execution_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)</p>
    pub fn set_service_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_execution_role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role used by the replicator to access resources in the customer's account (e.g source and target clusters)</p>
    pub fn get_service_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_execution_role_arn
    }
    /// <p>Details about the state of the replicator.</p>
    pub fn state_info(mut self, input: crate::types::ReplicationStateInfo) -> Self {
        self.state_info = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details about the state of the replicator.</p>
    pub fn set_state_info(mut self, input: ::std::option::Option<crate::types::ReplicationStateInfo>) -> Self {
        self.state_info = input;
        self
    }
    /// <p>Details about the state of the replicator.</p>
    pub fn get_state_info(&self) -> &::std::option::Option<crate::types::ReplicationStateInfo> {
        &self.state_info
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>List of tags attached to the Replicator.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>List of tags attached to the Replicator.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>List of tags attached to the Replicator.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>Configuration for log delivery.</p>
    pub fn log_delivery(mut self, input: crate::types::LogDelivery) -> Self {
        self.log_delivery = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration for log delivery.</p>
    pub fn set_log_delivery(mut self, input: ::std::option::Option<crate::types::LogDelivery>) -> Self {
        self.log_delivery = input;
        self
    }
    /// <p>Configuration for log delivery.</p>
    pub fn get_log_delivery(&self) -> &::std::option::Option<crate::types::LogDelivery> {
        &self.log_delivery
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeReplicatorOutput`](crate::operation::describe_replicator::DescribeReplicatorOutput).
    pub fn build(self) -> crate::operation::describe_replicator::DescribeReplicatorOutput {
        crate::operation::describe_replicator::DescribeReplicatorOutput {
            creation_time: self.creation_time,
            current_version: self.current_version,
            is_replicator_reference: self.is_replicator_reference,
            kafka_clusters: self.kafka_clusters,
            replication_info_list: self.replication_info_list,
            replicator_arn: self.replicator_arn,
            replicator_description: self.replicator_description,
            replicator_name: self.replicator_name,
            replicator_resource_arn: self.replicator_resource_arn,
            replicator_state: self.replicator_state,
            service_execution_role_arn: self.service_execution_role_arn,
            state_info: self.state_info,
            tags: self.tags,
            log_delivery: self.log_delivery,
            _request_id: self._request_id,
        }
    }
}