/* * 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.docdb.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Detailed information about an engine version. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DBEngineVersion implements Serializable, Cloneable { /** ** The name of the database engine. *
*/ private String engine; /** ** The version number of the database engine. *
*/ private String engineVersion; /** ** The name of the parameter group family for the database engine. *
*/ private String dBParameterGroupFamily; /** ** The description of the database engine. *
*/ private String dBEngineDescription; /** ** The description of the database engine version. *
*/ private String dBEngineVersionDescription; /** ** A list of engine versions that this database engine version can be upgraded to. *
*/ private java.util.List* The types of logs that the database engine has available for export to Amazon CloudWatch Logs. *
*/ private java.util.List
* A value that indicates whether the engine version supports exporting the log types specified by
* ExportableLogTypes
to CloudWatch Logs.
*
* The name of the database engine. *
* * @param engine * The name of the database engine. */ public void setEngine(String engine) { this.engine = engine; } /** ** The name of the database engine. *
* * @return The name of the database engine. */ public String getEngine() { return this.engine; } /** ** The name of the database engine. *
* * @param engine * The name of the database engine. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withEngine(String engine) { setEngine(engine); return this; } /** ** The version number of the database engine. *
* * @param engineVersion * The version number of the database engine. */ public void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } /** ** The version number of the database engine. *
* * @return The version number of the database engine. */ public String getEngineVersion() { return this.engineVersion; } /** ** The version number of the database engine. *
* * @param engineVersion * The version number of the database engine. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withEngineVersion(String engineVersion) { setEngineVersion(engineVersion); return this; } /** ** The name of the parameter group family for the database engine. *
* * @param dBParameterGroupFamily * The name of the parameter group family for the database engine. */ public void setDBParameterGroupFamily(String dBParameterGroupFamily) { this.dBParameterGroupFamily = dBParameterGroupFamily; } /** ** The name of the parameter group family for the database engine. *
* * @return The name of the parameter group family for the database engine. */ public String getDBParameterGroupFamily() { return this.dBParameterGroupFamily; } /** ** The name of the parameter group family for the database engine. *
* * @param dBParameterGroupFamily * The name of the parameter group family for the database engine. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withDBParameterGroupFamily(String dBParameterGroupFamily) { setDBParameterGroupFamily(dBParameterGroupFamily); return this; } /** ** The description of the database engine. *
* * @param dBEngineDescription * The description of the database engine. */ public void setDBEngineDescription(String dBEngineDescription) { this.dBEngineDescription = dBEngineDescription; } /** ** The description of the database engine. *
* * @return The description of the database engine. */ public String getDBEngineDescription() { return this.dBEngineDescription; } /** ** The description of the database engine. *
* * @param dBEngineDescription * The description of the database engine. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withDBEngineDescription(String dBEngineDescription) { setDBEngineDescription(dBEngineDescription); return this; } /** ** The description of the database engine version. *
* * @param dBEngineVersionDescription * The description of the database engine version. */ public void setDBEngineVersionDescription(String dBEngineVersionDescription) { this.dBEngineVersionDescription = dBEngineVersionDescription; } /** ** The description of the database engine version. *
* * @return The description of the database engine version. */ public String getDBEngineVersionDescription() { return this.dBEngineVersionDescription; } /** ** The description of the database engine version. *
* * @param dBEngineVersionDescription * The description of the database engine version. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withDBEngineVersionDescription(String dBEngineVersionDescription) { setDBEngineVersionDescription(dBEngineVersionDescription); return this; } /** ** A list of engine versions that this database engine version can be upgraded to. *
* * @return A list of engine versions that this database engine version can be upgraded to. */ public java.util.List* A list of engine versions that this database engine version can be upgraded to. *
* * @param validUpgradeTarget * A list of engine versions that this database engine version can be upgraded to. */ public void setValidUpgradeTarget(java.util.Collection* A list of engine versions that this database engine version can be upgraded to. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setValidUpgradeTarget(java.util.Collection)} or {@link #withValidUpgradeTarget(java.util.Collection)} if * you want to override the existing values. *
* * @param validUpgradeTarget * A list of engine versions that this database engine version can be upgraded to. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withValidUpgradeTarget(UpgradeTarget... validUpgradeTarget) { if (this.validUpgradeTarget == null) { setValidUpgradeTarget(new java.util.ArrayList* A list of engine versions that this database engine version can be upgraded to. *
* * @param validUpgradeTarget * A list of engine versions that this database engine version can be upgraded to. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withValidUpgradeTarget(java.util.Collection* The types of logs that the database engine has available for export to Amazon CloudWatch Logs. *
* * @return The types of logs that the database engine has available for export to Amazon CloudWatch Logs. */ public java.util.List* The types of logs that the database engine has available for export to Amazon CloudWatch Logs. *
* * @param exportableLogTypes * The types of logs that the database engine has available for export to Amazon CloudWatch Logs. */ public void setExportableLogTypes(java.util.Collection* The types of logs that the database engine has available for export to Amazon CloudWatch Logs. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setExportableLogTypes(java.util.Collection)} or {@link #withExportableLogTypes(java.util.Collection)} if * you want to override the existing values. *
* * @param exportableLogTypes * The types of logs that the database engine has available for export to Amazon CloudWatch Logs. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withExportableLogTypes(String... exportableLogTypes) { if (this.exportableLogTypes == null) { setExportableLogTypes(new java.util.ArrayList* The types of logs that the database engine has available for export to Amazon CloudWatch Logs. *
* * @param exportableLogTypes * The types of logs that the database engine has available for export to Amazon CloudWatch Logs. * @return Returns a reference to this object so that method calls can be chained together. */ public DBEngineVersion withExportableLogTypes(java.util.Collection
* A value that indicates whether the engine version supports exporting the log types specified by
* ExportableLogTypes
to CloudWatch Logs.
*
ExportableLogTypes
to CloudWatch Logs.
*/
public void setSupportsLogExportsToCloudwatchLogs(Boolean supportsLogExportsToCloudwatchLogs) {
this.supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogs;
}
/**
*
* A value that indicates whether the engine version supports exporting the log types specified by
* ExportableLogTypes
to CloudWatch Logs.
*
ExportableLogTypes
to CloudWatch Logs.
*/
public Boolean getSupportsLogExportsToCloudwatchLogs() {
return this.supportsLogExportsToCloudwatchLogs;
}
/**
*
* A value that indicates whether the engine version supports exporting the log types specified by
* ExportableLogTypes
to CloudWatch Logs.
*
ExportableLogTypes
to CloudWatch Logs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DBEngineVersion withSupportsLogExportsToCloudwatchLogs(Boolean supportsLogExportsToCloudwatchLogs) {
setSupportsLogExportsToCloudwatchLogs(supportsLogExportsToCloudwatchLogs);
return this;
}
/**
*
* A value that indicates whether the engine version supports exporting the log types specified by
* ExportableLogTypes
to CloudWatch Logs.
*
ExportableLogTypes
to CloudWatch Logs.
*/
public Boolean isSupportsLogExportsToCloudwatchLogs() {
return this.supportsLogExportsToCloudwatchLogs;
}
/**
* 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 (getEngine() != null)
sb.append("Engine: ").append(getEngine()).append(",");
if (getEngineVersion() != null)
sb.append("EngineVersion: ").append(getEngineVersion()).append(",");
if (getDBParameterGroupFamily() != null)
sb.append("DBParameterGroupFamily: ").append(getDBParameterGroupFamily()).append(",");
if (getDBEngineDescription() != null)
sb.append("DBEngineDescription: ").append(getDBEngineDescription()).append(",");
if (getDBEngineVersionDescription() != null)
sb.append("DBEngineVersionDescription: ").append(getDBEngineVersionDescription()).append(",");
if (getValidUpgradeTarget() != null)
sb.append("ValidUpgradeTarget: ").append(getValidUpgradeTarget()).append(",");
if (getExportableLogTypes() != null)
sb.append("ExportableLogTypes: ").append(getExportableLogTypes()).append(",");
if (getSupportsLogExportsToCloudwatchLogs() != null)
sb.append("SupportsLogExportsToCloudwatchLogs: ").append(getSupportsLogExportsToCloudwatchLogs());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DBEngineVersion == false)
return false;
DBEngineVersion other = (DBEngineVersion) obj;
if (other.getEngine() == null ^ this.getEngine() == null)
return false;
if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false)
return false;
if (other.getEngineVersion() == null ^ this.getEngineVersion() == null)
return false;
if (other.getEngineVersion() != null && other.getEngineVersion().equals(this.getEngineVersion()) == false)
return false;
if (other.getDBParameterGroupFamily() == null ^ this.getDBParameterGroupFamily() == null)
return false;
if (other.getDBParameterGroupFamily() != null && other.getDBParameterGroupFamily().equals(this.getDBParameterGroupFamily()) == false)
return false;
if (other.getDBEngineDescription() == null ^ this.getDBEngineDescription() == null)
return false;
if (other.getDBEngineDescription() != null && other.getDBEngineDescription().equals(this.getDBEngineDescription()) == false)
return false;
if (other.getDBEngineVersionDescription() == null ^ this.getDBEngineVersionDescription() == null)
return false;
if (other.getDBEngineVersionDescription() != null && other.getDBEngineVersionDescription().equals(this.getDBEngineVersionDescription()) == false)
return false;
if (other.getValidUpgradeTarget() == null ^ this.getValidUpgradeTarget() == null)
return false;
if (other.getValidUpgradeTarget() != null && other.getValidUpgradeTarget().equals(this.getValidUpgradeTarget()) == false)
return false;
if (other.getExportableLogTypes() == null ^ this.getExportableLogTypes() == null)
return false;
if (other.getExportableLogTypes() != null && other.getExportableLogTypes().equals(this.getExportableLogTypes()) == false)
return false;
if (other.getSupportsLogExportsToCloudwatchLogs() == null ^ this.getSupportsLogExportsToCloudwatchLogs() == null)
return false;
if (other.getSupportsLogExportsToCloudwatchLogs() != null
&& other.getSupportsLogExportsToCloudwatchLogs().equals(this.getSupportsLogExportsToCloudwatchLogs()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode());
hashCode = prime * hashCode + ((getEngineVersion() == null) ? 0 : getEngineVersion().hashCode());
hashCode = prime * hashCode + ((getDBParameterGroupFamily() == null) ? 0 : getDBParameterGroupFamily().hashCode());
hashCode = prime * hashCode + ((getDBEngineDescription() == null) ? 0 : getDBEngineDescription().hashCode());
hashCode = prime * hashCode + ((getDBEngineVersionDescription() == null) ? 0 : getDBEngineVersionDescription().hashCode());
hashCode = prime * hashCode + ((getValidUpgradeTarget() == null) ? 0 : getValidUpgradeTarget().hashCode());
hashCode = prime * hashCode + ((getExportableLogTypes() == null) ? 0 : getExportableLogTypes().hashCode());
hashCode = prime * hashCode + ((getSupportsLogExportsToCloudwatchLogs() == null) ? 0 : getSupportsLogExportsToCloudwatchLogs().hashCode());
return hashCode;
}
@Override
public DBEngineVersion clone() {
try {
return (DBEngineVersion) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}