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

com.amazonaws.services.securityhub.model.AwsEcsClusterDetails Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.securityhub.model;

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

/**
 * 

* Provides details about an Amazon ECS cluster. *

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

* The Amazon Resource Name (ARN) that identifies the cluster. *

*/ private String clusterArn; /** *

* The number of services that are running on the cluster in an ACTIVE state. You can view these * services with the Amazon ECS ListServices * API operation. *

*/ private Integer activeServicesCount; /** *

* The short name of one or more capacity providers to associate with the cluster. *

*/ private java.util.List capacityProviders; /** *

* The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch Container * Insights for the cluster. *

*/ private java.util.List clusterSettings; /** *

* The run command configuration for the cluster. *

*/ private AwsEcsClusterConfigurationDetails configuration; /** *

* The default capacity provider strategy for the cluster. The default capacity provider strategy is used when * services or tasks are run without a specified launch type or capacity provider strategy. *

*/ private java.util.List defaultCapacityProviderStrategy; /** *

* A name that you use to identify your cluster. *

*/ private String clusterName; /** *

* The number of container instances registered into the cluster. This includes container instances in both * ACTIVE and DRAINING status. *

*/ private Integer registeredContainerInstancesCount; /** *

* The number of tasks in the cluster that are in the RUNNING state. *

*/ private Integer runningTasksCount; /** *

* The status of the cluster. *

*/ private String status; /** *

* The Amazon Resource Name (ARN) that identifies the cluster. *

* * @param clusterArn * The Amazon Resource Name (ARN) that identifies the cluster. */ public void setClusterArn(String clusterArn) { this.clusterArn = clusterArn; } /** *

* The Amazon Resource Name (ARN) that identifies the cluster. *

* * @return The Amazon Resource Name (ARN) that identifies the cluster. */ public String getClusterArn() { return this.clusterArn; } /** *

* The Amazon Resource Name (ARN) that identifies the cluster. *

* * @param clusterArn * The Amazon Resource Name (ARN) that identifies the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withClusterArn(String clusterArn) { setClusterArn(clusterArn); return this; } /** *

* The number of services that are running on the cluster in an ACTIVE state. You can view these * services with the Amazon ECS ListServices * API operation. *

* * @param activeServicesCount * The number of services that are running on the cluster in an ACTIVE state. You can view these * services with the Amazon ECS * ListServices API operation. */ public void setActiveServicesCount(Integer activeServicesCount) { this.activeServicesCount = activeServicesCount; } /** *

* The number of services that are running on the cluster in an ACTIVE state. You can view these * services with the Amazon ECS ListServices * API operation. *

* * @return The number of services that are running on the cluster in an ACTIVE state. You can view * these services with the Amazon ECS * ListServices API operation. */ public Integer getActiveServicesCount() { return this.activeServicesCount; } /** *

* The number of services that are running on the cluster in an ACTIVE state. You can view these * services with the Amazon ECS ListServices * API operation. *

* * @param activeServicesCount * The number of services that are running on the cluster in an ACTIVE state. You can view these * services with the Amazon ECS * ListServices API operation. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withActiveServicesCount(Integer activeServicesCount) { setActiveServicesCount(activeServicesCount); return this; } /** *

* The short name of one or more capacity providers to associate with the cluster. *

* * @return The short name of one or more capacity providers to associate with the cluster. */ public java.util.List getCapacityProviders() { return capacityProviders; } /** *

* The short name of one or more capacity providers to associate with the cluster. *

* * @param capacityProviders * The short name of one or more capacity providers to associate with the cluster. */ public void setCapacityProviders(java.util.Collection capacityProviders) { if (capacityProviders == null) { this.capacityProviders = null; return; } this.capacityProviders = new java.util.ArrayList(capacityProviders); } /** *

* The short name of one or more capacity providers to associate with the cluster. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setCapacityProviders(java.util.Collection)} or {@link #withCapacityProviders(java.util.Collection)} if * you want to override the existing values. *

* * @param capacityProviders * The short name of one or more capacity providers to associate with the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withCapacityProviders(String... capacityProviders) { if (this.capacityProviders == null) { setCapacityProviders(new java.util.ArrayList(capacityProviders.length)); } for (String ele : capacityProviders) { this.capacityProviders.add(ele); } return this; } /** *

* The short name of one or more capacity providers to associate with the cluster. *

* * @param capacityProviders * The short name of one or more capacity providers to associate with the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withCapacityProviders(java.util.Collection capacityProviders) { setCapacityProviders(capacityProviders); return this; } /** *

* The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch Container * Insights for the cluster. *

* * @return The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch * Container Insights for the cluster. */ public java.util.List getClusterSettings() { return clusterSettings; } /** *

* The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch Container * Insights for the cluster. *

* * @param clusterSettings * The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch * Container Insights for the cluster. */ public void setClusterSettings(java.util.Collection clusterSettings) { if (clusterSettings == null) { this.clusterSettings = null; return; } this.clusterSettings = new java.util.ArrayList(clusterSettings); } /** *

* The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch Container * Insights for the cluster. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setClusterSettings(java.util.Collection)} or {@link #withClusterSettings(java.util.Collection)} if you * want to override the existing values. *

* * @param clusterSettings * The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch * Container Insights for the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withClusterSettings(AwsEcsClusterClusterSettingsDetails... clusterSettings) { if (this.clusterSettings == null) { setClusterSettings(new java.util.ArrayList(clusterSettings.length)); } for (AwsEcsClusterClusterSettingsDetails ele : clusterSettings) { this.clusterSettings.add(ele); } return this; } /** *

* The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch Container * Insights for the cluster. *

* * @param clusterSettings * The setting to use to create the cluster. Specifically used to configure whether to enable CloudWatch * Container Insights for the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withClusterSettings(java.util.Collection clusterSettings) { setClusterSettings(clusterSettings); return this; } /** *

* The run command configuration for the cluster. *

* * @param configuration * The run command configuration for the cluster. */ public void setConfiguration(AwsEcsClusterConfigurationDetails configuration) { this.configuration = configuration; } /** *

* The run command configuration for the cluster. *

* * @return The run command configuration for the cluster. */ public AwsEcsClusterConfigurationDetails getConfiguration() { return this.configuration; } /** *

* The run command configuration for the cluster. *

* * @param configuration * The run command configuration for the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withConfiguration(AwsEcsClusterConfigurationDetails configuration) { setConfiguration(configuration); return this; } /** *

* The default capacity provider strategy for the cluster. The default capacity provider strategy is used when * services or tasks are run without a specified launch type or capacity provider strategy. *

* * @return The default capacity provider strategy for the cluster. The default capacity provider strategy is used * when services or tasks are run without a specified launch type or capacity provider strategy. */ public java.util.List getDefaultCapacityProviderStrategy() { return defaultCapacityProviderStrategy; } /** *

* The default capacity provider strategy for the cluster. The default capacity provider strategy is used when * services or tasks are run without a specified launch type or capacity provider strategy. *

* * @param defaultCapacityProviderStrategy * The default capacity provider strategy for the cluster. The default capacity provider strategy is used * when services or tasks are run without a specified launch type or capacity provider strategy. */ public void setDefaultCapacityProviderStrategy(java.util.Collection defaultCapacityProviderStrategy) { if (defaultCapacityProviderStrategy == null) { this.defaultCapacityProviderStrategy = null; return; } this.defaultCapacityProviderStrategy = new java.util.ArrayList(defaultCapacityProviderStrategy); } /** *

* The default capacity provider strategy for the cluster. The default capacity provider strategy is used when * services or tasks are run without a specified launch type or capacity provider strategy. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDefaultCapacityProviderStrategy(java.util.Collection)} or * {@link #withDefaultCapacityProviderStrategy(java.util.Collection)} if you want to override the existing values. *

* * @param defaultCapacityProviderStrategy * The default capacity provider strategy for the cluster. The default capacity provider strategy is used * when services or tasks are run without a specified launch type or capacity provider strategy. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withDefaultCapacityProviderStrategy(AwsEcsClusterDefaultCapacityProviderStrategyDetails... defaultCapacityProviderStrategy) { if (this.defaultCapacityProviderStrategy == null) { setDefaultCapacityProviderStrategy(new java.util.ArrayList( defaultCapacityProviderStrategy.length)); } for (AwsEcsClusterDefaultCapacityProviderStrategyDetails ele : defaultCapacityProviderStrategy) { this.defaultCapacityProviderStrategy.add(ele); } return this; } /** *

* The default capacity provider strategy for the cluster. The default capacity provider strategy is used when * services or tasks are run without a specified launch type or capacity provider strategy. *

* * @param defaultCapacityProviderStrategy * The default capacity provider strategy for the cluster. The default capacity provider strategy is used * when services or tasks are run without a specified launch type or capacity provider strategy. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withDefaultCapacityProviderStrategy( java.util.Collection defaultCapacityProviderStrategy) { setDefaultCapacityProviderStrategy(defaultCapacityProviderStrategy); return this; } /** *

* A name that you use to identify your cluster. *

* * @param clusterName * A name that you use to identify your cluster. */ public void setClusterName(String clusterName) { this.clusterName = clusterName; } /** *

* A name that you use to identify your cluster. *

* * @return A name that you use to identify your cluster. */ public String getClusterName() { return this.clusterName; } /** *

* A name that you use to identify your cluster. *

* * @param clusterName * A name that you use to identify your cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withClusterName(String clusterName) { setClusterName(clusterName); return this; } /** *

* The number of container instances registered into the cluster. This includes container instances in both * ACTIVE and DRAINING status. *

* * @param registeredContainerInstancesCount * The number of container instances registered into the cluster. This includes container instances in both * ACTIVE and DRAINING status. */ public void setRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount) { this.registeredContainerInstancesCount = registeredContainerInstancesCount; } /** *

* The number of container instances registered into the cluster. This includes container instances in both * ACTIVE and DRAINING status. *

* * @return The number of container instances registered into the cluster. This includes container instances in both * ACTIVE and DRAINING status. */ public Integer getRegisteredContainerInstancesCount() { return this.registeredContainerInstancesCount; } /** *

* The number of container instances registered into the cluster. This includes container instances in both * ACTIVE and DRAINING status. *

* * @param registeredContainerInstancesCount * The number of container instances registered into the cluster. This includes container instances in both * ACTIVE and DRAINING status. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withRegisteredContainerInstancesCount(Integer registeredContainerInstancesCount) { setRegisteredContainerInstancesCount(registeredContainerInstancesCount); return this; } /** *

* The number of tasks in the cluster that are in the RUNNING state. *

* * @param runningTasksCount * The number of tasks in the cluster that are in the RUNNING state. */ public void setRunningTasksCount(Integer runningTasksCount) { this.runningTasksCount = runningTasksCount; } /** *

* The number of tasks in the cluster that are in the RUNNING state. *

* * @return The number of tasks in the cluster that are in the RUNNING state. */ public Integer getRunningTasksCount() { return this.runningTasksCount; } /** *

* The number of tasks in the cluster that are in the RUNNING state. *

* * @param runningTasksCount * The number of tasks in the cluster that are in the RUNNING state. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withRunningTasksCount(Integer runningTasksCount) { setRunningTasksCount(runningTasksCount); return this; } /** *

* The status of the cluster. *

* * @param status * The status of the cluster. */ public void setStatus(String status) { this.status = status; } /** *

* The status of the cluster. *

* * @return The status of the cluster. */ public String getStatus() { return this.status; } /** *

* The status of the cluster. *

* * @param status * The status of the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsClusterDetails withStatus(String status) { setStatus(status); 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 (getClusterArn() != null) sb.append("ClusterArn: ").append(getClusterArn()).append(","); if (getActiveServicesCount() != null) sb.append("ActiveServicesCount: ").append(getActiveServicesCount()).append(","); if (getCapacityProviders() != null) sb.append("CapacityProviders: ").append(getCapacityProviders()).append(","); if (getClusterSettings() != null) sb.append("ClusterSettings: ").append(getClusterSettings()).append(","); if (getConfiguration() != null) sb.append("Configuration: ").append(getConfiguration()).append(","); if (getDefaultCapacityProviderStrategy() != null) sb.append("DefaultCapacityProviderStrategy: ").append(getDefaultCapacityProviderStrategy()).append(","); if (getClusterName() != null) sb.append("ClusterName: ").append(getClusterName()).append(","); if (getRegisteredContainerInstancesCount() != null) sb.append("RegisteredContainerInstancesCount: ").append(getRegisteredContainerInstancesCount()).append(","); if (getRunningTasksCount() != null) sb.append("RunningTasksCount: ").append(getRunningTasksCount()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsEcsClusterDetails == false) return false; AwsEcsClusterDetails other = (AwsEcsClusterDetails) obj; if (other.getClusterArn() == null ^ this.getClusterArn() == null) return false; if (other.getClusterArn() != null && other.getClusterArn().equals(this.getClusterArn()) == false) return false; if (other.getActiveServicesCount() == null ^ this.getActiveServicesCount() == null) return false; if (other.getActiveServicesCount() != null && other.getActiveServicesCount().equals(this.getActiveServicesCount()) == false) return false; if (other.getCapacityProviders() == null ^ this.getCapacityProviders() == null) return false; if (other.getCapacityProviders() != null && other.getCapacityProviders().equals(this.getCapacityProviders()) == false) return false; if (other.getClusterSettings() == null ^ this.getClusterSettings() == null) return false; if (other.getClusterSettings() != null && other.getClusterSettings().equals(this.getClusterSettings()) == false) return false; if (other.getConfiguration() == null ^ this.getConfiguration() == null) return false; if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false) return false; if (other.getDefaultCapacityProviderStrategy() == null ^ this.getDefaultCapacityProviderStrategy() == null) return false; if (other.getDefaultCapacityProviderStrategy() != null && other.getDefaultCapacityProviderStrategy().equals(this.getDefaultCapacityProviderStrategy()) == false) return false; if (other.getClusterName() == null ^ this.getClusterName() == null) return false; if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false) return false; if (other.getRegisteredContainerInstancesCount() == null ^ this.getRegisteredContainerInstancesCount() == null) return false; if (other.getRegisteredContainerInstancesCount() != null && other.getRegisteredContainerInstancesCount().equals(this.getRegisteredContainerInstancesCount()) == false) return false; if (other.getRunningTasksCount() == null ^ this.getRunningTasksCount() == null) return false; if (other.getRunningTasksCount() != null && other.getRunningTasksCount().equals(this.getRunningTasksCount()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterArn() == null) ? 0 : getClusterArn().hashCode()); hashCode = prime * hashCode + ((getActiveServicesCount() == null) ? 0 : getActiveServicesCount().hashCode()); hashCode = prime * hashCode + ((getCapacityProviders() == null) ? 0 : getCapacityProviders().hashCode()); hashCode = prime * hashCode + ((getClusterSettings() == null) ? 0 : getClusterSettings().hashCode()); hashCode = prime * hashCode + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); hashCode = prime * hashCode + ((getDefaultCapacityProviderStrategy() == null) ? 0 : getDefaultCapacityProviderStrategy().hashCode()); hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode()); hashCode = prime * hashCode + ((getRegisteredContainerInstancesCount() == null) ? 0 : getRegisteredContainerInstancesCount().hashCode()); hashCode = prime * hashCode + ((getRunningTasksCount() == null) ? 0 : getRunningTasksCount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; } @Override public AwsEcsClusterDetails clone() { try { return (AwsEcsClusterDetails) 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.securityhub.model.transform.AwsEcsClusterDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy