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

com.amazonaws.services.resiliencehub.model.TestRecommendation Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * Copyright 2019-2024 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.resiliencehub.model;

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

/**
 * 

* Defines a test recommendation. *

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

* Name of the Application Component. *

*/ private String appComponentName; /** *

* A list of recommended alarms that are used in the test and must be exported before or with the test. *

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

* Description for the test recommendation. *

*/ private String description; /** *

* Intent of the test recommendation. *

*/ private String intent; /** *

* The test recommendation items. *

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

* Name of the test recommendation. *

*/ private String name; /** *

* Prerequisite of the test recommendation. *

*/ private String prerequisite; /** *

* Identifier for the test recommendation. *

*/ private String recommendationId; /** *

* Status of the recommended test. *

*/ private String recommendationStatus; /** *

* Reference identifier for the test recommendation. *

*/ private String referenceId; /** *

* Level of risk for this test recommendation. *

*/ private String risk; /** *

* Type of test recommendation. *

*/ private String type; /** *

* Name of the Application Component. *

* * @param appComponentName * Name of the Application Component. */ public void setAppComponentName(String appComponentName) { this.appComponentName = appComponentName; } /** *

* Name of the Application Component. *

* * @return Name of the Application Component. */ public String getAppComponentName() { return this.appComponentName; } /** *

* Name of the Application Component. *

* * @param appComponentName * Name of the Application Component. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withAppComponentName(String appComponentName) { setAppComponentName(appComponentName); return this; } /** *

* A list of recommended alarms that are used in the test and must be exported before or with the test. *

* * @return A list of recommended alarms that are used in the test and must be exported before or with the test. */ public java.util.List getDependsOnAlarms() { return dependsOnAlarms; } /** *

* A list of recommended alarms that are used in the test and must be exported before or with the test. *

* * @param dependsOnAlarms * A list of recommended alarms that are used in the test and must be exported before or with the test. */ public void setDependsOnAlarms(java.util.Collection dependsOnAlarms) { if (dependsOnAlarms == null) { this.dependsOnAlarms = null; return; } this.dependsOnAlarms = new java.util.ArrayList(dependsOnAlarms); } /** *

* A list of recommended alarms that are used in the test and must be exported before or with the test. *

*

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

* * @param dependsOnAlarms * A list of recommended alarms that are used in the test and must be exported before or with the test. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withDependsOnAlarms(String... dependsOnAlarms) { if (this.dependsOnAlarms == null) { setDependsOnAlarms(new java.util.ArrayList(dependsOnAlarms.length)); } for (String ele : dependsOnAlarms) { this.dependsOnAlarms.add(ele); } return this; } /** *

* A list of recommended alarms that are used in the test and must be exported before or with the test. *

* * @param dependsOnAlarms * A list of recommended alarms that are used in the test and must be exported before or with the test. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withDependsOnAlarms(java.util.Collection dependsOnAlarms) { setDependsOnAlarms(dependsOnAlarms); return this; } /** *

* Description for the test recommendation. *

* * @param description * Description for the test recommendation. */ public void setDescription(String description) { this.description = description; } /** *

* Description for the test recommendation. *

* * @return Description for the test recommendation. */ public String getDescription() { return this.description; } /** *

* Description for the test recommendation. *

* * @param description * Description for the test recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withDescription(String description) { setDescription(description); return this; } /** *

* Intent of the test recommendation. *

* * @param intent * Intent of the test recommendation. */ public void setIntent(String intent) { this.intent = intent; } /** *

* Intent of the test recommendation. *

* * @return Intent of the test recommendation. */ public String getIntent() { return this.intent; } /** *

* Intent of the test recommendation. *

* * @param intent * Intent of the test recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withIntent(String intent) { setIntent(intent); return this; } /** *

* The test recommendation items. *

* * @return The test recommendation items. */ public java.util.List getItems() { return items; } /** *

* The test recommendation items. *

* * @param items * The test recommendation items. */ public void setItems(java.util.Collection items) { if (items == null) { this.items = null; return; } this.items = new java.util.ArrayList(items); } /** *

* The test recommendation items. *

*

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

* * @param items * The test recommendation items. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withItems(RecommendationItem... items) { if (this.items == null) { setItems(new java.util.ArrayList(items.length)); } for (RecommendationItem ele : items) { this.items.add(ele); } return this; } /** *

* The test recommendation items. *

* * @param items * The test recommendation items. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withItems(java.util.Collection items) { setItems(items); return this; } /** *

* Name of the test recommendation. *

* * @param name * Name of the test recommendation. */ public void setName(String name) { this.name = name; } /** *

* Name of the test recommendation. *

* * @return Name of the test recommendation. */ public String getName() { return this.name; } /** *

* Name of the test recommendation. *

* * @param name * Name of the test recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withName(String name) { setName(name); return this; } /** *

* Prerequisite of the test recommendation. *

* * @param prerequisite * Prerequisite of the test recommendation. */ public void setPrerequisite(String prerequisite) { this.prerequisite = prerequisite; } /** *

* Prerequisite of the test recommendation. *

* * @return Prerequisite of the test recommendation. */ public String getPrerequisite() { return this.prerequisite; } /** *

* Prerequisite of the test recommendation. *

* * @param prerequisite * Prerequisite of the test recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withPrerequisite(String prerequisite) { setPrerequisite(prerequisite); return this; } /** *

* Identifier for the test recommendation. *

* * @param recommendationId * Identifier for the test recommendation. */ public void setRecommendationId(String recommendationId) { this.recommendationId = recommendationId; } /** *

* Identifier for the test recommendation. *

* * @return Identifier for the test recommendation. */ public String getRecommendationId() { return this.recommendationId; } /** *

* Identifier for the test recommendation. *

* * @param recommendationId * Identifier for the test recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withRecommendationId(String recommendationId) { setRecommendationId(recommendationId); return this; } /** *

* Status of the recommended test. *

* * @param recommendationStatus * Status of the recommended test. * @see RecommendationStatus */ public void setRecommendationStatus(String recommendationStatus) { this.recommendationStatus = recommendationStatus; } /** *

* Status of the recommended test. *

* * @return Status of the recommended test. * @see RecommendationStatus */ public String getRecommendationStatus() { return this.recommendationStatus; } /** *

* Status of the recommended test. *

* * @param recommendationStatus * Status of the recommended test. * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationStatus */ public TestRecommendation withRecommendationStatus(String recommendationStatus) { setRecommendationStatus(recommendationStatus); return this; } /** *

* Status of the recommended test. *

* * @param recommendationStatus * Status of the recommended test. * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationStatus */ public TestRecommendation withRecommendationStatus(RecommendationStatus recommendationStatus) { this.recommendationStatus = recommendationStatus.toString(); return this; } /** *

* Reference identifier for the test recommendation. *

* * @param referenceId * Reference identifier for the test recommendation. */ public void setReferenceId(String referenceId) { this.referenceId = referenceId; } /** *

* Reference identifier for the test recommendation. *

* * @return Reference identifier for the test recommendation. */ public String getReferenceId() { return this.referenceId; } /** *

* Reference identifier for the test recommendation. *

* * @param referenceId * Reference identifier for the test recommendation. * @return Returns a reference to this object so that method calls can be chained together. */ public TestRecommendation withReferenceId(String referenceId) { setReferenceId(referenceId); return this; } /** *

* Level of risk for this test recommendation. *

* * @param risk * Level of risk for this test recommendation. * @see TestRisk */ public void setRisk(String risk) { this.risk = risk; } /** *

* Level of risk for this test recommendation. *

* * @return Level of risk for this test recommendation. * @see TestRisk */ public String getRisk() { return this.risk; } /** *

* Level of risk for this test recommendation. *

* * @param risk * Level of risk for this test recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see TestRisk */ public TestRecommendation withRisk(String risk) { setRisk(risk); return this; } /** *

* Level of risk for this test recommendation. *

* * @param risk * Level of risk for this test recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see TestRisk */ public TestRecommendation withRisk(TestRisk risk) { this.risk = risk.toString(); return this; } /** *

* Type of test recommendation. *

* * @param type * Type of test recommendation. * @see TestType */ public void setType(String type) { this.type = type; } /** *

* Type of test recommendation. *

* * @return Type of test recommendation. * @see TestType */ public String getType() { return this.type; } /** *

* Type of test recommendation. *

* * @param type * Type of test recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see TestType */ public TestRecommendation withType(String type) { setType(type); return this; } /** *

* Type of test recommendation. *

* * @param type * Type of test recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see TestType */ public TestRecommendation withType(TestType type) { this.type = type.toString(); 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 (getAppComponentName() != null) sb.append("AppComponentName: ").append(getAppComponentName()).append(","); if (getDependsOnAlarms() != null) sb.append("DependsOnAlarms: ").append(getDependsOnAlarms()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getIntent() != null) sb.append("Intent: ").append(getIntent()).append(","); if (getItems() != null) sb.append("Items: ").append(getItems()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getPrerequisite() != null) sb.append("Prerequisite: ").append(getPrerequisite()).append(","); if (getRecommendationId() != null) sb.append("RecommendationId: ").append(getRecommendationId()).append(","); if (getRecommendationStatus() != null) sb.append("RecommendationStatus: ").append(getRecommendationStatus()).append(","); if (getReferenceId() != null) sb.append("ReferenceId: ").append(getReferenceId()).append(","); if (getRisk() != null) sb.append("Risk: ").append(getRisk()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TestRecommendation == false) return false; TestRecommendation other = (TestRecommendation) obj; if (other.getAppComponentName() == null ^ this.getAppComponentName() == null) return false; if (other.getAppComponentName() != null && other.getAppComponentName().equals(this.getAppComponentName()) == false) return false; if (other.getDependsOnAlarms() == null ^ this.getDependsOnAlarms() == null) return false; if (other.getDependsOnAlarms() != null && other.getDependsOnAlarms().equals(this.getDependsOnAlarms()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getIntent() == null ^ this.getIntent() == null) return false; if (other.getIntent() != null && other.getIntent().equals(this.getIntent()) == false) return false; if (other.getItems() == null ^ this.getItems() == null) return false; if (other.getItems() != null && other.getItems().equals(this.getItems()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getPrerequisite() == null ^ this.getPrerequisite() == null) return false; if (other.getPrerequisite() != null && other.getPrerequisite().equals(this.getPrerequisite()) == false) return false; if (other.getRecommendationId() == null ^ this.getRecommendationId() == null) return false; if (other.getRecommendationId() != null && other.getRecommendationId().equals(this.getRecommendationId()) == false) return false; if (other.getRecommendationStatus() == null ^ this.getRecommendationStatus() == null) return false; if (other.getRecommendationStatus() != null && other.getRecommendationStatus().equals(this.getRecommendationStatus()) == false) return false; if (other.getReferenceId() == null ^ this.getReferenceId() == null) return false; if (other.getReferenceId() != null && other.getReferenceId().equals(this.getReferenceId()) == false) return false; if (other.getRisk() == null ^ this.getRisk() == null) return false; if (other.getRisk() != null && other.getRisk().equals(this.getRisk()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAppComponentName() == null) ? 0 : getAppComponentName().hashCode()); hashCode = prime * hashCode + ((getDependsOnAlarms() == null) ? 0 : getDependsOnAlarms().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getIntent() == null) ? 0 : getIntent().hashCode()); hashCode = prime * hashCode + ((getItems() == null) ? 0 : getItems().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getPrerequisite() == null) ? 0 : getPrerequisite().hashCode()); hashCode = prime * hashCode + ((getRecommendationId() == null) ? 0 : getRecommendationId().hashCode()); hashCode = prime * hashCode + ((getRecommendationStatus() == null) ? 0 : getRecommendationStatus().hashCode()); hashCode = prime * hashCode + ((getReferenceId() == null) ? 0 : getReferenceId().hashCode()); hashCode = prime * hashCode + ((getRisk() == null) ? 0 : getRisk().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public TestRecommendation clone() { try { return (TestRecommendation) 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.resiliencehub.model.transform.TestRecommendationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy