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

com.amazonaws.services.codegurureviewer.model.RecommendationSummary Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show 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.codegurureviewer.model;

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

/**
 * 

* Information about recommendations. *

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

* Name of the file on which a recommendation is provided. *

*/ private String filePath; /** *

* The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect * the feedback. *

*/ private String recommendationId; /** *

* Start line from where the recommendation is applicable in the source commit or source branch. *

*/ private Integer startLine; /** *

* Last line where the recommendation is applicable in the source commit or source branch. For a single line comment * the start line and end line values are the same. *

*/ private Integer endLine; /** *

* A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start line * and the end line. *

*/ private String description; /** *

* The type of a recommendation. *

*/ private String recommendationCategory; /** *

* Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. * CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis results if code is * detected that violates the rule. *

*/ private RuleMetadata ruleMetadata; /** *

* The severity of the issue in the code that generated this recommendation. *

*/ private String severity; /** *

* Name of the file on which a recommendation is provided. *

* * @param filePath * Name of the file on which a recommendation is provided. */ public void setFilePath(String filePath) { this.filePath = filePath; } /** *

* Name of the file on which a recommendation is provided. *

* * @return Name of the file on which a recommendation is provided. */ public String getFilePath() { return this.filePath; } /** *

* Name of the file on which a recommendation is provided. *

* * @param filePath * Name of the file on which a recommendation is provided. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withFilePath(String filePath) { setFilePath(filePath); return this; } /** *

* The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect * the feedback. *

* * @param recommendationId * The recommendation ID that can be used to track the provided recommendations. Later on it can be used to * collect the feedback. */ public void setRecommendationId(String recommendationId) { this.recommendationId = recommendationId; } /** *

* The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect * the feedback. *

* * @return The recommendation ID that can be used to track the provided recommendations. Later on it can be used to * collect the feedback. */ public String getRecommendationId() { return this.recommendationId; } /** *

* The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect * the feedback. *

* * @param recommendationId * The recommendation ID that can be used to track the provided recommendations. Later on it can be used to * collect the feedback. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withRecommendationId(String recommendationId) { setRecommendationId(recommendationId); return this; } /** *

* Start line from where the recommendation is applicable in the source commit or source branch. *

* * @param startLine * Start line from where the recommendation is applicable in the source commit or source branch. */ public void setStartLine(Integer startLine) { this.startLine = startLine; } /** *

* Start line from where the recommendation is applicable in the source commit or source branch. *

* * @return Start line from where the recommendation is applicable in the source commit or source branch. */ public Integer getStartLine() { return this.startLine; } /** *

* Start line from where the recommendation is applicable in the source commit or source branch. *

* * @param startLine * Start line from where the recommendation is applicable in the source commit or source branch. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withStartLine(Integer startLine) { setStartLine(startLine); return this; } /** *

* Last line where the recommendation is applicable in the source commit or source branch. For a single line comment * the start line and end line values are the same. *

* * @param endLine * Last line where the recommendation is applicable in the source commit or source branch. For a single line * comment the start line and end line values are the same. */ public void setEndLine(Integer endLine) { this.endLine = endLine; } /** *

* Last line where the recommendation is applicable in the source commit or source branch. For a single line comment * the start line and end line values are the same. *

* * @return Last line where the recommendation is applicable in the source commit or source branch. For a single line * comment the start line and end line values are the same. */ public Integer getEndLine() { return this.endLine; } /** *

* Last line where the recommendation is applicable in the source commit or source branch. For a single line comment * the start line and end line values are the same. *

* * @param endLine * Last line where the recommendation is applicable in the source commit or source branch. For a single line * comment the start line and end line values are the same. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withEndLine(Integer endLine) { setEndLine(endLine); return this; } /** *

* A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start line * and the end line. *

* * @param description * A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start * line and the end line. */ public void setDescription(String description) { this.description = description; } /** *

* A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start line * and the end line. *

* * @return A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the * start line and the end line. */ public String getDescription() { return this.description; } /** *

* A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start line * and the end line. *

* * @param description * A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start * line and the end line. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withDescription(String description) { setDescription(description); return this; } /** *

* The type of a recommendation. *

* * @param recommendationCategory * The type of a recommendation. * @see RecommendationCategory */ public void setRecommendationCategory(String recommendationCategory) { this.recommendationCategory = recommendationCategory; } /** *

* The type of a recommendation. *

* * @return The type of a recommendation. * @see RecommendationCategory */ public String getRecommendationCategory() { return this.recommendationCategory; } /** *

* The type of a recommendation. *

* * @param recommendationCategory * The type of a recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationCategory */ public RecommendationSummary withRecommendationCategory(String recommendationCategory) { setRecommendationCategory(recommendationCategory); return this; } /** *

* The type of a recommendation. *

* * @param recommendationCategory * The type of a recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see RecommendationCategory */ public RecommendationSummary withRecommendationCategory(RecommendationCategory recommendationCategory) { this.recommendationCategory = recommendationCategory.toString(); return this; } /** *

* Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. * CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis results if code is * detected that violates the rule. *

* * @param ruleMetadata * Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long * description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis * results if code is detected that violates the rule. */ public void setRuleMetadata(RuleMetadata ruleMetadata) { this.ruleMetadata = ruleMetadata; } /** *

* Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. * CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis results if code is * detected that violates the rule. *

* * @return Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long * description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in * analysis results if code is detected that violates the rule. */ public RuleMetadata getRuleMetadata() { return this.ruleMetadata; } /** *

* Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. * CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis results if code is * detected that violates the rule. *

* * @param ruleMetadata * Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long * description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is included in analysis * results if code is detected that violates the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommendationSummary withRuleMetadata(RuleMetadata ruleMetadata) { setRuleMetadata(ruleMetadata); return this; } /** *

* The severity of the issue in the code that generated this recommendation. *

* * @param severity * The severity of the issue in the code that generated this recommendation. * @see Severity */ public void setSeverity(String severity) { this.severity = severity; } /** *

* The severity of the issue in the code that generated this recommendation. *

* * @return The severity of the issue in the code that generated this recommendation. * @see Severity */ public String getSeverity() { return this.severity; } /** *

* The severity of the issue in the code that generated this recommendation. *

* * @param severity * The severity of the issue in the code that generated this recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see Severity */ public RecommendationSummary withSeverity(String severity) { setSeverity(severity); return this; } /** *

* The severity of the issue in the code that generated this recommendation. *

* * @param severity * The severity of the issue in the code that generated this recommendation. * @return Returns a reference to this object so that method calls can be chained together. * @see Severity */ public RecommendationSummary withSeverity(Severity severity) { this.severity = severity.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 (getFilePath() != null) sb.append("FilePath: ").append(getFilePath()).append(","); if (getRecommendationId() != null) sb.append("RecommendationId: ").append(getRecommendationId()).append(","); if (getStartLine() != null) sb.append("StartLine: ").append(getStartLine()).append(","); if (getEndLine() != null) sb.append("EndLine: ").append(getEndLine()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRecommendationCategory() != null) sb.append("RecommendationCategory: ").append(getRecommendationCategory()).append(","); if (getRuleMetadata() != null) sb.append("RuleMetadata: ").append(getRuleMetadata()).append(","); if (getSeverity() != null) sb.append("Severity: ").append(getSeverity()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecommendationSummary == false) return false; RecommendationSummary other = (RecommendationSummary) obj; if (other.getFilePath() == null ^ this.getFilePath() == null) return false; if (other.getFilePath() != null && other.getFilePath().equals(this.getFilePath()) == 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.getStartLine() == null ^ this.getStartLine() == null) return false; if (other.getStartLine() != null && other.getStartLine().equals(this.getStartLine()) == false) return false; if (other.getEndLine() == null ^ this.getEndLine() == null) return false; if (other.getEndLine() != null && other.getEndLine().equals(this.getEndLine()) == 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.getRecommendationCategory() == null ^ this.getRecommendationCategory() == null) return false; if (other.getRecommendationCategory() != null && other.getRecommendationCategory().equals(this.getRecommendationCategory()) == false) return false; if (other.getRuleMetadata() == null ^ this.getRuleMetadata() == null) return false; if (other.getRuleMetadata() != null && other.getRuleMetadata().equals(this.getRuleMetadata()) == false) return false; if (other.getSeverity() == null ^ this.getSeverity() == null) return false; if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFilePath() == null) ? 0 : getFilePath().hashCode()); hashCode = prime * hashCode + ((getRecommendationId() == null) ? 0 : getRecommendationId().hashCode()); hashCode = prime * hashCode + ((getStartLine() == null) ? 0 : getStartLine().hashCode()); hashCode = prime * hashCode + ((getEndLine() == null) ? 0 : getEndLine().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRecommendationCategory() == null) ? 0 : getRecommendationCategory().hashCode()); hashCode = prime * hashCode + ((getRuleMetadata() == null) ? 0 : getRuleMetadata().hashCode()); hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); return hashCode; } @Override public RecommendationSummary clone() { try { return (RecommendationSummary) 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.codegurureviewer.model.transform.RecommendationSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy