#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateClusterInput {
pub cluster_name: ::std::option::Option<::std::string::String>,
pub instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>>,
}
impl UpdateClusterInput {
pub fn cluster_name(&self) -> ::std::option::Option<&str> {
self.cluster_name.as_deref()
}
pub fn instance_groups(&self) -> &[crate::types::ClusterInstanceGroupSpecification] {
self.instance_groups.as_deref().unwrap_or_default()
}
}
impl UpdateClusterInput {
pub fn builder() -> crate::operation::update_cluster::builders::UpdateClusterInputBuilder {
crate::operation::update_cluster::builders::UpdateClusterInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateClusterInputBuilder {
pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
pub(crate) instance_groups: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>>,
}
impl UpdateClusterInputBuilder {
pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_name = input;
self
}
pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_name
}
pub fn instance_groups(mut self, input: crate::types::ClusterInstanceGroupSpecification) -> Self {
let mut v = self.instance_groups.unwrap_or_default();
v.push(input);
self.instance_groups = ::std::option::Option::Some(v);
self
}
pub fn set_instance_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>>) -> Self {
self.instance_groups = input;
self
}
pub fn get_instance_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterInstanceGroupSpecification>> {
&self.instance_groups
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_cluster::UpdateClusterInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_cluster::UpdateClusterInput {
cluster_name: self.cluster_name,
instance_groups: self.instance_groups,
})
}
}