aws-sdk-cloudextensions 1.0.0

AWS SDK for AWS Cloud Extensions
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_profile_entry::_create_profile_entry_input::CreateProfileEntryInputBuilder;

pub use crate::operation::create_profile_entry::_create_profile_entry_output::CreateProfileEntryOutputBuilder;

impl crate::operation::create_profile_entry::builders::CreateProfileEntryInputBuilder {
    /// 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_profile_entry::CreateProfileEntryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_profile_entry::CreateProfileEntryError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_profile_entry();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateProfileEntry`.
///
/// Creates a profile entry that binds an extension to a profile. The extension must exist and the profile must not already have an entry for that extension.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateProfileEntryFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_profile_entry::builders::CreateProfileEntryInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_profile_entry::CreateProfileEntryOutput,
        crate::operation::create_profile_entry::CreateProfileEntryError,
    > for CreateProfileEntryFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_profile_entry::CreateProfileEntryOutput,
            crate::operation::create_profile_entry::CreateProfileEntryError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateProfileEntryFluentBuilder {
    /// Creates a new `CreateProfileEntryFluentBuilder`.
    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 CreateProfileEntry as a reference.
    pub fn as_input(&self) -> &crate::operation::create_profile_entry::builders::CreateProfileEntryInputBuilder {
        &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_profile_entry::CreateProfileEntryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_profile_entry::CreateProfileEntryError,
            ::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_profile_entry::CreateProfileEntry::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_profile_entry::CreateProfileEntry::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_profile_entry::CreateProfileEntryOutput,
        crate::operation::create_profile_entry::CreateProfileEntryError,
        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
    }
    /// The identifier (id or name) of the profile to bind the extension to.
    pub fn profile_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.profile_identifier(input.into());
        self
    }
    /// The identifier (id or name) of the profile to bind the extension to.
    pub fn set_profile_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_profile_identifier(input);
        self
    }
    /// The identifier (id or name) of the profile to bind the extension to.
    pub fn get_profile_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_profile_identifier()
    }
    /// A unique, case-sensitive identifier that you provide to ensure the request is processed at most once.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure the request is processed at most once.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure the request is processed at most once.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// The id of the extension to bind, such as aws:secretsmanager.
    pub fn extension_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.extension_identifier(input.into());
        self
    }
    /// The id of the extension to bind, such as aws:secretsmanager.
    pub fn set_extension_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_extension_identifier(input);
        self
    }
    /// The id of the extension to bind, such as aws:secretsmanager.
    pub fn get_extension_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_extension_identifier()
    }
    /// The entry's name, unique within the profile. Defaults to the name in the extension's id.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// The entry's name, unique within the profile. Defaults to the name in the extension's id.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// The entry's name, unique within the profile. Defaults to the name in the extension's id.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// A description of the entry's purpose.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// A description of the entry's purpose.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// A description of the entry's purpose.
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    ///
    /// Adds a key-value pair to `interfaces`.
    ///
    /// To override the contents of this collection use [`set_interfaces`](Self::set_interfaces).
    ///
    /// Per-interface options, keyed by the id of an interface the extension declares.
    pub fn interfaces(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::InterfaceOptions) -> Self {
        self.inner = self.inner.interfaces(k.into(), v);
        self
    }
    /// Per-interface options, keyed by the id of an interface the extension declares.
    pub fn set_interfaces(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InterfaceOptions>>,
    ) -> Self {
        self.inner = self.inner.set_interfaces(input);
        self
    }
    /// Per-interface options, keyed by the id of an interface the extension declares.
    pub fn get_interfaces(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::InterfaceOptions>> {
        self.inner.get_interfaces()
    }
    /// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal.
    pub fn execution_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.execution_role(input.into());
        self
    }
    /// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal.
    pub fn set_execution_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_execution_role(input);
        self
    }
    /// The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime's principal.
    pub fn get_execution_role(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_execution_role()
    }
    /// Controls which extension version this entry tracks and how it adopts new releases.
    pub fn version_policy(mut self, input: crate::types::VersionPolicy) -> Self {
        self.inner = self.inner.version_policy(input);
        self
    }
    /// Controls which extension version this entry tracks and how it adopts new releases.
    pub fn set_version_policy(mut self, input: ::std::option::Option<crate::types::VersionPolicy>) -> Self {
        self.inner = self.inner.set_version_policy(input);
        self
    }
    /// Controls which extension version this entry tracks and how it adopts new releases.
    pub fn get_version_policy(&self) -> &::std::option::Option<crate::types::VersionPolicy> {
        self.inner.get_version_policy()
    }
    /// The setting values to use for this extension, as free-form JSON. Keys are the extension's setting ids and the values are validated against the extension's settings definitions. A setting that is omitted or null takes its default, if it has one. A null inside an array is rejected.
    pub fn settings(mut self, input: ::aws_smithy_types::Document) -> Self {
        self.inner = self.inner.settings(input);
        self
    }
    /// The setting values to use for this extension, as free-form JSON. Keys are the extension's setting ids and the values are validated against the extension's settings definitions. A setting that is omitted or null takes its default, if it has one. A null inside an array is rejected.
    pub fn set_settings(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
        self.inner = self.inner.set_settings(input);
        self
    }
    /// The setting values to use for this extension, as free-form JSON. Keys are the extension's setting ids and the values are validated against the extension's settings definitions. A setting that is omitted or null takes its default, if it has one. A null inside an array is rejected.
    pub fn get_settings(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
        self.inner.get_settings()
    }
    ///
    /// Appends an item to `approve`.
    ///
    /// To override the contents of this collection use [`set_approve`](Self::set_approve).
    ///
    /// A list of capability paths to approve. Each path must correspond to a capability instance declared by the extension.
    pub fn approve(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.approve(input.into());
        self
    }
    /// A list of capability paths to approve. Each path must correspond to a capability instance declared by the extension.
    pub fn set_approve(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_approve(input);
        self
    }
    /// A list of capability paths to approve. Each path must correspond to a capability instance declared by the extension.
    pub fn get_approve(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_approve()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// Tags to assign to the profile entry.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// Tags to assign to the profile entry.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// Tags to assign to the profile entry.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
}