com.amazonaws.services.servermigration.model.GetAppValidationConfigurationResult 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.servermigration.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetAppValidationConfigurationResult extends com.amazonaws.AmazonWebServiceResult implements Serializable,
Cloneable {
/**
*
* The configuration for application validation.
*
*/
private java.util.List appValidationConfigurations;
/**
*
* The configuration for instance validation.
*
*/
private java.util.List serverGroupValidationConfigurations;
/**
*
* The configuration for application validation.
*
*
* @return The configuration for application validation.
*/
public java.util.List getAppValidationConfigurations() {
return appValidationConfigurations;
}
/**
*
* The configuration for application validation.
*
*
* @param appValidationConfigurations
* The configuration for application validation.
*/
public void setAppValidationConfigurations(java.util.Collection appValidationConfigurations) {
if (appValidationConfigurations == null) {
this.appValidationConfigurations = null;
return;
}
this.appValidationConfigurations = new java.util.ArrayList(appValidationConfigurations);
}
/**
*
* The configuration for application validation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAppValidationConfigurations(java.util.Collection)} or
* {@link #withAppValidationConfigurations(java.util.Collection)} if you want to override the existing values.
*
*
* @param appValidationConfigurations
* The configuration for application validation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAppValidationConfigurationResult withAppValidationConfigurations(AppValidationConfiguration... appValidationConfigurations) {
if (this.appValidationConfigurations == null) {
setAppValidationConfigurations(new java.util.ArrayList(appValidationConfigurations.length));
}
for (AppValidationConfiguration ele : appValidationConfigurations) {
this.appValidationConfigurations.add(ele);
}
return this;
}
/**
*
* The configuration for application validation.
*
*
* @param appValidationConfigurations
* The configuration for application validation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAppValidationConfigurationResult withAppValidationConfigurations(java.util.Collection appValidationConfigurations) {
setAppValidationConfigurations(appValidationConfigurations);
return this;
}
/**
*
* The configuration for instance validation.
*
*
* @return The configuration for instance validation.
*/
public java.util.List getServerGroupValidationConfigurations() {
return serverGroupValidationConfigurations;
}
/**
*
* The configuration for instance validation.
*
*
* @param serverGroupValidationConfigurations
* The configuration for instance validation.
*/
public void setServerGroupValidationConfigurations(java.util.Collection serverGroupValidationConfigurations) {
if (serverGroupValidationConfigurations == null) {
this.serverGroupValidationConfigurations = null;
return;
}
this.serverGroupValidationConfigurations = new java.util.ArrayList(serverGroupValidationConfigurations);
}
/**
*
* The configuration for instance validation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setServerGroupValidationConfigurations(java.util.Collection)} or
* {@link #withServerGroupValidationConfigurations(java.util.Collection)} if you want to override the existing
* values.
*
*
* @param serverGroupValidationConfigurations
* The configuration for instance validation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAppValidationConfigurationResult withServerGroupValidationConfigurations(
ServerGroupValidationConfiguration... serverGroupValidationConfigurations) {
if (this.serverGroupValidationConfigurations == null) {
setServerGroupValidationConfigurations(new java.util.ArrayList(serverGroupValidationConfigurations.length));
}
for (ServerGroupValidationConfiguration ele : serverGroupValidationConfigurations) {
this.serverGroupValidationConfigurations.add(ele);
}
return this;
}
/**
*
* The configuration for instance validation.
*
*
* @param serverGroupValidationConfigurations
* The configuration for instance validation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetAppValidationConfigurationResult withServerGroupValidationConfigurations(
java.util.Collection serverGroupValidationConfigurations) {
setServerGroupValidationConfigurations(serverGroupValidationConfigurations);
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 (getAppValidationConfigurations() != null)
sb.append("AppValidationConfigurations: ").append(getAppValidationConfigurations()).append(",");
if (getServerGroupValidationConfigurations() != null)
sb.append("ServerGroupValidationConfigurations: ").append(getServerGroupValidationConfigurations());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetAppValidationConfigurationResult == false)
return false;
GetAppValidationConfigurationResult other = (GetAppValidationConfigurationResult) obj;
if (other.getAppValidationConfigurations() == null ^ this.getAppValidationConfigurations() == null)
return false;
if (other.getAppValidationConfigurations() != null && other.getAppValidationConfigurations().equals(this.getAppValidationConfigurations()) == false)
return false;
if (other.getServerGroupValidationConfigurations() == null ^ this.getServerGroupValidationConfigurations() == null)
return false;
if (other.getServerGroupValidationConfigurations() != null
&& other.getServerGroupValidationConfigurations().equals(this.getServerGroupValidationConfigurations()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAppValidationConfigurations() == null) ? 0 : getAppValidationConfigurations().hashCode());
hashCode = prime * hashCode + ((getServerGroupValidationConfigurations() == null) ? 0 : getServerGroupValidationConfigurations().hashCode());
return hashCode;
}
@Override
public GetAppValidationConfigurationResult clone() {
try {
return (GetAppValidationConfigurationResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}