// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateDeploymentInput {
/// <p>The ID of the deployment.</p>
pub deployment_id: ::std::option::Option<::std::string::String>,
/// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
pub specifications: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The name of the workload version.</p>
pub workload_version_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the deployment pattern version.</p>
pub deployment_pattern_version_name: ::std::option::Option<::std::string::String>,
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub dry_run: ::std::option::Option<bool>,
/// <p>Forces the update even if validation warnings are present.</p>
pub force: ::std::option::Option<bool>,
}
impl UpdateDeploymentInput {
/// <p>The ID of the deployment.</p>
pub fn deployment_id(&self) -> ::std::option::Option<&str> {
self.deployment_id.as_deref()
}
/// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
pub fn specifications(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.specifications.as_ref()
}
/// <p>The name of the workload version.</p>
pub fn workload_version_name(&self) -> ::std::option::Option<&str> {
self.workload_version_name.as_deref()
}
/// <p>The name of the deployment pattern version.</p>
pub fn deployment_pattern_version_name(&self) -> ::std::option::Option<&str> {
self.deployment_pattern_version_name.as_deref()
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn dry_run(&self) -> ::std::option::Option<bool> {
self.dry_run
}
/// <p>Forces the update even if validation warnings are present.</p>
pub fn force(&self) -> ::std::option::Option<bool> {
self.force
}
}
impl ::std::fmt::Debug for UpdateDeploymentInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateDeploymentInput");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("specifications", &"*** Sensitive Data Redacted ***");
formatter.field("workload_version_name", &self.workload_version_name);
formatter.field("deployment_pattern_version_name", &self.deployment_pattern_version_name);
formatter.field("dry_run", &self.dry_run);
formatter.field("force", &self.force);
formatter.finish()
}
}
impl UpdateDeploymentInput {
/// Creates a new builder-style object to manufacture [`UpdateDeploymentInput`](crate::operation::update_deployment::UpdateDeploymentInput).
pub fn builder() -> crate::operation::update_deployment::builders::UpdateDeploymentInputBuilder {
crate::operation::update_deployment::builders::UpdateDeploymentInputBuilder::default()
}
}
/// A builder for [`UpdateDeploymentInput`](crate::operation::update_deployment::UpdateDeploymentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateDeploymentInputBuilder {
pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
pub(crate) specifications: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) workload_version_name: ::std::option::Option<::std::string::String>,
pub(crate) deployment_pattern_version_name: ::std::option::Option<::std::string::String>,
pub(crate) dry_run: ::std::option::Option<bool>,
pub(crate) force: ::std::option::Option<bool>,
}
impl UpdateDeploymentInputBuilder {
/// <p>The ID of the deployment.</p>
/// This field is required.
pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deployment_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the deployment.</p>
pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deployment_id = input;
self
}
/// <p>The ID of the deployment.</p>
pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.deployment_id
}
/// Adds a key-value pair to `specifications`.
///
/// To override the contents of this collection use [`set_specifications`](Self::set_specifications).
///
/// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
pub fn specifications(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.specifications.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.specifications = ::std::option::Option::Some(hash_map);
self
}
/// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
pub fn set_specifications(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.specifications = input;
self
}
/// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
pub fn get_specifications(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.specifications
}
/// <p>The name of the workload version.</p>
pub fn workload_version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workload_version_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the workload version.</p>
pub fn set_workload_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workload_version_name = input;
self
}
/// <p>The name of the workload version.</p>
pub fn get_workload_version_name(&self) -> &::std::option::Option<::std::string::String> {
&self.workload_version_name
}
/// <p>The name of the deployment pattern version.</p>
pub fn deployment_pattern_version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deployment_pattern_version_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the deployment pattern version.</p>
pub fn set_deployment_pattern_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deployment_pattern_version_name = input;
self
}
/// <p>The name of the deployment pattern version.</p>
pub fn get_deployment_pattern_version_name(&self) -> &::std::option::Option<::std::string::String> {
&self.deployment_pattern_version_name
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn dry_run(mut self, input: bool) -> Self {
self.dry_run = ::std::option::Option::Some(input);
self
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
self.dry_run = input;
self
}
/// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
&self.dry_run
}
/// <p>Forces the update even if validation warnings are present.</p>
pub fn force(mut self, input: bool) -> Self {
self.force = ::std::option::Option::Some(input);
self
}
/// <p>Forces the update even if validation warnings are present.</p>
pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// <p>Forces the update even if validation warnings are present.</p>
pub fn get_force(&self) -> &::std::option::Option<bool> {
&self.force
}
/// Consumes the builder and constructs a [`UpdateDeploymentInput`](crate::operation::update_deployment::UpdateDeploymentInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_deployment::UpdateDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_deployment::UpdateDeploymentInput {
deployment_id: self.deployment_id,
specifications: self.specifications,
workload_version_name: self.workload_version_name,
deployment_pattern_version_name: self.deployment_pattern_version_name,
dry_run: self.dry_run,
force: self.force,
})
}
}
impl ::std::fmt::Debug for UpdateDeploymentInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateDeploymentInputBuilder");
formatter.field("deployment_id", &self.deployment_id);
formatter.field("specifications", &"*** Sensitive Data Redacted ***");
formatter.field("workload_version_name", &self.workload_version_name);
formatter.field("deployment_pattern_version_name", &self.deployment_pattern_version_name);
formatter.field("dry_run", &self.dry_run);
formatter.field("force", &self.force);
formatter.finish()
}
}