aws-sdk-context 1.0.0

AWS SDK for AWS Context
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_change_set::_create_change_set_input::CreateChangeSetInputBuilder;

pub use crate::operation::create_change_set::_create_change_set_output::CreateChangeSetOutputBuilder;

impl crate::operation::create_change_set::builders::CreateChangeSetInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_change_set::CreateChangeSetOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_change_set::CreateChangeSetError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_change_set();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateChangeSet`.
///
/// <p>Proposes a change to an agent context, as ChangeSetOperation items (the same items that ListChangeSetOperations returns), each setting one of <code>put</code>, <code>update</code>, or <code>delete</code>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateChangeSetFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_change_set::builders::CreateChangeSetInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_change_set::CreateChangeSetOutput,
        crate::operation::create_change_set::CreateChangeSetError,
    > for CreateChangeSetFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_change_set::CreateChangeSetOutput,
            crate::operation::create_change_set::CreateChangeSetError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateChangeSetFluentBuilder {
    /// Creates a new `CreateChangeSetFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the CreateChangeSet as a reference.
    pub fn as_input(&self) -> &crate::operation::create_change_set::builders::CreateChangeSetInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_change_set::CreateChangeSetOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_change_set::CreateChangeSetError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::create_change_set::CreateChangeSet::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_change_set::CreateChangeSet::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::create_change_set::CreateChangeSetOutput,
        crate::operation::create_change_set::CreateChangeSetError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token returns the same change set.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token returns the same change set.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to make the request idempotent. A retry with the same token returns the same change set.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// <p>Who can read the nodes that this change set writes. AWS Context refuses it on a change set that only deletes. If you omit it, every reader of the agent context can read a node that the change creates, and every other node keeps its access control. If you specify it, it replaces the access control of every node that the change set writes, and an absent or empty <code>accessControlList</code> lets nobody read them.</p>
    pub fn access_control_config(mut self, input: crate::types::AccessControlConfig) -> Self {
        self.inner = self.inner.access_control_config(input);
        self
    }
    /// <p>Who can read the nodes that this change set writes. AWS Context refuses it on a change set that only deletes. If you omit it, every reader of the agent context can read a node that the change creates, and every other node keeps its access control. If you specify it, it replaces the access control of every node that the change set writes, and an absent or empty <code>accessControlList</code> lets nobody read them.</p>
    pub fn set_access_control_config(mut self, input: ::std::option::Option<crate::types::AccessControlConfig>) -> Self {
        self.inner = self.inner.set_access_control_config(input);
        self
    }
    /// <p>Who can read the nodes that this change set writes. AWS Context refuses it on a change set that only deletes. If you omit it, every reader of the agent context can read a node that the change creates, and every other node keeps its access control. If you specify it, it replaces the access control of every node that the change set writes, and an absent or empty <code>accessControlList</code> lets nobody read them.</p>
    pub fn get_access_control_config(&self) -> &::std::option::Option<crate::types::AccessControlConfig> {
        self.inner.get_access_control_config()
    }
    /// <p>The agent context to change, by its ID or ARN.</p>
    pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.agent_context_id(input.into());
        self
    }
    /// <p>The agent context to change, by its ID or ARN.</p>
    pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_agent_context_id(input);
        self
    }
    /// <p>The agent context to change, by its ID or ARN.</p>
    pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_agent_context_id()
    }
    ///
    /// Appends an item to `operations`.
    ///
    /// To override the contents of this collection use [`set_operations`](Self::set_operations).
    ///
    /// <p>The operations to write, each a <code>ChangeSetOperation</code>, from 1 to 1,000. If the list is empty or names the same entity twice, the request fails with <code>ValidationException</code>.</p>
    pub fn operations(mut self, input: crate::types::ChangeSetOperation) -> Self {
        self.inner = self.inner.operations(input);
        self
    }
    /// <p>The operations to write, each a <code>ChangeSetOperation</code>, from 1 to 1,000. If the list is empty or names the same entity twice, the request fails with <code>ValidationException</code>.</p>
    pub fn set_operations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ChangeSetOperation>>) -> Self {
        self.inner = self.inner.set_operations(input);
        self
    }
    /// <p>The operations to write, each a <code>ChangeSetOperation</code>, from 1 to 1,000. If the list is empty or names the same entity twice, the request fails with <code>ValidationException</code>.</p>
    pub fn get_operations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ChangeSetOperation>> {
        self.inner.get_operations()
    }
}