aws-sdk-panorama 0.26.0

AWS SDK for AWS Panorama
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_application_instance::_create_application_instance_output::CreateApplicationInstanceOutputBuilder;

pub use crate::operation::create_application_instance::_create_application_instance_input::CreateApplicationInstanceInputBuilder;

/// Fluent builder constructing a request to `CreateApplicationInstance`.
///
/// <p>Creates an application instance and deploys it to a device.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateApplicationInstanceFluentBuilder {
                handle: std::sync::Arc<crate::client::Handle>,
                inner: crate::operation::create_application_instance::builders::CreateApplicationInstanceInputBuilder
            }
impl CreateApplicationInstanceFluentBuilder {
    /// Creates a new `CreateApplicationInstance`.
    pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: Default::default(),
        }
    }

    /// Consume this builder, creating a customizable operation that can be modified before being
    /// sent. The operation's inner [http::Request] can be modified as well.
    pub async fn customize(
        self,
    ) -> std::result::Result<
        crate::client::customize::CustomizableOperation<
            crate::operation::create_application_instance::CreateApplicationInstance,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::result::SdkError<
            crate::operation::create_application_instance::CreateApplicationInstanceError,
        >,
    > {
        let handle = self.handle.clone();
        let operation = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        Ok(crate::client::customize::CustomizableOperation { handle, operation })
    }

    /// 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_application_instance::CreateApplicationInstanceOutput,
        aws_smithy_http::result::SdkError<
            crate::operation::create_application_instance::CreateApplicationInstanceError,
        >,
    > {
        let op = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&self.handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        self.handle.client.call(op).await
    }
    /// <p>A name for the application instance.</p>
    pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>A name for the application instance.</p>
    pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>A description for the application instance.</p>
    pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>A description for the application instance.</p>
    pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>The application's manifest document.</p>
    pub fn manifest_payload(mut self, input: crate::types::ManifestPayload) -> Self {
        self.inner = self.inner.manifest_payload(input);
        self
    }
    /// <p>The application's manifest document.</p>
    pub fn set_manifest_payload(
        mut self,
        input: std::option::Option<crate::types::ManifestPayload>,
    ) -> Self {
        self.inner = self.inner.set_manifest_payload(input);
        self
    }
    /// <p>Setting overrides for the application manifest.</p>
    pub fn manifest_overrides_payload(
        mut self,
        input: crate::types::ManifestOverridesPayload,
    ) -> Self {
        self.inner = self.inner.manifest_overrides_payload(input);
        self
    }
    /// <p>Setting overrides for the application manifest.</p>
    pub fn set_manifest_overrides_payload(
        mut self,
        input: std::option::Option<crate::types::ManifestOverridesPayload>,
    ) -> Self {
        self.inner = self.inner.set_manifest_overrides_payload(input);
        self
    }
    /// <p>The ID of an application instance to replace with the new instance.</p>
    pub fn application_instance_id_to_replace(
        mut self,
        input: impl Into<std::string::String>,
    ) -> Self {
        self.inner = self.inner.application_instance_id_to_replace(input.into());
        self
    }
    /// <p>The ID of an application instance to replace with the new instance.</p>
    pub fn set_application_instance_id_to_replace(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_application_instance_id_to_replace(input);
        self
    }
    /// <p>The ARN of a runtime role for the application instance.</p>
    pub fn runtime_role_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.runtime_role_arn(input.into());
        self
    }
    /// <p>The ARN of a runtime role for the application instance.</p>
    pub fn set_runtime_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_runtime_role_arn(input);
        self
    }
    /// <p>A device's ID.</p>
    pub fn default_runtime_context_device(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.default_runtime_context_device(input.into());
        self
    }
    /// <p>A device's ID.</p>
    pub fn set_default_runtime_context_device(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.inner = self.inner.set_default_runtime_context_device(input);
        self
    }
    /// Adds a key-value pair to `Tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Tags for the application instance.</p>
    pub fn tags(
        mut self,
        k: impl Into<std::string::String>,
        v: impl Into<std::string::String>,
    ) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// <p>Tags for the application instance.</p>
    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
    }
}