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>Updates an existing channel's destination configuration. You must update the same destination type the channel was created with; the destination type cannot be changed.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateChannelInput {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the channel.</p>
    pub channel_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.</p>
    pub iceberg_destination_update: ::std::option::Option<crate::types::IcebergDestinationUpdate>,
    /// <p>Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.</p>
    pub s3_destination_update: ::std::option::Option<crate::types::S3DestinationUpdate>,
}
impl UpdateChannelInput {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the channel.</p>
    pub fn channel_arn(&self) -> ::std::option::Option<&str> {
        self.channel_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
        self.cluster_arn.as_deref()
    }
    /// <p>Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.</p>
    pub fn iceberg_destination_update(&self) -> ::std::option::Option<&crate::types::IcebergDestinationUpdate> {
        self.iceberg_destination_update.as_ref()
    }
    /// <p>Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.</p>
    pub fn s3_destination_update(&self) -> ::std::option::Option<&crate::types::S3DestinationUpdate> {
        self.s3_destination_update.as_ref()
    }
}
impl UpdateChannelInput {
    /// Creates a new builder-style object to manufacture [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
    pub fn builder() -> crate::operation::update_channel::builders::UpdateChannelInputBuilder {
        crate::operation::update_channel::builders::UpdateChannelInputBuilder::default()
    }
}

/// A builder for [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateChannelInputBuilder {
    pub(crate) channel_arn: ::std::option::Option<::std::string::String>,
    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) iceberg_destination_update: ::std::option::Option<crate::types::IcebergDestinationUpdate>,
    pub(crate) s3_destination_update: ::std::option::Option<crate::types::S3DestinationUpdate>,
}
impl UpdateChannelInputBuilder {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the channel.</p>
    /// This field is required.
    pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.channel_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the channel.</p>
    pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.channel_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the channel.</p>
    pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.channel_arn
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    /// This field is required.
    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_arn
    }
    /// <p>Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.</p>
    pub fn iceberg_destination_update(mut self, input: crate::types::IcebergDestinationUpdate) -> Self {
        self.iceberg_destination_update = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.</p>
    pub fn set_iceberg_destination_update(mut self, input: ::std::option::Option<crate::types::IcebergDestinationUpdate>) -> Self {
        self.iceberg_destination_update = input;
        self
    }
    /// <p>Updates fields on an Apache Iceberg destination. Use only when the channel was created with an Iceberg destination.</p>
    pub fn get_iceberg_destination_update(&self) -> &::std::option::Option<crate::types::IcebergDestinationUpdate> {
        &self.iceberg_destination_update
    }
    /// <p>Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.</p>
    pub fn s3_destination_update(mut self, input: crate::types::S3DestinationUpdate) -> Self {
        self.s3_destination_update = ::std::option::Option::Some(input);
        self
    }
    /// <p>Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.</p>
    pub fn set_s3_destination_update(mut self, input: ::std::option::Option<crate::types::S3DestinationUpdate>) -> Self {
        self.s3_destination_update = input;
        self
    }
    /// <p>Updates fields on an Amazon S3 destination. Use only when the channel was created with an Amazon S3 destination.</p>
    pub fn get_s3_destination_update(&self) -> &::std::option::Option<crate::types::S3DestinationUpdate> {
        &self.s3_destination_update
    }
    /// Consumes the builder and constructs a [`UpdateChannelInput`](crate::operation::update_channel::UpdateChannelInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_channel::UpdateChannelInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_channel::UpdateChannelInput {
            channel_arn: self.channel_arn,
            cluster_arn: self.cluster_arn,
            iceberg_destination_update: self.iceberg_destination_update,
            s3_destination_update: self.s3_destination_update,
        })
    }
}