aws-sdk-continuum 1.0.0

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

/// Specifies the mutable Collector properties. At least one property must be supplied. k8ClusterRole models an atomic set-or-remove mutation, so roleArn and externalId are replaced or removed together.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateCollectorInput {
    /// The unique identifier of the Collector to update.
    pub collector_id: ::std::option::Option<::std::string::String>,
    /// The new customer-visible name.
    pub name: ::std::option::Option<::std::string::String>,
    /// Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.
    pub kubernetes_cluster_role: ::std::option::Option<crate::types::KubernetesClusterRoleUpdate>,
}
impl UpdateCollectorInput {
    /// The unique identifier of the Collector to update.
    pub fn collector_id(&self) -> ::std::option::Option<&str> {
        self.collector_id.as_deref()
    }
    /// The new customer-visible name.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.
    pub fn kubernetes_cluster_role(&self) -> ::std::option::Option<&crate::types::KubernetesClusterRoleUpdate> {
        self.kubernetes_cluster_role.as_ref()
    }
}
impl UpdateCollectorInput {
    /// Creates a new builder-style object to manufacture [`UpdateCollectorInput`](crate::operation::update_collector::UpdateCollectorInput).
    pub fn builder() -> crate::operation::update_collector::builders::UpdateCollectorInputBuilder {
        crate::operation::update_collector::builders::UpdateCollectorInputBuilder::default()
    }
}

/// A builder for [`UpdateCollectorInput`](crate::operation::update_collector::UpdateCollectorInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCollectorInputBuilder {
    pub(crate) collector_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) kubernetes_cluster_role: ::std::option::Option<crate::types::KubernetesClusterRoleUpdate>,
}
impl UpdateCollectorInputBuilder {
    /// The unique identifier of the Collector to update.
    /// This field is required.
    pub fn collector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.collector_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The unique identifier of the Collector to update.
    pub fn set_collector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.collector_id = input;
        self
    }
    /// The unique identifier of the Collector to update.
    pub fn get_collector_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.collector_id
    }
    /// The new customer-visible name.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// The new customer-visible name.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// The new customer-visible name.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.
    pub fn kubernetes_cluster_role(mut self, input: crate::types::KubernetesClusterRoleUpdate) -> Self {
        self.kubernetes_cluster_role = ::std::option::Option::Some(input);
        self
    }
    /// Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.
    pub fn set_kubernetes_cluster_role(mut self, input: ::std::option::Option<crate::types::KubernetesClusterRoleUpdate>) -> Self {
        self.kubernetes_cluster_role = input;
        self
    }
    /// Atomic update to the IAM role configuration used to collect Kubernetes cluster metadata. The set variant requires a complete configuration; the authenticated caller must be allowed to pass its exact roleArn to Continuum. The remove variant clears both the role and external ID.
    pub fn get_kubernetes_cluster_role(&self) -> &::std::option::Option<crate::types::KubernetesClusterRoleUpdate> {
        &self.kubernetes_cluster_role
    }
    /// Consumes the builder and constructs a [`UpdateCollectorInput`](crate::operation::update_collector::UpdateCollectorInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_collector::UpdateCollectorInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_collector::UpdateCollectorInput {
            collector_id: self.collector_id,
            name: self.name,
            kubernetes_cluster_role: self.kubernetes_cluster_role,
        })
    }
}