com.amazonaws.services.rds.model.RecommendedAction Maven / Gradle / Ivy
Show all versions of aws-java-sdk-rds Show documentation
/*
* 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.rds.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* The recommended actions to apply to resolve the issues associated with your DB instances, DB clusters, and DB
* parameter groups.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RecommendedAction implements Serializable, Cloneable {
/**
*
* The unique identifier of the recommended action.
*
*/
private String actionId;
/**
*
* A short description to summarize the action. The description might contain markdown.
*
*/
private String title;
/**
*
* A detailed description of the action. The description might contain markdown.
*
*/
private String description;
/**
*
* An API operation for the action.
*
*/
private String operation;
/**
*
* The parameters for the API operation.
*
*/
private com.amazonaws.internal.SdkInternalList parameters;
/**
*
* The methods to apply the recommended action.
*
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
*
*/
private com.amazonaws.internal.SdkInternalList applyModes;
/**
*
* The status of the action.
*
*
* -
*
* ready
*
*
* -
*
* applied
*
*
* -
*
* scheduled
*
*
* -
*
* resolved
*
*
*
*/
private String status;
/**
*
* The details of the issue.
*
*/
private IssueDetails issueDetails;
/**
*
* The supporting attributes to explain the recommended action.
*
*/
private com.amazonaws.internal.SdkInternalList contextAttributes;
/**
*
* The unique identifier of the recommended action.
*
*
* @param actionId
* The unique identifier of the recommended action.
*/
public void setActionId(String actionId) {
this.actionId = actionId;
}
/**
*
* The unique identifier of the recommended action.
*
*
* @return The unique identifier of the recommended action.
*/
public String getActionId() {
return this.actionId;
}
/**
*
* The unique identifier of the recommended action.
*
*
* @param actionId
* The unique identifier of the recommended action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withActionId(String actionId) {
setActionId(actionId);
return this;
}
/**
*
* A short description to summarize the action. The description might contain markdown.
*
*
* @param title
* A short description to summarize the action. The description might contain markdown.
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
* A short description to summarize the action. The description might contain markdown.
*
*
* @return A short description to summarize the action. The description might contain markdown.
*/
public String getTitle() {
return this.title;
}
/**
*
* A short description to summarize the action. The description might contain markdown.
*
*
* @param title
* A short description to summarize the action. The description might contain markdown.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withTitle(String title) {
setTitle(title);
return this;
}
/**
*
* A detailed description of the action. The description might contain markdown.
*
*
* @param description
* A detailed description of the action. The description might contain markdown.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A detailed description of the action. The description might contain markdown.
*
*
* @return A detailed description of the action. The description might contain markdown.
*/
public String getDescription() {
return this.description;
}
/**
*
* A detailed description of the action. The description might contain markdown.
*
*
* @param description
* A detailed description of the action. The description might contain markdown.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* An API operation for the action.
*
*
* @param operation
* An API operation for the action.
*/
public void setOperation(String operation) {
this.operation = operation;
}
/**
*
* An API operation for the action.
*
*
* @return An API operation for the action.
*/
public String getOperation() {
return this.operation;
}
/**
*
* An API operation for the action.
*
*
* @param operation
* An API operation for the action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withOperation(String operation) {
setOperation(operation);
return this;
}
/**
*
* The parameters for the API operation.
*
*
* @return The parameters for the API operation.
*/
public java.util.List getParameters() {
if (parameters == null) {
parameters = new com.amazonaws.internal.SdkInternalList();
}
return parameters;
}
/**
*
* The parameters for the API operation.
*
*
* @param parameters
* The parameters for the API operation.
*/
public void setParameters(java.util.Collection parameters) {
if (parameters == null) {
this.parameters = null;
return;
}
this.parameters = new com.amazonaws.internal.SdkInternalList(parameters);
}
/**
*
* The parameters for the API operation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setParameters(java.util.Collection)} or {@link #withParameters(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param parameters
* The parameters for the API operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withParameters(RecommendedActionParameter... parameters) {
if (this.parameters == null) {
setParameters(new com.amazonaws.internal.SdkInternalList(parameters.length));
}
for (RecommendedActionParameter ele : parameters) {
this.parameters.add(ele);
}
return this;
}
/**
*
* The parameters for the API operation.
*
*
* @param parameters
* The parameters for the API operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withParameters(java.util.Collection parameters) {
setParameters(parameters);
return this;
}
/**
*
* The methods to apply the recommended action.
*
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
*
*
* @return The methods to apply the recommended action.
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
*/
public java.util.List getApplyModes() {
if (applyModes == null) {
applyModes = new com.amazonaws.internal.SdkInternalList();
}
return applyModes;
}
/**
*
* The methods to apply the recommended action.
*
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
*
*
* @param applyModes
* The methods to apply the recommended action.
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
*/
public void setApplyModes(java.util.Collection applyModes) {
if (applyModes == null) {
this.applyModes = null;
return;
}
this.applyModes = new com.amazonaws.internal.SdkInternalList(applyModes);
}
/**
*
* The methods to apply the recommended action.
*
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setApplyModes(java.util.Collection)} or {@link #withApplyModes(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param applyModes
* The methods to apply the recommended action.
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withApplyModes(String... applyModes) {
if (this.applyModes == null) {
setApplyModes(new com.amazonaws.internal.SdkInternalList(applyModes.length));
}
for (String ele : applyModes) {
this.applyModes.add(ele);
}
return this;
}
/**
*
* The methods to apply the recommended action.
*
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
*
*
* @param applyModes
* The methods to apply the recommended action.
*
* Valid values:
*
*
* -
*
* manual
- The action requires you to resolve the recommendation manually.
*
*
* -
*
* immediately
- The action is applied immediately.
*
*
* -
*
* next-maintainance-window
- The action is applied during the next scheduled maintainance.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withApplyModes(java.util.Collection applyModes) {
setApplyModes(applyModes);
return this;
}
/**
*
* The status of the action.
*
*
* -
*
* ready
*
*
* -
*
* applied
*
*
* -
*
* scheduled
*
*
* -
*
* resolved
*
*
*
*
* @param status
* The status of the action.
*
* -
*
* ready
*
*
* -
*
* applied
*
*
* -
*
* scheduled
*
*
* -
*
* resolved
*
*
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the action.
*
*
* -
*
* ready
*
*
* -
*
* applied
*
*
* -
*
* scheduled
*
*
* -
*
* resolved
*
*
*
*
* @return The status of the action.
*
* -
*
* ready
*
*
* -
*
* applied
*
*
* -
*
* scheduled
*
*
* -
*
* resolved
*
*
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the action.
*
*
* -
*
* ready
*
*
* -
*
* applied
*
*
* -
*
* scheduled
*
*
* -
*
* resolved
*
*
*
*
* @param status
* The status of the action.
*
* -
*
* ready
*
*
* -
*
* applied
*
*
* -
*
* scheduled
*
*
* -
*
* resolved
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The details of the issue.
*
*
* @param issueDetails
* The details of the issue.
*/
public void setIssueDetails(IssueDetails issueDetails) {
this.issueDetails = issueDetails;
}
/**
*
* The details of the issue.
*
*
* @return The details of the issue.
*/
public IssueDetails getIssueDetails() {
return this.issueDetails;
}
/**
*
* The details of the issue.
*
*
* @param issueDetails
* The details of the issue.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withIssueDetails(IssueDetails issueDetails) {
setIssueDetails(issueDetails);
return this;
}
/**
*
* The supporting attributes to explain the recommended action.
*
*
* @return The supporting attributes to explain the recommended action.
*/
public java.util.List getContextAttributes() {
if (contextAttributes == null) {
contextAttributes = new com.amazonaws.internal.SdkInternalList();
}
return contextAttributes;
}
/**
*
* The supporting attributes to explain the recommended action.
*
*
* @param contextAttributes
* The supporting attributes to explain the recommended action.
*/
public void setContextAttributes(java.util.Collection contextAttributes) {
if (contextAttributes == null) {
this.contextAttributes = null;
return;
}
this.contextAttributes = new com.amazonaws.internal.SdkInternalList(contextAttributes);
}
/**
*
* The supporting attributes to explain the recommended action.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setContextAttributes(java.util.Collection)} or {@link #withContextAttributes(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param contextAttributes
* The supporting attributes to explain the recommended action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withContextAttributes(ContextAttribute... contextAttributes) {
if (this.contextAttributes == null) {
setContextAttributes(new com.amazonaws.internal.SdkInternalList(contextAttributes.length));
}
for (ContextAttribute ele : contextAttributes) {
this.contextAttributes.add(ele);
}
return this;
}
/**
*
* The supporting attributes to explain the recommended action.
*
*
* @param contextAttributes
* The supporting attributes to explain the recommended action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RecommendedAction withContextAttributes(java.util.Collection contextAttributes) {
setContextAttributes(contextAttributes);
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 (getActionId() != null)
sb.append("ActionId: ").append(getActionId()).append(",");
if (getTitle() != null)
sb.append("Title: ").append(getTitle()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getOperation() != null)
sb.append("Operation: ").append(getOperation()).append(",");
if (getParameters() != null)
sb.append("Parameters: ").append(getParameters()).append(",");
if (getApplyModes() != null)
sb.append("ApplyModes: ").append(getApplyModes()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getIssueDetails() != null)
sb.append("IssueDetails: ").append(getIssueDetails()).append(",");
if (getContextAttributes() != null)
sb.append("ContextAttributes: ").append(getContextAttributes());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RecommendedAction == false)
return false;
RecommendedAction other = (RecommendedAction) obj;
if (other.getActionId() == null ^ this.getActionId() == null)
return false;
if (other.getActionId() != null && other.getActionId().equals(this.getActionId()) == false)
return false;
if (other.getTitle() == null ^ this.getTitle() == null)
return false;
if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == 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.getOperation() == null ^ this.getOperation() == null)
return false;
if (other.getOperation() != null && other.getOperation().equals(this.getOperation()) == false)
return false;
if (other.getParameters() == null ^ this.getParameters() == null)
return false;
if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == false)
return false;
if (other.getApplyModes() == null ^ this.getApplyModes() == null)
return false;
if (other.getApplyModes() != null && other.getApplyModes().equals(this.getApplyModes()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getIssueDetails() == null ^ this.getIssueDetails() == null)
return false;
if (other.getIssueDetails() != null && other.getIssueDetails().equals(this.getIssueDetails()) == false)
return false;
if (other.getContextAttributes() == null ^ this.getContextAttributes() == null)
return false;
if (other.getContextAttributes() != null && other.getContextAttributes().equals(this.getContextAttributes()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionId() == null) ? 0 : getActionId().hashCode());
hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getOperation() == null) ? 0 : getOperation().hashCode());
hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
hashCode = prime * hashCode + ((getApplyModes() == null) ? 0 : getApplyModes().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getIssueDetails() == null) ? 0 : getIssueDetails().hashCode());
hashCode = prime * hashCode + ((getContextAttributes() == null) ? 0 : getContextAttributes().hashCode());
return hashCode;
}
@Override
public RecommendedAction clone() {
try {
return (RecommendedAction) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}