/* * 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.codebuild.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about the results from running a series of test cases during the run of a build project. The test cases * are specified in the buildspec for the build project using one or more paths to the test case files. You can specify * any type of tests you want, such as unit tests, integration tests, and functional tests. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Report implements Serializable, Cloneable, StructuredPojo { /** ** The ARN of the report run. *
*/ private String arn; /** ** The type of the report that was run. *
** A code coverage report. *
** A test report. *
** The name of the report that was run. *
*/ private String name; /** ** The ARN of the report group associated with this report. *
*/ private String reportGroupArn; /** ** The ARN of the build run that generated this report. *
*/ private String executionId; /** ** The status of this report. *
*/ private String status; /** ** The date and time this report run occurred. *
*/ private java.util.Date created; /** ** The date and time a report expires. A report expires 30 days after it is created. An expired report is not * available to view in CodeBuild. *
*/ private java.util.Date expired; /** ** Information about where the raw data used to generate this report was exported. *
*/ private ReportExportConfig exportConfig; /** ** A boolean that specifies if this report run is truncated. The list of test cases is truncated after the maximum * number of test cases is reached. *
*/ private Boolean truncated; /** *
     * A TestReportSummary object that contains information about this test report.
     * 
     * A CodeCoverageReportSummary object that contains a code coverage summary for this report.
     * 
* The ARN of the report run. *
* * @param arn * The ARN of the report run. */ public void setArn(String arn) { this.arn = arn; } /** ** The ARN of the report run. *
* * @return The ARN of the report run. */ public String getArn() { return this.arn; } /** ** The ARN of the report run. *
* * @param arn * The ARN of the report run. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withArn(String arn) { setArn(arn); return this; } /** ** The type of the report that was run. *
** A code coverage report. *
** A test report. *
** A code coverage report. *
** A test report. *
** The type of the report that was run. *
** A code coverage report. *
** A test report. *
** A code coverage report. *
** A test report. *
** The type of the report that was run. *
** A code coverage report. *
** A test report. *
** A code coverage report. *
** A test report. *
** The type of the report that was run. *
** A code coverage report. *
** A test report. *
** A code coverage report. *
** A test report. *
** The name of the report that was run. *
* * @param name * The name of the report that was run. */ public void setName(String name) { this.name = name; } /** ** The name of the report that was run. *
* * @return The name of the report that was run. */ public String getName() { return this.name; } /** ** The name of the report that was run. *
* * @param name * The name of the report that was run. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withName(String name) { setName(name); return this; } /** ** The ARN of the report group associated with this report. *
* * @param reportGroupArn * The ARN of the report group associated with this report. */ public void setReportGroupArn(String reportGroupArn) { this.reportGroupArn = reportGroupArn; } /** ** The ARN of the report group associated with this report. *
* * @return The ARN of the report group associated with this report. */ public String getReportGroupArn() { return this.reportGroupArn; } /** ** The ARN of the report group associated with this report. *
* * @param reportGroupArn * The ARN of the report group associated with this report. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withReportGroupArn(String reportGroupArn) { setReportGroupArn(reportGroupArn); return this; } /** ** The ARN of the build run that generated this report. *
* * @param executionId * The ARN of the build run that generated this report. */ public void setExecutionId(String executionId) { this.executionId = executionId; } /** ** The ARN of the build run that generated this report. *
* * @return The ARN of the build run that generated this report. */ public String getExecutionId() { return this.executionId; } /** ** The ARN of the build run that generated this report. *
* * @param executionId * The ARN of the build run that generated this report. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withExecutionId(String executionId) { setExecutionId(executionId); return this; } /** ** The status of this report. *
* * @param status * The status of this report. * @see ReportStatusType */ public void setStatus(String status) { this.status = status; } /** ** The status of this report. *
* * @return The status of this report. * @see ReportStatusType */ public String getStatus() { return this.status; } /** ** The status of this report. *
* * @param status * The status of this report. * @return Returns a reference to this object so that method calls can be chained together. * @see ReportStatusType */ public Report withStatus(String status) { setStatus(status); return this; } /** ** The status of this report. *
* * @param status * The status of this report. * @return Returns a reference to this object so that method calls can be chained together. * @see ReportStatusType */ public Report withStatus(ReportStatusType status) { this.status = status.toString(); return this; } /** ** The date and time this report run occurred. *
* * @param created * The date and time this report run occurred. */ public void setCreated(java.util.Date created) { this.created = created; } /** ** The date and time this report run occurred. *
* * @return The date and time this report run occurred. */ public java.util.Date getCreated() { return this.created; } /** ** The date and time this report run occurred. *
* * @param created * The date and time this report run occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withCreated(java.util.Date created) { setCreated(created); return this; } /** ** The date and time a report expires. A report expires 30 days after it is created. An expired report is not * available to view in CodeBuild. *
* * @param expired * The date and time a report expires. A report expires 30 days after it is created. An expired report is not * available to view in CodeBuild. */ public void setExpired(java.util.Date expired) { this.expired = expired; } /** ** The date and time a report expires. A report expires 30 days after it is created. An expired report is not * available to view in CodeBuild. *
* * @return The date and time a report expires. A report expires 30 days after it is created. An expired report is * not available to view in CodeBuild. */ public java.util.Date getExpired() { return this.expired; } /** ** The date and time a report expires. A report expires 30 days after it is created. An expired report is not * available to view in CodeBuild. *
* * @param expired * The date and time a report expires. A report expires 30 days after it is created. An expired report is not * available to view in CodeBuild. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withExpired(java.util.Date expired) { setExpired(expired); return this; } /** ** Information about where the raw data used to generate this report was exported. *
* * @param exportConfig * Information about where the raw data used to generate this report was exported. */ public void setExportConfig(ReportExportConfig exportConfig) { this.exportConfig = exportConfig; } /** ** Information about where the raw data used to generate this report was exported. *
* * @return Information about where the raw data used to generate this report was exported. */ public ReportExportConfig getExportConfig() { return this.exportConfig; } /** ** Information about where the raw data used to generate this report was exported. *
* * @param exportConfig * Information about where the raw data used to generate this report was exported. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withExportConfig(ReportExportConfig exportConfig) { setExportConfig(exportConfig); return this; } /** ** A boolean that specifies if this report run is truncated. The list of test cases is truncated after the maximum * number of test cases is reached. *
* * @param truncated * A boolean that specifies if this report run is truncated. The list of test cases is truncated after the * maximum number of test cases is reached. */ public void setTruncated(Boolean truncated) { this.truncated = truncated; } /** ** A boolean that specifies if this report run is truncated. The list of test cases is truncated after the maximum * number of test cases is reached. *
* * @return A boolean that specifies if this report run is truncated. The list of test cases is truncated after the * maximum number of test cases is reached. */ public Boolean getTruncated() { return this.truncated; } /** ** A boolean that specifies if this report run is truncated. The list of test cases is truncated after the maximum * number of test cases is reached. *
* * @param truncated * A boolean that specifies if this report run is truncated. The list of test cases is truncated after the * maximum number of test cases is reached. * @return Returns a reference to this object so that method calls can be chained together. */ public Report withTruncated(Boolean truncated) { setTruncated(truncated); return this; } /** ** A boolean that specifies if this report run is truncated. The list of test cases is truncated after the maximum * number of test cases is reached. *
* * @return A boolean that specifies if this report run is truncated. The list of test cases is truncated after the * maximum number of test cases is reached. */ public Boolean isTruncated() { return this.truncated; } /** *
     * A TestReportSummary object that contains information about this test report.
     * 
TestReportSummary object that contains information about this test report.
     */
    public void setTestSummary(TestReportSummary testSummary) {
        this.testSummary = testSummary;
    }
    /**
     * 
     * A TestReportSummary object that contains information about this test report.
     * 
TestReportSummary object that contains information about this test report.
     */
    public TestReportSummary getTestSummary() {
        return this.testSummary;
    }
    /**
     * 
     * A TestReportSummary object that contains information about this test report.
     * 
TestReportSummary object that contains information about this test report.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public Report withTestSummary(TestReportSummary testSummary) {
        setTestSummary(testSummary);
        return this;
    }
    /**
     * 
     * A CodeCoverageReportSummary object that contains a code coverage summary for this report.
     * 
CodeCoverageReportSummary object that contains a code coverage summary for this report.
     */
    public void setCodeCoverageSummary(CodeCoverageReportSummary codeCoverageSummary) {
        this.codeCoverageSummary = codeCoverageSummary;
    }
    /**
     * 
     * A CodeCoverageReportSummary object that contains a code coverage summary for this report.
     * 
CodeCoverageReportSummary object that contains a code coverage summary for this report.
     */
    public CodeCoverageReportSummary getCodeCoverageSummary() {
        return this.codeCoverageSummary;
    }
    /**
     * 
     * A CodeCoverageReportSummary object that contains a code coverage summary for this report.
     * 
CodeCoverageReportSummary object that contains a code coverage summary for this report.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public Report withCodeCoverageSummary(CodeCoverageReportSummary codeCoverageSummary) {
        setCodeCoverageSummary(codeCoverageSummary);
        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 (getArn() != null)
            sb.append("Arn: ").append(getArn()).append(",");
        if (getType() != null)
            sb.append("Type: ").append(getType()).append(",");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getReportGroupArn() != null)
            sb.append("ReportGroupArn: ").append(getReportGroupArn()).append(",");
        if (getExecutionId() != null)
            sb.append("ExecutionId: ").append(getExecutionId()).append(",");
        if (getStatus() != null)
            sb.append("Status: ").append(getStatus()).append(",");
        if (getCreated() != null)
            sb.append("Created: ").append(getCreated()).append(",");
        if (getExpired() != null)
            sb.append("Expired: ").append(getExpired()).append(",");
        if (getExportConfig() != null)
            sb.append("ExportConfig: ").append(getExportConfig()).append(",");
        if (getTruncated() != null)
            sb.append("Truncated: ").append(getTruncated()).append(",");
        if (getTestSummary() != null)
            sb.append("TestSummary: ").append(getTestSummary()).append(",");
        if (getCodeCoverageSummary() != null)
            sb.append("CodeCoverageSummary: ").append(getCodeCoverageSummary());
        sb.append("}");
        return sb.toString();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof Report == false)
            return false;
        Report other = (Report) obj;
        if (other.getArn() == null ^ this.getArn() == null)
            return false;
        if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
            return false;
        if (other.getType() == null ^ this.getType() == null)
            return false;
        if (other.getType() != null && other.getType().equals(this.getType()) == 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.getReportGroupArn() == null ^ this.getReportGroupArn() == null)
            return false;
        if (other.getReportGroupArn() != null && other.getReportGroupArn().equals(this.getReportGroupArn()) == false)
            return false;
        if (other.getExecutionId() == null ^ this.getExecutionId() == null)
            return false;
        if (other.getExecutionId() != null && other.getExecutionId().equals(this.getExecutionId()) == 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.getCreated() == null ^ this.getCreated() == null)
            return false;
        if (other.getCreated() != null && other.getCreated().equals(this.getCreated()) == false)
            return false;
        if (other.getExpired() == null ^ this.getExpired() == null)
            return false;
        if (other.getExpired() != null && other.getExpired().equals(this.getExpired()) == false)
            return false;
        if (other.getExportConfig() == null ^ this.getExportConfig() == null)
            return false;
        if (other.getExportConfig() != null && other.getExportConfig().equals(this.getExportConfig()) == false)
            return false;
        if (other.getTruncated() == null ^ this.getTruncated() == null)
            return false;
        if (other.getTruncated() != null && other.getTruncated().equals(this.getTruncated()) == false)
            return false;
        if (other.getTestSummary() == null ^ this.getTestSummary() == null)
            return false;
        if (other.getTestSummary() != null && other.getTestSummary().equals(this.getTestSummary()) == false)
            return false;
        if (other.getCodeCoverageSummary() == null ^ this.getCodeCoverageSummary() == null)
            return false;
        if (other.getCodeCoverageSummary() != null && other.getCodeCoverageSummary().equals(this.getCodeCoverageSummary()) == false)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
        hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getReportGroupArn() == null) ? 0 : getReportGroupArn().hashCode());
        hashCode = prime * hashCode + ((getExecutionId() == null) ? 0 : getExecutionId().hashCode());
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
        hashCode = prime * hashCode + ((getCreated() == null) ? 0 : getCreated().hashCode());
        hashCode = prime * hashCode + ((getExpired() == null) ? 0 : getExpired().hashCode());
        hashCode = prime * hashCode + ((getExportConfig() == null) ? 0 : getExportConfig().hashCode());
        hashCode = prime * hashCode + ((getTruncated() == null) ? 0 : getTruncated().hashCode());
        hashCode = prime * hashCode + ((getTestSummary() == null) ? 0 : getTestSummary().hashCode());
        hashCode = prime * hashCode + ((getCodeCoverageSummary() == null) ? 0 : getCodeCoverageSummary().hashCode());
        return hashCode;
    }
    @Override
    public Report clone() {
        try {
            return (Report) 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.codebuild.model.transform.ReportMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}