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::update_profile_entry::_update_profile_entry_input::UpdateProfileEntryInputBuilder;

pub use crate::operation::update_profile_entry::_update_profile_entry_output::UpdateProfileEntryOutputBuilder;

impl crate::operation::update_profile_entry::builders::UpdateProfileEntryInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_profile_entry::UpdateProfileEntryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_profile_entry::UpdateProfileEntryError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_profile_entry();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateProfileEntry`.
///
/// Updates a profile entry's configuration. Only provided fields are changed; omitted fields remain unchanged.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateProfileEntryFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_profile_entry::builders::UpdateProfileEntryInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_profile_entry::UpdateProfileEntryOutput,
        crate::operation::update_profile_entry::UpdateProfileEntryError,
    > for UpdateProfileEntryFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_profile_entry::UpdateProfileEntryOutput,
            crate::operation::update_profile_entry::UpdateProfileEntryError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateProfileEntryFluentBuilder {
    /// Creates a new `UpdateProfileEntryFluentBuilder`.
    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 UpdateProfileEntry as a reference.
    pub fn as_input(&self) -> &crate::operation::update_profile_entry::builders::UpdateProfileEntryInputBuilder {
        &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::update_profile_entry::UpdateProfileEntryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_profile_entry::UpdateProfileEntryError,
            ::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::update_profile_entry::UpdateProfileEntry::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_profile_entry::UpdateProfileEntry::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::update_profile_entry::UpdateProfileEntryOutput,
        crate::operation::update_profile_entry::UpdateProfileEntryError,
        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 of the profile entry
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.identifier(input.into());
        self
    }
    /// The identifier of the profile entry
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_identifier(input);
        self
    }
    /// The identifier of the profile entry
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_identifier()
    }
    /// The identifier of the owning profile.
    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 of the owning profile.
    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 of the owning profile.
    pub fn get_profile_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_profile_identifier()
    }
    /// A new name for the entry, unique within the profile.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// A new name for the entry, unique within the profile.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// A new name for the entry, unique within the profile.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// A new description of the entry's purpose. An empty string removes the description.
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// A new description of the entry's purpose. An empty string removes the description.
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// A new description of the entry's purpose. An empty string removes the description.
    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. An empty string removes the entry's role, so the profile's default applies.
    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. An empty string removes the entry's role, so the profile's default applies.
    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. An empty string removes the entry's role, so the profile's default applies.
    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()
    }
    /// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
    pub fn settings(mut self, input: ::aws_smithy_types::Document) -> Self {
        self.inner = self.inner.settings(input);
        self
    }
    /// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
    pub fn set_settings(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
        self.inner = self.inner.set_settings(input);
        self
    }
    /// Changes to the entry's setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group's stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension's setting ids and the merged values are validated against the extension's settings definitions.
    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).
    ///
    /// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
    pub fn approve(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.approve(input.into());
        self
    }
    /// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
    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
    }
    /// The complete list of capability paths to approve, replacing the entry's current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
    pub fn get_approve(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_approve()
    }
}