All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.codedeploy.model.DeploymentInfo Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.codedeploy.model;

import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Information about a deployment. *

*/ @Generated("software.amazon.awssdk:codegen") public final class DeploymentInfo implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField APPLICATION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::applicationName)).setter(setter(Builder::applicationName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("applicationName").build()).build(); private static final SdkField DEPLOYMENT_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::deploymentGroupName)).setter(setter(Builder::deploymentGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deploymentGroupName").build()) .build(); private static final SdkField DEPLOYMENT_CONFIG_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::deploymentConfigName)).setter(setter(Builder::deploymentConfigName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deploymentConfigName").build()) .build(); private static final SdkField DEPLOYMENT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::deploymentId)).setter(setter(Builder::deploymentId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deploymentId").build()).build(); private static final SdkField PREVIOUS_REVISION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(DeploymentInfo::previousRevision)) .setter(setter(Builder::previousRevision)).constructor(RevisionLocation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("previousRevision").build()).build(); private static final SdkField REVISION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(DeploymentInfo::revision)) .setter(setter(Builder::revision)).constructor(RevisionLocation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("revision").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField ERROR_INFORMATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(DeploymentInfo::errorInformation)) .setter(setter(Builder::errorInformation)).constructor(ErrorInformation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("errorInformation").build()).build(); private static final SdkField CREATE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(DeploymentInfo::createTime)).setter(setter(Builder::createTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createTime").build()).build(); private static final SdkField START_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(DeploymentInfo::startTime)).setter(setter(Builder::startTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("startTime").build()).build(); private static final SdkField COMPLETE_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .getter(getter(DeploymentInfo::completeTime)).setter(setter(Builder::completeTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("completeTime").build()).build(); private static final SdkField DEPLOYMENT_OVERVIEW_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(DeploymentInfo::deploymentOverview)) .setter(setter(Builder::deploymentOverview)).constructor(DeploymentOverview::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deploymentOverview").build()) .build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build(); private static final SdkField CREATOR_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::creatorAsString)).setter(setter(Builder::creator)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("creator").build()).build(); private static final SdkField IGNORE_APPLICATION_STOP_FAILURES_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .getter(getter(DeploymentInfo::ignoreApplicationStopFailures)) .setter(setter(Builder::ignoreApplicationStopFailures)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ignoreApplicationStopFailures") .build()).build(); private static final SdkField AUTO_ROLLBACK_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .getter(getter(DeploymentInfo::autoRollbackConfiguration)).setter(setter(Builder::autoRollbackConfiguration)) .constructor(AutoRollbackConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("autoRollbackConfiguration").build()) .build(); private static final SdkField UPDATE_OUTDATED_INSTANCES_ONLY_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .getter(getter(DeploymentInfo::updateOutdatedInstancesOnly)) .setter(setter(Builder::updateOutdatedInstancesOnly)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("updateOutdatedInstancesOnly") .build()).build(); private static final SdkField ROLLBACK_INFO_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .getter(getter(DeploymentInfo::rollbackInfo)).setter(setter(Builder::rollbackInfo)) .constructor(RollbackInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("rollbackInfo").build()).build(); private static final SdkField DEPLOYMENT_STYLE_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(DeploymentInfo::deploymentStyle)) .setter(setter(Builder::deploymentStyle)).constructor(DeploymentStyle::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deploymentStyle").build()).build(); private static final SdkField TARGET_INSTANCES_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(DeploymentInfo::targetInstances)) .setter(setter(Builder::targetInstances)).constructor(TargetInstances::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("targetInstances").build()).build(); private static final SdkField INSTANCE_TERMINATION_WAIT_TIME_STARTED_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .getter(getter(DeploymentInfo::instanceTerminationWaitTimeStarted)) .setter(setter(Builder::instanceTerminationWaitTimeStarted)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("instanceTerminationWaitTimeStarted") .build()).build(); private static final SdkField BLUE_GREEN_DEPLOYMENT_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .getter(getter(DeploymentInfo::blueGreenDeploymentConfiguration)) .setter(setter(Builder::blueGreenDeploymentConfiguration)) .constructor(BlueGreenDeploymentConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("blueGreenDeploymentConfiguration") .build()).build(); private static final SdkField LOAD_BALANCER_INFO_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(DeploymentInfo::loadBalancerInfo)) .setter(setter(Builder::loadBalancerInfo)).constructor(LoadBalancerInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("loadBalancerInfo").build()).build(); private static final SdkField ADDITIONAL_DEPLOYMENT_STATUS_INFO_FIELD = SdkField . builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::additionalDeploymentStatusInfo)) .setter(setter(Builder::additionalDeploymentStatusInfo)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("additionalDeploymentStatusInfo") .build()).build(); private static final SdkField FILE_EXISTS_BEHAVIOR_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::fileExistsBehaviorAsString)).setter(setter(Builder::fileExistsBehavior)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fileExistsBehavior").build()) .build(); private static final SdkField> DEPLOYMENT_STATUS_MESSAGES_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(DeploymentInfo::deploymentStatusMessages)) .setter(setter(Builder::deploymentStatusMessages)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("deploymentStatusMessages").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField COMPUTE_PLATFORM_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(DeploymentInfo::computePlatformAsString)).setter(setter(Builder::computePlatform)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("computePlatform").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(APPLICATION_NAME_FIELD, DEPLOYMENT_GROUP_NAME_FIELD, DEPLOYMENT_CONFIG_NAME_FIELD, DEPLOYMENT_ID_FIELD, PREVIOUS_REVISION_FIELD, REVISION_FIELD, STATUS_FIELD, ERROR_INFORMATION_FIELD, CREATE_TIME_FIELD, START_TIME_FIELD, COMPLETE_TIME_FIELD, DEPLOYMENT_OVERVIEW_FIELD, DESCRIPTION_FIELD, CREATOR_FIELD, IGNORE_APPLICATION_STOP_FAILURES_FIELD, AUTO_ROLLBACK_CONFIGURATION_FIELD, UPDATE_OUTDATED_INSTANCES_ONLY_FIELD, ROLLBACK_INFO_FIELD, DEPLOYMENT_STYLE_FIELD, TARGET_INSTANCES_FIELD, INSTANCE_TERMINATION_WAIT_TIME_STARTED_FIELD, BLUE_GREEN_DEPLOYMENT_CONFIGURATION_FIELD, LOAD_BALANCER_INFO_FIELD, ADDITIONAL_DEPLOYMENT_STATUS_INFO_FIELD, FILE_EXISTS_BEHAVIOR_FIELD, DEPLOYMENT_STATUS_MESSAGES_FIELD, COMPUTE_PLATFORM_FIELD)); private static final long serialVersionUID = 1L; private final String applicationName; private final String deploymentGroupName; private final String deploymentConfigName; private final String deploymentId; private final RevisionLocation previousRevision; private final RevisionLocation revision; private final String status; private final ErrorInformation errorInformation; private final Instant createTime; private final Instant startTime; private final Instant completeTime; private final DeploymentOverview deploymentOverview; private final String description; private final String creator; private final Boolean ignoreApplicationStopFailures; private final AutoRollbackConfiguration autoRollbackConfiguration; private final Boolean updateOutdatedInstancesOnly; private final RollbackInfo rollbackInfo; private final DeploymentStyle deploymentStyle; private final TargetInstances targetInstances; private final Boolean instanceTerminationWaitTimeStarted; private final BlueGreenDeploymentConfiguration blueGreenDeploymentConfiguration; private final LoadBalancerInfo loadBalancerInfo; private final String additionalDeploymentStatusInfo; private final String fileExistsBehavior; private final List deploymentStatusMessages; private final String computePlatform; private DeploymentInfo(BuilderImpl builder) { this.applicationName = builder.applicationName; this.deploymentGroupName = builder.deploymentGroupName; this.deploymentConfigName = builder.deploymentConfigName; this.deploymentId = builder.deploymentId; this.previousRevision = builder.previousRevision; this.revision = builder.revision; this.status = builder.status; this.errorInformation = builder.errorInformation; this.createTime = builder.createTime; this.startTime = builder.startTime; this.completeTime = builder.completeTime; this.deploymentOverview = builder.deploymentOverview; this.description = builder.description; this.creator = builder.creator; this.ignoreApplicationStopFailures = builder.ignoreApplicationStopFailures; this.autoRollbackConfiguration = builder.autoRollbackConfiguration; this.updateOutdatedInstancesOnly = builder.updateOutdatedInstancesOnly; this.rollbackInfo = builder.rollbackInfo; this.deploymentStyle = builder.deploymentStyle; this.targetInstances = builder.targetInstances; this.instanceTerminationWaitTimeStarted = builder.instanceTerminationWaitTimeStarted; this.blueGreenDeploymentConfiguration = builder.blueGreenDeploymentConfiguration; this.loadBalancerInfo = builder.loadBalancerInfo; this.additionalDeploymentStatusInfo = builder.additionalDeploymentStatusInfo; this.fileExistsBehavior = builder.fileExistsBehavior; this.deploymentStatusMessages = builder.deploymentStatusMessages; this.computePlatform = builder.computePlatform; } /** *

* The application name. *

* * @return The application name. */ public String applicationName() { return applicationName; } /** *

* The deployment group name. *

* * @return The deployment group name. */ public String deploymentGroupName() { return deploymentGroupName; } /** *

* The deployment configuration name. *

* * @return The deployment configuration name. */ public String deploymentConfigName() { return deploymentConfigName; } /** *

* The unique ID of a deployment. *

* * @return The unique ID of a deployment. */ public String deploymentId() { return deploymentId; } /** *

* Information about the application revision that was deployed to the deployment group before the most recent * successful deployment. *

* * @return Information about the application revision that was deployed to the deployment group before the most * recent successful deployment. */ public RevisionLocation previousRevision() { return previousRevision; } /** *

* Information about the location of stored application artifacts and the service from which to retrieve them. *

* * @return Information about the location of stored application artifacts and the service from which to retrieve * them. */ public RevisionLocation revision() { return revision; } /** *

* The current state of the deployment as a whole. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link DeploymentStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #statusAsString}. *

* * @return The current state of the deployment as a whole. * @see DeploymentStatus */ public DeploymentStatus status() { return DeploymentStatus.fromValue(status); } /** *

* The current state of the deployment as a whole. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link DeploymentStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #statusAsString}. *

* * @return The current state of the deployment as a whole. * @see DeploymentStatus */ public String statusAsString() { return status; } /** *

* Information about any error associated with this deployment. *

* * @return Information about any error associated with this deployment. */ public ErrorInformation errorInformation() { return errorInformation; } /** *

* A timestamp that indicates when the deployment was created. *

* * @return A timestamp that indicates when the deployment was created. */ public Instant createTime() { return createTime; } /** *

* A timestamp that indicates when the deployment was deployed to the deployment group. *

*

* In some cases, the reported value of the start time might be later than the complete time. This is due to * differences in the clock settings of backend servers that participate in the deployment process. *

* * @return A timestamp that indicates when the deployment was deployed to the deployment group.

*

* In some cases, the reported value of the start time might be later than the complete time. This is due to * differences in the clock settings of backend servers that participate in the deployment process. */ public Instant startTime() { return startTime; } /** *

* A timestamp that indicates when the deployment was complete. *

* * @return A timestamp that indicates when the deployment was complete. */ public Instant completeTime() { return completeTime; } /** *

* A summary of the deployment status of the instances in the deployment. *

* * @return A summary of the deployment status of the instances in the deployment. */ public DeploymentOverview deploymentOverview() { return deploymentOverview; } /** *

* A comment about the deployment. *

* * @return A comment about the deployment. */ public String description() { return description; } /** *

* The means by which the deployment was created: *

*
    *
  • *

    * user: A user created the deployment. *

    *
  • *
  • *

    * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

    *
  • *
  • *

    * codeDeployRollback: A rollback process created the deployment. *

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, {@link #creator} will * return {@link DeploymentCreator#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #creatorAsString}. *

* * @return The means by which the deployment was created:

*
    *
  • *

    * user: A user created the deployment. *

    *
  • *
  • *

    * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

    *
  • *
  • *

    * codeDeployRollback: A rollback process created the deployment. *

    *
  • * @see DeploymentCreator */ public DeploymentCreator creator() { return DeploymentCreator.fromValue(creator); } /** *

    * The means by which the deployment was created: *

    *
      *
    • *

      * user: A user created the deployment. *

      *
    • *
    • *

      * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

      *
    • *
    • *

      * codeDeployRollback: A rollback process created the deployment. *

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, {@link #creator} will * return {@link DeploymentCreator#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #creatorAsString}. *

    * * @return The means by which the deployment was created:

    *
      *
    • *

      * user: A user created the deployment. *

      *
    • *
    • *

      * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

      *
    • *
    • *

      * codeDeployRollback: A rollback process created the deployment. *

      *
    • * @see DeploymentCreator */ public String creatorAsString() { return creator; } /** *

      * If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an * instance fails, then the deployment continues to the next deployment lifecycle event. For example, if * ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment * continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop. *

      *

      * If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment * fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not * less than the minimum number of healthy hosts, then a deployment to the next instance is attempted. *

      *

      * During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, * and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run * from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run * successfully, the deployment can fail. *

      *

      * If the cause of the failure is a script from the last successful deployment that will never run successfully, * create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, * BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored. *

      * * @return If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event * to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, * if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the * deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with * ApplicationStop.

      *

      * If false or not specified, then if a lifecycle event fails during a deployment to an instance, that * deployment fails. If deployment to that instance is part of an overall deployment and the number of * healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next * instance is attempted. *

      *

      * During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, * BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. * (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts * contains an error and does not run successfully, the deployment can fail. *

      *

      * If the cause of the failure is a script from the last successful deployment that will never run * successfully, create a new deployment and use ignoreApplicationStopFailures to specify that * the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored. */ public Boolean ignoreApplicationStopFailures() { return ignoreApplicationStopFailures; } /** *

      * Information about the automatic rollback configuration associated with the deployment. *

      * * @return Information about the automatic rollback configuration associated with the deployment. */ public AutoRollbackConfiguration autoRollbackConfiguration() { return autoRollbackConfiguration; } /** *

      * Indicates whether only instances that are not running the latest application revision are to be deployed to. *

      * * @return Indicates whether only instances that are not running the latest application revision are to be deployed * to. */ public Boolean updateOutdatedInstancesOnly() { return updateOutdatedInstancesOnly; } /** *

      * Information about a deployment rollback. *

      * * @return Information about a deployment rollback. */ public RollbackInfo rollbackInfo() { return rollbackInfo; } /** *

      * Information about the type of deployment, either in-place or blue/green, you want to run and whether to route * deployment traffic behind a load balancer. *

      * * @return Information about the type of deployment, either in-place or blue/green, you want to run and whether to * route deployment traffic behind a load balancer. */ public DeploymentStyle deploymentStyle() { return deploymentStyle; } /** *

      * Information about the instances that belong to the replacement environment in a blue/green deployment. *

      * * @return Information about the instances that belong to the replacement environment in a blue/green deployment. */ public TargetInstances targetInstances() { return targetInstances; } /** *

      * Indicates whether the wait period set for the termination of instances in the original environment has started. * Status is 'false' if the KEEP_ALIVE option is specified. Otherwise, 'true' as soon as the termination wait period * starts. *

      * * @return Indicates whether the wait period set for the termination of instances in the original environment has * started. Status is 'false' if the KEEP_ALIVE option is specified. Otherwise, 'true' as soon as the * termination wait period starts. */ public Boolean instanceTerminationWaitTimeStarted() { return instanceTerminationWaitTimeStarted; } /** *

      * Information about blue/green deployment options for this deployment. *

      * * @return Information about blue/green deployment options for this deployment. */ public BlueGreenDeploymentConfiguration blueGreenDeploymentConfiguration() { return blueGreenDeploymentConfiguration; } /** *

      * Information about the load balancer used in the deployment. *

      * * @return Information about the load balancer used in the deployment. */ public LoadBalancerInfo loadBalancerInfo() { return loadBalancerInfo; } /** *

      * Provides information about the results of a deployment, such as whether instances in the original environment in * a blue/green deployment were not terminated. *

      * * @return Provides information about the results of a deployment, such as whether instances in the original * environment in a blue/green deployment were not terminated. */ public String additionalDeploymentStatusInfo() { return additionalDeploymentStatusInfo; } /** *

      * Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't * part of the previous successful deployment. *

      *
        *
      • *

        * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

        *
      • *
      • *

        * OVERWRITE: The version of the file from the application revision currently being deployed replaces the version * already on the instance. *

        *
      • *
      • *

        * RETAIN: The version of the file already on the instance is kept and used as part of the new deployment. *

        *
      • *
      *

      * If the service returns an enum value that is not available in the current SDK version, * {@link #fileExistsBehavior} will return {@link FileExistsBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #fileExistsBehaviorAsString}. *

      * * @return Information about how AWS CodeDeploy handles files that already exist in a deployment target location but * weren't part of the previous successful deployment.

      *
        *
      • *

        * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

        *
      • *
      • *

        * OVERWRITE: The version of the file from the application revision currently being deployed replaces the * version already on the instance. *

        *
      • *
      • *

        * RETAIN: The version of the file already on the instance is kept and used as part of the new deployment. *

        *
      • * @see FileExistsBehavior */ public FileExistsBehavior fileExistsBehavior() { return FileExistsBehavior.fromValue(fileExistsBehavior); } /** *

        * Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't * part of the previous successful deployment. *

        *
          *
        • *

          * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

          *
        • *
        • *

          * OVERWRITE: The version of the file from the application revision currently being deployed replaces the version * already on the instance. *

          *
        • *
        • *

          * RETAIN: The version of the file already on the instance is kept and used as part of the new deployment. *

          *
        • *
        *

        * If the service returns an enum value that is not available in the current SDK version, * {@link #fileExistsBehavior} will return {@link FileExistsBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #fileExistsBehaviorAsString}. *

        * * @return Information about how AWS CodeDeploy handles files that already exist in a deployment target location but * weren't part of the previous successful deployment.

        *
          *
        • *

          * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

          *
        • *
        • *

          * OVERWRITE: The version of the file from the application revision currently being deployed replaces the * version already on the instance. *

          *
        • *
        • *

          * RETAIN: The version of the file already on the instance is kept and used as part of the new deployment. *

          *
        • * @see FileExistsBehavior */ public String fileExistsBehaviorAsString() { return fileExistsBehavior; } /** *

          * Messages that contain information about the status of a deployment. *

          *

          * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

          * * @return Messages that contain information about the status of a deployment. */ public List deploymentStatusMessages() { return deploymentStatusMessages; } /** *

          * The destination platform type for the deployment (Lambda or Server). *

          *

          * If the service returns an enum value that is not available in the current SDK version, {@link #computePlatform} * will return {@link ComputePlatform#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #computePlatformAsString}. *

          * * @return The destination platform type for the deployment (Lambda or Server). * @see ComputePlatform */ public ComputePlatform computePlatform() { return ComputePlatform.fromValue(computePlatform); } /** *

          * The destination platform type for the deployment (Lambda or Server). *

          *

          * If the service returns an enum value that is not available in the current SDK version, {@link #computePlatform} * will return {@link ComputePlatform#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available * from {@link #computePlatformAsString}. *

          * * @return The destination platform type for the deployment (Lambda or Server). * @see ComputePlatform */ public String computePlatformAsString() { return computePlatform; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(applicationName()); hashCode = 31 * hashCode + Objects.hashCode(deploymentGroupName()); hashCode = 31 * hashCode + Objects.hashCode(deploymentConfigName()); hashCode = 31 * hashCode + Objects.hashCode(deploymentId()); hashCode = 31 * hashCode + Objects.hashCode(previousRevision()); hashCode = 31 * hashCode + Objects.hashCode(revision()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(errorInformation()); hashCode = 31 * hashCode + Objects.hashCode(createTime()); hashCode = 31 * hashCode + Objects.hashCode(startTime()); hashCode = 31 * hashCode + Objects.hashCode(completeTime()); hashCode = 31 * hashCode + Objects.hashCode(deploymentOverview()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(creatorAsString()); hashCode = 31 * hashCode + Objects.hashCode(ignoreApplicationStopFailures()); hashCode = 31 * hashCode + Objects.hashCode(autoRollbackConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(updateOutdatedInstancesOnly()); hashCode = 31 * hashCode + Objects.hashCode(rollbackInfo()); hashCode = 31 * hashCode + Objects.hashCode(deploymentStyle()); hashCode = 31 * hashCode + Objects.hashCode(targetInstances()); hashCode = 31 * hashCode + Objects.hashCode(instanceTerminationWaitTimeStarted()); hashCode = 31 * hashCode + Objects.hashCode(blueGreenDeploymentConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(loadBalancerInfo()); hashCode = 31 * hashCode + Objects.hashCode(additionalDeploymentStatusInfo()); hashCode = 31 * hashCode + Objects.hashCode(fileExistsBehaviorAsString()); hashCode = 31 * hashCode + Objects.hashCode(deploymentStatusMessages()); hashCode = 31 * hashCode + Objects.hashCode(computePlatformAsString()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof DeploymentInfo)) { return false; } DeploymentInfo other = (DeploymentInfo) obj; return Objects.equals(applicationName(), other.applicationName()) && Objects.equals(deploymentGroupName(), other.deploymentGroupName()) && Objects.equals(deploymentConfigName(), other.deploymentConfigName()) && Objects.equals(deploymentId(), other.deploymentId()) && Objects.equals(previousRevision(), other.previousRevision()) && Objects.equals(revision(), other.revision()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(errorInformation(), other.errorInformation()) && Objects.equals(createTime(), other.createTime()) && Objects.equals(startTime(), other.startTime()) && Objects.equals(completeTime(), other.completeTime()) && Objects.equals(deploymentOverview(), other.deploymentOverview()) && Objects.equals(description(), other.description()) && Objects.equals(creatorAsString(), other.creatorAsString()) && Objects.equals(ignoreApplicationStopFailures(), other.ignoreApplicationStopFailures()) && Objects.equals(autoRollbackConfiguration(), other.autoRollbackConfiguration()) && Objects.equals(updateOutdatedInstancesOnly(), other.updateOutdatedInstancesOnly()) && Objects.equals(rollbackInfo(), other.rollbackInfo()) && Objects.equals(deploymentStyle(), other.deploymentStyle()) && Objects.equals(targetInstances(), other.targetInstances()) && Objects.equals(instanceTerminationWaitTimeStarted(), other.instanceTerminationWaitTimeStarted()) && Objects.equals(blueGreenDeploymentConfiguration(), other.blueGreenDeploymentConfiguration()) && Objects.equals(loadBalancerInfo(), other.loadBalancerInfo()) && Objects.equals(additionalDeploymentStatusInfo(), other.additionalDeploymentStatusInfo()) && Objects.equals(fileExistsBehaviorAsString(), other.fileExistsBehaviorAsString()) && Objects.equals(deploymentStatusMessages(), other.deploymentStatusMessages()) && Objects.equals(computePlatformAsString(), other.computePlatformAsString()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("DeploymentInfo").add("ApplicationName", applicationName()) .add("DeploymentGroupName", deploymentGroupName()).add("DeploymentConfigName", deploymentConfigName()) .add("DeploymentId", deploymentId()).add("PreviousRevision", previousRevision()).add("Revision", revision()) .add("Status", statusAsString()).add("ErrorInformation", errorInformation()).add("CreateTime", createTime()) .add("StartTime", startTime()).add("CompleteTime", completeTime()) .add("DeploymentOverview", deploymentOverview()).add("Description", description()) .add("Creator", creatorAsString()).add("IgnoreApplicationStopFailures", ignoreApplicationStopFailures()) .add("AutoRollbackConfiguration", autoRollbackConfiguration()) .add("UpdateOutdatedInstancesOnly", updateOutdatedInstancesOnly()).add("RollbackInfo", rollbackInfo()) .add("DeploymentStyle", deploymentStyle()).add("TargetInstances", targetInstances()) .add("InstanceTerminationWaitTimeStarted", instanceTerminationWaitTimeStarted()) .add("BlueGreenDeploymentConfiguration", blueGreenDeploymentConfiguration()) .add("LoadBalancerInfo", loadBalancerInfo()) .add("AdditionalDeploymentStatusInfo", additionalDeploymentStatusInfo()) .add("FileExistsBehavior", fileExistsBehaviorAsString()) .add("DeploymentStatusMessages", deploymentStatusMessages()).add("ComputePlatform", computePlatformAsString()) .build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "applicationName": return Optional.ofNullable(clazz.cast(applicationName())); case "deploymentGroupName": return Optional.ofNullable(clazz.cast(deploymentGroupName())); case "deploymentConfigName": return Optional.ofNullable(clazz.cast(deploymentConfigName())); case "deploymentId": return Optional.ofNullable(clazz.cast(deploymentId())); case "previousRevision": return Optional.ofNullable(clazz.cast(previousRevision())); case "revision": return Optional.ofNullable(clazz.cast(revision())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "errorInformation": return Optional.ofNullable(clazz.cast(errorInformation())); case "createTime": return Optional.ofNullable(clazz.cast(createTime())); case "startTime": return Optional.ofNullable(clazz.cast(startTime())); case "completeTime": return Optional.ofNullable(clazz.cast(completeTime())); case "deploymentOverview": return Optional.ofNullable(clazz.cast(deploymentOverview())); case "description": return Optional.ofNullable(clazz.cast(description())); case "creator": return Optional.ofNullable(clazz.cast(creatorAsString())); case "ignoreApplicationStopFailures": return Optional.ofNullable(clazz.cast(ignoreApplicationStopFailures())); case "autoRollbackConfiguration": return Optional.ofNullable(clazz.cast(autoRollbackConfiguration())); case "updateOutdatedInstancesOnly": return Optional.ofNullable(clazz.cast(updateOutdatedInstancesOnly())); case "rollbackInfo": return Optional.ofNullable(clazz.cast(rollbackInfo())); case "deploymentStyle": return Optional.ofNullable(clazz.cast(deploymentStyle())); case "targetInstances": return Optional.ofNullable(clazz.cast(targetInstances())); case "instanceTerminationWaitTimeStarted": return Optional.ofNullable(clazz.cast(instanceTerminationWaitTimeStarted())); case "blueGreenDeploymentConfiguration": return Optional.ofNullable(clazz.cast(blueGreenDeploymentConfiguration())); case "loadBalancerInfo": return Optional.ofNullable(clazz.cast(loadBalancerInfo())); case "additionalDeploymentStatusInfo": return Optional.ofNullable(clazz.cast(additionalDeploymentStatusInfo())); case "fileExistsBehavior": return Optional.ofNullable(clazz.cast(fileExistsBehaviorAsString())); case "deploymentStatusMessages": return Optional.ofNullable(clazz.cast(deploymentStatusMessages())); case "computePlatform": return Optional.ofNullable(clazz.cast(computePlatformAsString())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((DeploymentInfo) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

          * The application name. *

          * * @param applicationName * The application name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applicationName(String applicationName); /** *

          * The deployment group name. *

          * * @param deploymentGroupName * The deployment group name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deploymentGroupName(String deploymentGroupName); /** *

          * The deployment configuration name. *

          * * @param deploymentConfigName * The deployment configuration name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deploymentConfigName(String deploymentConfigName); /** *

          * The unique ID of a deployment. *

          * * @param deploymentId * The unique ID of a deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deploymentId(String deploymentId); /** *

          * Information about the application revision that was deployed to the deployment group before the most recent * successful deployment. *

          * * @param previousRevision * Information about the application revision that was deployed to the deployment group before the most * recent successful deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder previousRevision(RevisionLocation previousRevision); /** *

          * Information about the application revision that was deployed to the deployment group before the most recent * successful deployment. *

          * This is a convenience that creates an instance of the {@link RevisionLocation.Builder} avoiding the need to * create one manually via {@link RevisionLocation#builder()}. * * When the {@link Consumer} completes, {@link RevisionLocation.Builder#build()} is called immediately and its * result is passed to {@link #previousRevision(RevisionLocation)}. * * @param previousRevision * a consumer that will call methods on {@link RevisionLocation.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #previousRevision(RevisionLocation) */ default Builder previousRevision(Consumer previousRevision) { return previousRevision(RevisionLocation.builder().applyMutation(previousRevision).build()); } /** *

          * Information about the location of stored application artifacts and the service from which to retrieve them. *

          * * @param revision * Information about the location of stored application artifacts and the service from which to retrieve * them. * @return Returns a reference to this object so that method calls can be chained together. */ Builder revision(RevisionLocation revision); /** *

          * Information about the location of stored application artifacts and the service from which to retrieve them. *

          * This is a convenience that creates an instance of the {@link RevisionLocation.Builder} avoiding the need to * create one manually via {@link RevisionLocation#builder()}. * * When the {@link Consumer} completes, {@link RevisionLocation.Builder#build()} is called immediately and its * result is passed to {@link #revision(RevisionLocation)}. * * @param revision * a consumer that will call methods on {@link RevisionLocation.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #revision(RevisionLocation) */ default Builder revision(Consumer revision) { return revision(RevisionLocation.builder().applyMutation(revision).build()); } /** *

          * The current state of the deployment as a whole. *

          * * @param status * The current state of the deployment as a whole. * @see DeploymentStatus * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentStatus */ Builder status(String status); /** *

          * The current state of the deployment as a whole. *

          * * @param status * The current state of the deployment as a whole. * @see DeploymentStatus * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentStatus */ Builder status(DeploymentStatus status); /** *

          * Information about any error associated with this deployment. *

          * * @param errorInformation * Information about any error associated with this deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder errorInformation(ErrorInformation errorInformation); /** *

          * Information about any error associated with this deployment. *

          * This is a convenience that creates an instance of the {@link ErrorInformation.Builder} avoiding the need to * create one manually via {@link ErrorInformation#builder()}. * * When the {@link Consumer} completes, {@link ErrorInformation.Builder#build()} is called immediately and its * result is passed to {@link #errorInformation(ErrorInformation)}. * * @param errorInformation * a consumer that will call methods on {@link ErrorInformation.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #errorInformation(ErrorInformation) */ default Builder errorInformation(Consumer errorInformation) { return errorInformation(ErrorInformation.builder().applyMutation(errorInformation).build()); } /** *

          * A timestamp that indicates when the deployment was created. *

          * * @param createTime * A timestamp that indicates when the deployment was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createTime(Instant createTime); /** *

          * A timestamp that indicates when the deployment was deployed to the deployment group. *

          *

          * In some cases, the reported value of the start time might be later than the complete time. This is due to * differences in the clock settings of backend servers that participate in the deployment process. *

          * * @param startTime * A timestamp that indicates when the deployment was deployed to the deployment group.

          *

          * In some cases, the reported value of the start time might be later than the complete time. This is due * to differences in the clock settings of backend servers that participate in the deployment process. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startTime(Instant startTime); /** *

          * A timestamp that indicates when the deployment was complete. *

          * * @param completeTime * A timestamp that indicates when the deployment was complete. * @return Returns a reference to this object so that method calls can be chained together. */ Builder completeTime(Instant completeTime); /** *

          * A summary of the deployment status of the instances in the deployment. *

          * * @param deploymentOverview * A summary of the deployment status of the instances in the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deploymentOverview(DeploymentOverview deploymentOverview); /** *

          * A summary of the deployment status of the instances in the deployment. *

          * This is a convenience that creates an instance of the {@link DeploymentOverview.Builder} avoiding the need to * create one manually via {@link DeploymentOverview#builder()}. * * When the {@link Consumer} completes, {@link DeploymentOverview.Builder#build()} is called immediately and its * result is passed to {@link #deploymentOverview(DeploymentOverview)}. * * @param deploymentOverview * a consumer that will call methods on {@link DeploymentOverview.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #deploymentOverview(DeploymentOverview) */ default Builder deploymentOverview(Consumer deploymentOverview) { return deploymentOverview(DeploymentOverview.builder().applyMutation(deploymentOverview).build()); } /** *

          * A comment about the deployment. *

          * * @param description * A comment about the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

          * The means by which the deployment was created: *

          *
            *
          • *

            * user: A user created the deployment. *

            *
          • *
          • *

            * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

            *
          • *
          • *

            * codeDeployRollback: A rollback process created the deployment. *

            *
          • *
          * * @param creator * The means by which the deployment was created:

          *
            *
          • *

            * user: A user created the deployment. *

            *
          • *
          • *

            * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

            *
          • *
          • *

            * codeDeployRollback: A rollback process created the deployment. *

            *
          • * @see DeploymentCreator * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentCreator */ Builder creator(String creator); /** *

            * The means by which the deployment was created: *

            *
              *
            • *

              * user: A user created the deployment. *

              *
            • *
            • *

              * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

              *
            • *
            • *

              * codeDeployRollback: A rollback process created the deployment. *

              *
            • *
            * * @param creator * The means by which the deployment was created:

            *
              *
            • *

              * user: A user created the deployment. *

              *
            • *
            • *

              * autoscaling: Amazon EC2 Auto Scaling created the deployment. *

              *
            • *
            • *

              * codeDeployRollback: A rollback process created the deployment. *

              *
            • * @see DeploymentCreator * @return Returns a reference to this object so that method calls can be chained together. * @see DeploymentCreator */ Builder creator(DeploymentCreator creator); /** *

              * If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to * an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if * ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the * deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with * ApplicationStop. *

              *

              * If false or not specified, then if a lifecycle event fails during a deployment to an instance, that * deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy * hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is * attempted. *

              *

              * During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, * BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All * other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an * error and does not run successfully, the deployment can fail. *

              *

              * If the cause of the failure is a script from the last successful deployment that will never run successfully, * create a new deployment and use ignoreApplicationStopFailures to specify that the * ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored. *

              * * @param ignoreApplicationStopFailures * If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle * event to an instance fails, then the deployment continues to the next deployment lifecycle event. For * example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic * fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment * continues with ApplicationStop.

              *

              * If false or not specified, then if a lifecycle event fails during a deployment to an instance, that * deployment fails. If deployment to that instance is part of an overall deployment and the number of * healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next * instance is attempted. *

              *

              * During a deployment, the AWS CodeDeploy agent runs the scripts specified for ApplicationStop, * BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. * (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts * contains an error and does not run successfully, the deployment can fail. *

              *

              * If the cause of the failure is a script from the last successful deployment that will never run * successfully, create a new deployment and use ignoreApplicationStopFailures to specify * that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ignoreApplicationStopFailures(Boolean ignoreApplicationStopFailures); /** *

              * Information about the automatic rollback configuration associated with the deployment. *

              * * @param autoRollbackConfiguration * Information about the automatic rollback configuration associated with the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoRollbackConfiguration(AutoRollbackConfiguration autoRollbackConfiguration); /** *

              * Information about the automatic rollback configuration associated with the deployment. *

              * This is a convenience that creates an instance of the {@link AutoRollbackConfiguration.Builder} avoiding the * need to create one manually via {@link AutoRollbackConfiguration#builder()}. * * When the {@link Consumer} completes, {@link AutoRollbackConfiguration.Builder#build()} is called immediately * and its result is passed to {@link #autoRollbackConfiguration(AutoRollbackConfiguration)}. * * @param autoRollbackConfiguration * a consumer that will call methods on {@link AutoRollbackConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #autoRollbackConfiguration(AutoRollbackConfiguration) */ default Builder autoRollbackConfiguration(Consumer autoRollbackConfiguration) { return autoRollbackConfiguration(AutoRollbackConfiguration.builder().applyMutation(autoRollbackConfiguration).build()); } /** *

              * Indicates whether only instances that are not running the latest application revision are to be deployed to. *

              * * @param updateOutdatedInstancesOnly * Indicates whether only instances that are not running the latest application revision are to be * deployed to. * @return Returns a reference to this object so that method calls can be chained together. */ Builder updateOutdatedInstancesOnly(Boolean updateOutdatedInstancesOnly); /** *

              * Information about a deployment rollback. *

              * * @param rollbackInfo * Information about a deployment rollback. * @return Returns a reference to this object so that method calls can be chained together. */ Builder rollbackInfo(RollbackInfo rollbackInfo); /** *

              * Information about a deployment rollback. *

              * This is a convenience that creates an instance of the {@link RollbackInfo.Builder} avoiding the need to * create one manually via {@link RollbackInfo#builder()}. * * When the {@link Consumer} completes, {@link RollbackInfo.Builder#build()} is called immediately and its * result is passed to {@link #rollbackInfo(RollbackInfo)}. * * @param rollbackInfo * a consumer that will call methods on {@link RollbackInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #rollbackInfo(RollbackInfo) */ default Builder rollbackInfo(Consumer rollbackInfo) { return rollbackInfo(RollbackInfo.builder().applyMutation(rollbackInfo).build()); } /** *

              * Information about the type of deployment, either in-place or blue/green, you want to run and whether to route * deployment traffic behind a load balancer. *

              * * @param deploymentStyle * Information about the type of deployment, either in-place or blue/green, you want to run and whether * to route deployment traffic behind a load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deploymentStyle(DeploymentStyle deploymentStyle); /** *

              * Information about the type of deployment, either in-place or blue/green, you want to run and whether to route * deployment traffic behind a load balancer. *

              * This is a convenience that creates an instance of the {@link DeploymentStyle.Builder} avoiding the need to * create one manually via {@link DeploymentStyle#builder()}. * * When the {@link Consumer} completes, {@link DeploymentStyle.Builder#build()} is called immediately and its * result is passed to {@link #deploymentStyle(DeploymentStyle)}. * * @param deploymentStyle * a consumer that will call methods on {@link DeploymentStyle.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #deploymentStyle(DeploymentStyle) */ default Builder deploymentStyle(Consumer deploymentStyle) { return deploymentStyle(DeploymentStyle.builder().applyMutation(deploymentStyle).build()); } /** *

              * Information about the instances that belong to the replacement environment in a blue/green deployment. *

              * * @param targetInstances * Information about the instances that belong to the replacement environment in a blue/green deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder targetInstances(TargetInstances targetInstances); /** *

              * Information about the instances that belong to the replacement environment in a blue/green deployment. *

              * This is a convenience that creates an instance of the {@link TargetInstances.Builder} avoiding the need to * create one manually via {@link TargetInstances#builder()}. * * When the {@link Consumer} completes, {@link TargetInstances.Builder#build()} is called immediately and its * result is passed to {@link #targetInstances(TargetInstances)}. * * @param targetInstances * a consumer that will call methods on {@link TargetInstances.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #targetInstances(TargetInstances) */ default Builder targetInstances(Consumer targetInstances) { return targetInstances(TargetInstances.builder().applyMutation(targetInstances).build()); } /** *

              * Indicates whether the wait period set for the termination of instances in the original environment has * started. Status is 'false' if the KEEP_ALIVE option is specified. Otherwise, 'true' as soon as the * termination wait period starts. *

              * * @param instanceTerminationWaitTimeStarted * Indicates whether the wait period set for the termination of instances in the original environment has * started. Status is 'false' if the KEEP_ALIVE option is specified. Otherwise, 'true' as soon as the * termination wait period starts. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceTerminationWaitTimeStarted(Boolean instanceTerminationWaitTimeStarted); /** *

              * Information about blue/green deployment options for this deployment. *

              * * @param blueGreenDeploymentConfiguration * Information about blue/green deployment options for this deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder blueGreenDeploymentConfiguration(BlueGreenDeploymentConfiguration blueGreenDeploymentConfiguration); /** *

              * Information about blue/green deployment options for this deployment. *

              * This is a convenience that creates an instance of the {@link BlueGreenDeploymentConfiguration.Builder} * avoiding the need to create one manually via {@link BlueGreenDeploymentConfiguration#builder()}. * * When the {@link Consumer} completes, {@link BlueGreenDeploymentConfiguration.Builder#build()} is called * immediately and its result is passed to * {@link #blueGreenDeploymentConfiguration(BlueGreenDeploymentConfiguration)}. * * @param blueGreenDeploymentConfiguration * a consumer that will call methods on {@link BlueGreenDeploymentConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #blueGreenDeploymentConfiguration(BlueGreenDeploymentConfiguration) */ default Builder blueGreenDeploymentConfiguration( Consumer blueGreenDeploymentConfiguration) { return blueGreenDeploymentConfiguration(BlueGreenDeploymentConfiguration.builder() .applyMutation(blueGreenDeploymentConfiguration).build()); } /** *

              * Information about the load balancer used in the deployment. *

              * * @param loadBalancerInfo * Information about the load balancer used in the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder loadBalancerInfo(LoadBalancerInfo loadBalancerInfo); /** *

              * Information about the load balancer used in the deployment. *

              * This is a convenience that creates an instance of the {@link LoadBalancerInfo.Builder} avoiding the need to * create one manually via {@link LoadBalancerInfo#builder()}. * * When the {@link Consumer} completes, {@link LoadBalancerInfo.Builder#build()} is called immediately and its * result is passed to {@link #loadBalancerInfo(LoadBalancerInfo)}. * * @param loadBalancerInfo * a consumer that will call methods on {@link LoadBalancerInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #loadBalancerInfo(LoadBalancerInfo) */ default Builder loadBalancerInfo(Consumer loadBalancerInfo) { return loadBalancerInfo(LoadBalancerInfo.builder().applyMutation(loadBalancerInfo).build()); } /** *

              * Provides information about the results of a deployment, such as whether instances in the original environment * in a blue/green deployment were not terminated. *

              * * @param additionalDeploymentStatusInfo * Provides information about the results of a deployment, such as whether instances in the original * environment in a blue/green deployment were not terminated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder additionalDeploymentStatusInfo(String additionalDeploymentStatusInfo); /** *

              * Information about how AWS CodeDeploy handles files that already exist in a deployment target location but * weren't part of the previous successful deployment. *

              *
                *
              • *

                * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

                *
              • *
              • *

                * OVERWRITE: The version of the file from the application revision currently being deployed replaces the * version already on the instance. *

                *
              • *
              • *

                * RETAIN: The version of the file already on the instance is kept and used as part of the new deployment. *

                *
              • *
              * * @param fileExistsBehavior * Information about how AWS CodeDeploy handles files that already exist in a deployment target location * but weren't part of the previous successful deployment.

              *
                *
              • *

                * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

                *
              • *
              • *

                * OVERWRITE: The version of the file from the application revision currently being deployed replaces the * version already on the instance. *

                *
              • *
              • *

                * RETAIN: The version of the file already on the instance is kept and used as part of the new * deployment. *

                *
              • * @see FileExistsBehavior * @return Returns a reference to this object so that method calls can be chained together. * @see FileExistsBehavior */ Builder fileExistsBehavior(String fileExistsBehavior); /** *

                * Information about how AWS CodeDeploy handles files that already exist in a deployment target location but * weren't part of the previous successful deployment. *

                *
                  *
                • *

                  * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

                  *
                • *
                • *

                  * OVERWRITE: The version of the file from the application revision currently being deployed replaces the * version already on the instance. *

                  *
                • *
                • *

                  * RETAIN: The version of the file already on the instance is kept and used as part of the new deployment. *

                  *
                • *
                * * @param fileExistsBehavior * Information about how AWS CodeDeploy handles files that already exist in a deployment target location * but weren't part of the previous successful deployment.

                *
                  *
                • *

                  * DISALLOW: The deployment fails. This is also the default behavior if no option is specified. *

                  *
                • *
                • *

                  * OVERWRITE: The version of the file from the application revision currently being deployed replaces the * version already on the instance. *

                  *
                • *
                • *

                  * RETAIN: The version of the file already on the instance is kept and used as part of the new * deployment. *

                  *
                • * @see FileExistsBehavior * @return Returns a reference to this object so that method calls can be chained together. * @see FileExistsBehavior */ Builder fileExistsBehavior(FileExistsBehavior fileExistsBehavior); /** *

                  * Messages that contain information about the status of a deployment. *

                  * * @param deploymentStatusMessages * Messages that contain information about the status of a deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deploymentStatusMessages(Collection deploymentStatusMessages); /** *

                  * Messages that contain information about the status of a deployment. *

                  * * @param deploymentStatusMessages * Messages that contain information about the status of a deployment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deploymentStatusMessages(String... deploymentStatusMessages); /** *

                  * The destination platform type for the deployment (Lambda or Server). *

                  * * @param computePlatform * The destination platform type for the deployment (Lambda or Server). * @see ComputePlatform * @return Returns a reference to this object so that method calls can be chained together. * @see ComputePlatform */ Builder computePlatform(String computePlatform); /** *

                  * The destination platform type for the deployment (Lambda or Server). *

                  * * @param computePlatform * The destination platform type for the deployment (Lambda or Server). * @see ComputePlatform * @return Returns a reference to this object so that method calls can be chained together. * @see ComputePlatform */ Builder computePlatform(ComputePlatform computePlatform); } static final class BuilderImpl implements Builder { private String applicationName; private String deploymentGroupName; private String deploymentConfigName; private String deploymentId; private RevisionLocation previousRevision; private RevisionLocation revision; private String status; private ErrorInformation errorInformation; private Instant createTime; private Instant startTime; private Instant completeTime; private DeploymentOverview deploymentOverview; private String description; private String creator; private Boolean ignoreApplicationStopFailures; private AutoRollbackConfiguration autoRollbackConfiguration; private Boolean updateOutdatedInstancesOnly; private RollbackInfo rollbackInfo; private DeploymentStyle deploymentStyle; private TargetInstances targetInstances; private Boolean instanceTerminationWaitTimeStarted; private BlueGreenDeploymentConfiguration blueGreenDeploymentConfiguration; private LoadBalancerInfo loadBalancerInfo; private String additionalDeploymentStatusInfo; private String fileExistsBehavior; private List deploymentStatusMessages = DefaultSdkAutoConstructList.getInstance(); private String computePlatform; private BuilderImpl() { } private BuilderImpl(DeploymentInfo model) { applicationName(model.applicationName); deploymentGroupName(model.deploymentGroupName); deploymentConfigName(model.deploymentConfigName); deploymentId(model.deploymentId); previousRevision(model.previousRevision); revision(model.revision); status(model.status); errorInformation(model.errorInformation); createTime(model.createTime); startTime(model.startTime); completeTime(model.completeTime); deploymentOverview(model.deploymentOverview); description(model.description); creator(model.creator); ignoreApplicationStopFailures(model.ignoreApplicationStopFailures); autoRollbackConfiguration(model.autoRollbackConfiguration); updateOutdatedInstancesOnly(model.updateOutdatedInstancesOnly); rollbackInfo(model.rollbackInfo); deploymentStyle(model.deploymentStyle); targetInstances(model.targetInstances); instanceTerminationWaitTimeStarted(model.instanceTerminationWaitTimeStarted); blueGreenDeploymentConfiguration(model.blueGreenDeploymentConfiguration); loadBalancerInfo(model.loadBalancerInfo); additionalDeploymentStatusInfo(model.additionalDeploymentStatusInfo); fileExistsBehavior(model.fileExistsBehavior); deploymentStatusMessages(model.deploymentStatusMessages); computePlatform(model.computePlatform); } public final String getApplicationName() { return applicationName; } @Override public final Builder applicationName(String applicationName) { this.applicationName = applicationName; return this; } public final void setApplicationName(String applicationName) { this.applicationName = applicationName; } public final String getDeploymentGroupName() { return deploymentGroupName; } @Override public final Builder deploymentGroupName(String deploymentGroupName) { this.deploymentGroupName = deploymentGroupName; return this; } public final void setDeploymentGroupName(String deploymentGroupName) { this.deploymentGroupName = deploymentGroupName; } public final String getDeploymentConfigName() { return deploymentConfigName; } @Override public final Builder deploymentConfigName(String deploymentConfigName) { this.deploymentConfigName = deploymentConfigName; return this; } public final void setDeploymentConfigName(String deploymentConfigName) { this.deploymentConfigName = deploymentConfigName; } public final String getDeploymentId() { return deploymentId; } @Override public final Builder deploymentId(String deploymentId) { this.deploymentId = deploymentId; return this; } public final void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public final RevisionLocation.Builder getPreviousRevision() { return previousRevision != null ? previousRevision.toBuilder() : null; } @Override public final Builder previousRevision(RevisionLocation previousRevision) { this.previousRevision = previousRevision; return this; } public final void setPreviousRevision(RevisionLocation.BuilderImpl previousRevision) { this.previousRevision = previousRevision != null ? previousRevision.build() : null; } public final RevisionLocation.Builder getRevision() { return revision != null ? revision.toBuilder() : null; } @Override public final Builder revision(RevisionLocation revision) { this.revision = revision; return this; } public final void setRevision(RevisionLocation.BuilderImpl revision) { this.revision = revision != null ? revision.build() : null; } public final String getStatusAsString() { return status; } @Override public final Builder status(String status) { this.status = status; return this; } @Override public final Builder status(DeploymentStatus status) { this.status(status.toString()); return this; } public final void setStatus(String status) { this.status = status; } public final ErrorInformation.Builder getErrorInformation() { return errorInformation != null ? errorInformation.toBuilder() : null; } @Override public final Builder errorInformation(ErrorInformation errorInformation) { this.errorInformation = errorInformation; return this; } public final void setErrorInformation(ErrorInformation.BuilderImpl errorInformation) { this.errorInformation = errorInformation != null ? errorInformation.build() : null; } public final Instant getCreateTime() { return createTime; } @Override public final Builder createTime(Instant createTime) { this.createTime = createTime; return this; } public final void setCreateTime(Instant createTime) { this.createTime = createTime; } public final Instant getStartTime() { return startTime; } @Override public final Builder startTime(Instant startTime) { this.startTime = startTime; return this; } public final void setStartTime(Instant startTime) { this.startTime = startTime; } public final Instant getCompleteTime() { return completeTime; } @Override public final Builder completeTime(Instant completeTime) { this.completeTime = completeTime; return this; } public final void setCompleteTime(Instant completeTime) { this.completeTime = completeTime; } public final DeploymentOverview.Builder getDeploymentOverview() { return deploymentOverview != null ? deploymentOverview.toBuilder() : null; } @Override public final Builder deploymentOverview(DeploymentOverview deploymentOverview) { this.deploymentOverview = deploymentOverview; return this; } public final void setDeploymentOverview(DeploymentOverview.BuilderImpl deploymentOverview) { this.deploymentOverview = deploymentOverview != null ? deploymentOverview.build() : null; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final String getCreatorAsString() { return creator; } @Override public final Builder creator(String creator) { this.creator = creator; return this; } @Override public final Builder creator(DeploymentCreator creator) { this.creator(creator.toString()); return this; } public final void setCreator(String creator) { this.creator = creator; } public final Boolean getIgnoreApplicationStopFailures() { return ignoreApplicationStopFailures; } @Override public final Builder ignoreApplicationStopFailures(Boolean ignoreApplicationStopFailures) { this.ignoreApplicationStopFailures = ignoreApplicationStopFailures; return this; } public final void setIgnoreApplicationStopFailures(Boolean ignoreApplicationStopFailures) { this.ignoreApplicationStopFailures = ignoreApplicationStopFailures; } public final AutoRollbackConfiguration.Builder getAutoRollbackConfiguration() { return autoRollbackConfiguration != null ? autoRollbackConfiguration.toBuilder() : null; } @Override public final Builder autoRollbackConfiguration(AutoRollbackConfiguration autoRollbackConfiguration) { this.autoRollbackConfiguration = autoRollbackConfiguration; return this; } public final void setAutoRollbackConfiguration(AutoRollbackConfiguration.BuilderImpl autoRollbackConfiguration) { this.autoRollbackConfiguration = autoRollbackConfiguration != null ? autoRollbackConfiguration.build() : null; } public final Boolean getUpdateOutdatedInstancesOnly() { return updateOutdatedInstancesOnly; } @Override public final Builder updateOutdatedInstancesOnly(Boolean updateOutdatedInstancesOnly) { this.updateOutdatedInstancesOnly = updateOutdatedInstancesOnly; return this; } public final void setUpdateOutdatedInstancesOnly(Boolean updateOutdatedInstancesOnly) { this.updateOutdatedInstancesOnly = updateOutdatedInstancesOnly; } public final RollbackInfo.Builder getRollbackInfo() { return rollbackInfo != null ? rollbackInfo.toBuilder() : null; } @Override public final Builder rollbackInfo(RollbackInfo rollbackInfo) { this.rollbackInfo = rollbackInfo; return this; } public final void setRollbackInfo(RollbackInfo.BuilderImpl rollbackInfo) { this.rollbackInfo = rollbackInfo != null ? rollbackInfo.build() : null; } public final DeploymentStyle.Builder getDeploymentStyle() { return deploymentStyle != null ? deploymentStyle.toBuilder() : null; } @Override public final Builder deploymentStyle(DeploymentStyle deploymentStyle) { this.deploymentStyle = deploymentStyle; return this; } public final void setDeploymentStyle(DeploymentStyle.BuilderImpl deploymentStyle) { this.deploymentStyle = deploymentStyle != null ? deploymentStyle.build() : null; } public final TargetInstances.Builder getTargetInstances() { return targetInstances != null ? targetInstances.toBuilder() : null; } @Override public final Builder targetInstances(TargetInstances targetInstances) { this.targetInstances = targetInstances; return this; } public final void setTargetInstances(TargetInstances.BuilderImpl targetInstances) { this.targetInstances = targetInstances != null ? targetInstances.build() : null; } public final Boolean getInstanceTerminationWaitTimeStarted() { return instanceTerminationWaitTimeStarted; } @Override public final Builder instanceTerminationWaitTimeStarted(Boolean instanceTerminationWaitTimeStarted) { this.instanceTerminationWaitTimeStarted = instanceTerminationWaitTimeStarted; return this; } public final void setInstanceTerminationWaitTimeStarted(Boolean instanceTerminationWaitTimeStarted) { this.instanceTerminationWaitTimeStarted = instanceTerminationWaitTimeStarted; } public final BlueGreenDeploymentConfiguration.Builder getBlueGreenDeploymentConfiguration() { return blueGreenDeploymentConfiguration != null ? blueGreenDeploymentConfiguration.toBuilder() : null; } @Override public final Builder blueGreenDeploymentConfiguration(BlueGreenDeploymentConfiguration blueGreenDeploymentConfiguration) { this.blueGreenDeploymentConfiguration = blueGreenDeploymentConfiguration; return this; } public final void setBlueGreenDeploymentConfiguration( BlueGreenDeploymentConfiguration.BuilderImpl blueGreenDeploymentConfiguration) { this.blueGreenDeploymentConfiguration = blueGreenDeploymentConfiguration != null ? blueGreenDeploymentConfiguration .build() : null; } public final LoadBalancerInfo.Builder getLoadBalancerInfo() { return loadBalancerInfo != null ? loadBalancerInfo.toBuilder() : null; } @Override public final Builder loadBalancerInfo(LoadBalancerInfo loadBalancerInfo) { this.loadBalancerInfo = loadBalancerInfo; return this; } public final void setLoadBalancerInfo(LoadBalancerInfo.BuilderImpl loadBalancerInfo) { this.loadBalancerInfo = loadBalancerInfo != null ? loadBalancerInfo.build() : null; } public final String getAdditionalDeploymentStatusInfo() { return additionalDeploymentStatusInfo; } @Override public final Builder additionalDeploymentStatusInfo(String additionalDeploymentStatusInfo) { this.additionalDeploymentStatusInfo = additionalDeploymentStatusInfo; return this; } public final void setAdditionalDeploymentStatusInfo(String additionalDeploymentStatusInfo) { this.additionalDeploymentStatusInfo = additionalDeploymentStatusInfo; } public final String getFileExistsBehaviorAsString() { return fileExistsBehavior; } @Override public final Builder fileExistsBehavior(String fileExistsBehavior) { this.fileExistsBehavior = fileExistsBehavior; return this; } @Override public final Builder fileExistsBehavior(FileExistsBehavior fileExistsBehavior) { this.fileExistsBehavior(fileExistsBehavior.toString()); return this; } public final void setFileExistsBehavior(String fileExistsBehavior) { this.fileExistsBehavior = fileExistsBehavior; } public final Collection getDeploymentStatusMessages() { return deploymentStatusMessages; } @Override public final Builder deploymentStatusMessages(Collection deploymentStatusMessages) { this.deploymentStatusMessages = DeploymentStatusMessageListCopier.copy(deploymentStatusMessages); return this; } @Override @SafeVarargs public final Builder deploymentStatusMessages(String... deploymentStatusMessages) { deploymentStatusMessages(Arrays.asList(deploymentStatusMessages)); return this; } public final void setDeploymentStatusMessages(Collection deploymentStatusMessages) { this.deploymentStatusMessages = DeploymentStatusMessageListCopier.copy(deploymentStatusMessages); } public final String getComputePlatformAsString() { return computePlatform; } @Override public final Builder computePlatform(String computePlatform) { this.computePlatform = computePlatform; return this; } @Override public final Builder computePlatform(ComputePlatform computePlatform) { this.computePlatform(computePlatform.toString()); return this; } public final void setComputePlatform(String computePlatform) { this.computePlatform = computePlatform; } @Override public DeploymentInfo build() { return new DeploymentInfo(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy