aws-sdk-marketplacedeployment 1.71.0

AWS SDK for AWS Marketplace Deployment Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::put_deployment_parameter::_put_deployment_parameter_output::PutDeploymentParameterOutputBuilder;

pub use crate::operation::put_deployment_parameter::_put_deployment_parameter_input::PutDeploymentParameterInputBuilder;

impl crate::operation::put_deployment_parameter::builders::PutDeploymentParameterInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::put_deployment_parameter::PutDeploymentParameterOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::put_deployment_parameter::PutDeploymentParameterError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.put_deployment_parameter();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `PutDeploymentParameter`.
///
/// <p>Creates or updates a deployment parameter and is targeted by <code>catalog</code> and <code>agreementId</code>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct PutDeploymentParameterFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::put_deployment_parameter::builders::PutDeploymentParameterInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::put_deployment_parameter::PutDeploymentParameterOutput,
        crate::operation::put_deployment_parameter::PutDeploymentParameterError,
    > for PutDeploymentParameterFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::put_deployment_parameter::PutDeploymentParameterOutput,
            crate::operation::put_deployment_parameter::PutDeploymentParameterError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl PutDeploymentParameterFluentBuilder {
    /// Creates a new `PutDeploymentParameterFluentBuilder`.
    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 PutDeploymentParameter as a reference.
    pub fn as_input(&self) -> &crate::operation::put_deployment_parameter::builders::PutDeploymentParameterInputBuilder {
        &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::put_deployment_parameter::PutDeploymentParameterOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::put_deployment_parameter::PutDeploymentParameterError,
            ::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::put_deployment_parameter::PutDeploymentParameter::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::put_deployment_parameter::PutDeploymentParameter::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::put_deployment_parameter::PutDeploymentParameterOutput,
        crate::operation::put_deployment_parameter::PutDeploymentParameterError,
        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>The catalog related to the request. Fixed value: <code>AWSMarketplace</code></p>
    pub fn catalog(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.catalog(input.into());
        self
    }
    /// <p>The catalog related to the request. Fixed value: <code>AWSMarketplace</code></p>
    pub fn set_catalog(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_catalog(input);
        self
    }
    /// <p>The catalog related to the request. Fixed value: <code>AWSMarketplace</code></p>
    pub fn get_catalog(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_catalog()
    }
    /// <p>The product for which AWS Marketplace will save secrets for the buyer’s account.</p>
    pub fn product_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.product_id(input.into());
        self
    }
    /// <p>The product for which AWS Marketplace will save secrets for the buyer’s account.</p>
    pub fn set_product_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_product_id(input);
        self
    }
    /// <p>The product for which AWS Marketplace will save secrets for the buyer’s account.</p>
    pub fn get_product_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_product_id()
    }
    /// <p>The unique identifier of the agreement.</p>
    pub fn agreement_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.agreement_id(input.into());
        self
    }
    /// <p>The unique identifier of the agreement.</p>
    pub fn set_agreement_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_agreement_id(input);
        self
    }
    /// <p>The unique identifier of the agreement.</p>
    pub fn get_agreement_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_agreement_id()
    }
    /// <p>The deployment parameter targeted to the acceptor of an agreement for which to create the AWS Secret Manager resource.</p>
    pub fn deployment_parameter(mut self, input: crate::types::DeploymentParameterInput) -> Self {
        self.inner = self.inner.deployment_parameter(input);
        self
    }
    /// <p>The deployment parameter targeted to the acceptor of an agreement for which to create the AWS Secret Manager resource.</p>
    pub fn set_deployment_parameter(mut self, input: ::std::option::Option<crate::types::DeploymentParameterInput>) -> Self {
        self.inner = self.inner.set_deployment_parameter(input);
        self
    }
    /// <p>The deployment parameter targeted to the acceptor of an agreement for which to create the AWS Secret Manager resource.</p>
    pub fn get_deployment_parameter(&self) -> &::std::option::Option<crate::types::DeploymentParameterInput> {
        self.inner.get_deployment_parameter()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A map of key-value pairs, where each pair represents a tag saved to the resource. Tags will only be applied for create operations, and they'll be ignored if the resource already exists.</p>
    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
    }
    /// <p>A map of key-value pairs, where each pair represents a tag saved to the resource. Tags will only be applied for create operations, and they'll be ignored if the resource already exists.</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
    }
    /// <p>A map of key-value pairs, where each pair represents a tag saved to the resource. Tags will only be applied for create operations, and they'll be ignored if the resource already exists.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    /// <p>The date when deployment parameters expire and are scheduled for deletion.</p>
    pub fn expiration_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.inner = self.inner.expiration_date(input);
        self
    }
    /// <p>The date when deployment parameters expire and are scheduled for deletion.</p>
    pub fn set_expiration_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.inner = self.inner.set_expiration_date(input);
        self
    }
    /// <p>The date when deployment parameters expire and are scheduled for deletion.</p>
    pub fn get_expiration_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        self.inner.get_expiration_date()
    }
    /// <p>The idempotency token for deployment parameters. A unique identifier for the new version.</p><note>
    /// <p>This field is not required if you're calling using an AWS SDK. Otherwise, a <code>clientToken</code> must be provided with the request.</p>
    /// </note>
    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>The idempotency token for deployment parameters. A unique identifier for the new version.</p><note>
    /// <p>This field is not required if you're calling using an AWS SDK. Otherwise, a <code>clientToken</code> must be provided with the request.</p>
    /// </note>
    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>The idempotency token for deployment parameters. A unique identifier for the new version.</p><note>
    /// <p>This field is not required if you're calling using an AWS SDK. Otherwise, a <code>clientToken</code> must be provided with the request.</p>
    /// </note>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}