aws-sdk-eks 1.137.0

AWS SDK for Amazon Elastic Kubernetes Service
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 CancelUpdateInput {
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the update to cancel.</p>
    pub update_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub client_request_token: ::std::option::Option<::std::string::String>,
}
impl CancelUpdateInput {
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The ID of the update to cancel.</p>
    pub fn update_id(&self) -> ::std::option::Option<&str> {
        self.update_id.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
        self.client_request_token.as_deref()
    }
}
impl CancelUpdateInput {
    /// Creates a new builder-style object to manufacture [`CancelUpdateInput`](crate::operation::cancel_update::CancelUpdateInput).
    pub fn builder() -> crate::operation::cancel_update::builders::CancelUpdateInputBuilder {
        crate::operation::cancel_update::builders::CancelUpdateInputBuilder::default()
    }
}

/// A builder for [`CancelUpdateInput`](crate::operation::cancel_update::CancelUpdateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CancelUpdateInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) update_id: ::std::option::Option<::std::string::String>,
    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
}
impl CancelUpdateInputBuilder {
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The ID of the update to cancel.</p>
    /// This field is required.
    pub fn update_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.update_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the update to cancel.</p>
    pub fn set_update_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.update_id = input;
        self
    }
    /// <p>The ID of the update to cancel.</p>
    pub fn get_update_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.update_id
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_request_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_request_token
    }
    /// Consumes the builder and constructs a [`CancelUpdateInput`](crate::operation::cancel_update::CancelUpdateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::cancel_update::CancelUpdateInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::cancel_update::CancelUpdateInput {
            name: self.name,
            update_id: self.update_id,
            client_request_token: self.client_request_token,
        })
    }
}