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

com.amazonaws.services.lightsail.model.ContainerServiceDeployment Maven / Gradle / Ivy

/*
 * Copyright 2018-2023 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 com.amazonaws.services.lightsail.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a container deployment configuration of an Amazon Lightsail container service. *

*

* A deployment specifies the settings, such as the ports and launch command, of containers that are deployed to your * container service. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ContainerServiceDeployment implements Serializable, Cloneable, StructuredPojo { /** *

* The version number of the deployment. *

*/ private Integer version; /** *

* The state of the deployment. *

*

* A deployment can be in one of the following states: *

*
    *
  • *

    * Activating - The deployment is being created. *

    *
  • *
  • *

    * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

    *
  • *
  • *

    * Inactive - The deployment was previously successfully created, but it is not currently running on * the container service. *

    *
  • *
  • *

    * Failed - The deployment failed. Use the GetContainerLog action to view the log events * for the containers in the deployment to try to determine the reason for the failure. *

    *
  • *
*/ private String state; /** *

* An object that describes the configuration for the containers of the deployment. *

*/ private java.util.Map containers; /** *

* An object that describes the endpoint of the deployment. *

*/ private ContainerServiceEndpoint publicEndpoint; /** *

* The timestamp when the deployment was created. *

*/ private java.util.Date createdAt; /** *

* The version number of the deployment. *

* * @param version * The version number of the deployment. */ public void setVersion(Integer version) { this.version = version; } /** *

* The version number of the deployment. *

* * @return The version number of the deployment. */ public Integer getVersion() { return this.version; } /** *

* The version number of the deployment. *

* * @param version * The version number of the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerServiceDeployment withVersion(Integer version) { setVersion(version); return this; } /** *

* The state of the deployment. *

*

* A deployment can be in one of the following states: *

*
    *
  • *

    * Activating - The deployment is being created. *

    *
  • *
  • *

    * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

    *
  • *
  • *

    * Inactive - The deployment was previously successfully created, but it is not currently running on * the container service. *

    *
  • *
  • *

    * Failed - The deployment failed. Use the GetContainerLog action to view the log events * for the containers in the deployment to try to determine the reason for the failure. *

    *
  • *
* * @param state * The state of the deployment.

*

* A deployment can be in one of the following states: *

*
    *
  • *

    * Activating - The deployment is being created. *

    *
  • *
  • *

    * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

    *
  • *
  • *

    * Inactive - The deployment was previously successfully created, but it is not currently * running on the container service. *

    *
  • *
  • *

    * Failed - The deployment failed. Use the GetContainerLog action to view the log * events for the containers in the deployment to try to determine the reason for the failure. *

    *
  • * @see ContainerServiceDeploymentState */ public void setState(String state) { this.state = state; } /** *

    * The state of the deployment. *

    *

    * A deployment can be in one of the following states: *

    *
      *
    • *

      * Activating - The deployment is being created. *

      *
    • *
    • *

      * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

      *
    • *
    • *

      * Inactive - The deployment was previously successfully created, but it is not currently running on * the container service. *

      *
    • *
    • *

      * Failed - The deployment failed. Use the GetContainerLog action to view the log events * for the containers in the deployment to try to determine the reason for the failure. *

      *
    • *
    * * @return The state of the deployment.

    *

    * A deployment can be in one of the following states: *

    *
      *
    • *

      * Activating - The deployment is being created. *

      *
    • *
    • *

      * Active - The deployment was successfully created, and it's currently running on the * container service. The container service can have only one deployment in an active state at a time. *

      *
    • *
    • *

      * Inactive - The deployment was previously successfully created, but it is not currently * running on the container service. *

      *
    • *
    • *

      * Failed - The deployment failed. Use the GetContainerLog action to view the log * events for the containers in the deployment to try to determine the reason for the failure. *

      *
    • * @see ContainerServiceDeploymentState */ public String getState() { return this.state; } /** *

      * The state of the deployment. *

      *

      * A deployment can be in one of the following states: *

      *
        *
      • *

        * Activating - The deployment is being created. *

        *
      • *
      • *

        * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

        *
      • *
      • *

        * Inactive - The deployment was previously successfully created, but it is not currently running on * the container service. *

        *
      • *
      • *

        * Failed - The deployment failed. Use the GetContainerLog action to view the log events * for the containers in the deployment to try to determine the reason for the failure. *

        *
      • *
      * * @param state * The state of the deployment.

      *

      * A deployment can be in one of the following states: *

      *
        *
      • *

        * Activating - The deployment is being created. *

        *
      • *
      • *

        * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

        *
      • *
      • *

        * Inactive - The deployment was previously successfully created, but it is not currently * running on the container service. *

        *
      • *
      • *

        * Failed - The deployment failed. Use the GetContainerLog action to view the log * events for the containers in the deployment to try to determine the reason for the failure. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerServiceDeploymentState */ public ContainerServiceDeployment withState(String state) { setState(state); return this; } /** *

        * The state of the deployment. *

        *

        * A deployment can be in one of the following states: *

        *
          *
        • *

          * Activating - The deployment is being created. *

          *
        • *
        • *

          * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

          *
        • *
        • *

          * Inactive - The deployment was previously successfully created, but it is not currently running on * the container service. *

          *
        • *
        • *

          * Failed - The deployment failed. Use the GetContainerLog action to view the log events * for the containers in the deployment to try to determine the reason for the failure. *

          *
        • *
        * * @param state * The state of the deployment.

        *

        * A deployment can be in one of the following states: *

        *
          *
        • *

          * Activating - The deployment is being created. *

          *
        • *
        • *

          * Active - The deployment was successfully created, and it's currently running on the container * service. The container service can have only one deployment in an active state at a time. *

          *
        • *
        • *

          * Inactive - The deployment was previously successfully created, but it is not currently * running on the container service. *

          *
        • *
        • *

          * Failed - The deployment failed. Use the GetContainerLog action to view the log * events for the containers in the deployment to try to determine the reason for the failure. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see ContainerServiceDeploymentState */ public ContainerServiceDeployment withState(ContainerServiceDeploymentState state) { this.state = state.toString(); return this; } /** *

          * An object that describes the configuration for the containers of the deployment. *

          * * @return An object that describes the configuration for the containers of the deployment. */ public java.util.Map getContainers() { return containers; } /** *

          * An object that describes the configuration for the containers of the deployment. *

          * * @param containers * An object that describes the configuration for the containers of the deployment. */ public void setContainers(java.util.Map containers) { this.containers = containers; } /** *

          * An object that describes the configuration for the containers of the deployment. *

          * * @param containers * An object that describes the configuration for the containers of the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerServiceDeployment withContainers(java.util.Map containers) { setContainers(containers); return this; } /** * Add a single Containers entry * * @see ContainerServiceDeployment#withContainers * @returns a reference to this object so that method calls can be chained together. */ public ContainerServiceDeployment addContainersEntry(String key, Container value) { if (null == this.containers) { this.containers = new java.util.HashMap(); } if (this.containers.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.containers.put(key, value); return this; } /** * Removes all the entries added into Containers. * * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerServiceDeployment clearContainersEntries() { this.containers = null; return this; } /** *

          * An object that describes the endpoint of the deployment. *

          * * @param publicEndpoint * An object that describes the endpoint of the deployment. */ public void setPublicEndpoint(ContainerServiceEndpoint publicEndpoint) { this.publicEndpoint = publicEndpoint; } /** *

          * An object that describes the endpoint of the deployment. *

          * * @return An object that describes the endpoint of the deployment. */ public ContainerServiceEndpoint getPublicEndpoint() { return this.publicEndpoint; } /** *

          * An object that describes the endpoint of the deployment. *

          * * @param publicEndpoint * An object that describes the endpoint of the deployment. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerServiceDeployment withPublicEndpoint(ContainerServiceEndpoint publicEndpoint) { setPublicEndpoint(publicEndpoint); return this; } /** *

          * The timestamp when the deployment was created. *

          * * @param createdAt * The timestamp when the deployment was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

          * The timestamp when the deployment was created. *

          * * @return The timestamp when the deployment was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

          * The timestamp when the deployment was created. *

          * * @param createdAt * The timestamp when the deployment was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerServiceDeployment withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getContainers() != null) sb.append("Containers: ").append(getContainers()).append(","); if (getPublicEndpoint() != null) sb.append("PublicEndpoint: ").append(getPublicEndpoint()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ContainerServiceDeployment == false) return false; ContainerServiceDeployment other = (ContainerServiceDeployment) obj; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getContainers() == null ^ this.getContainers() == null) return false; if (other.getContainers() != null && other.getContainers().equals(this.getContainers()) == false) return false; if (other.getPublicEndpoint() == null ^ this.getPublicEndpoint() == null) return false; if (other.getPublicEndpoint() != null && other.getPublicEndpoint().equals(this.getPublicEndpoint()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getContainers() == null) ? 0 : getContainers().hashCode()); hashCode = prime * hashCode + ((getPublicEndpoint() == null) ? 0 : getPublicEndpoint().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); return hashCode; } @Override public ContainerServiceDeployment clone() { try { return (ContainerServiceDeployment) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lightsail.model.transform.ContainerServiceDeploymentMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy