com.amazonaws.services.codebuild.model.BatchGetReportsResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codebuild 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.codebuild.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class BatchGetReportsResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The array of Report
objects returned by BatchGetReports
.
*
*/
private java.util.List reports;
/**
*
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a Report
.
*
*/
private java.util.List reportsNotFound;
/**
*
* The array of Report
objects returned by BatchGetReports
.
*
*
* @return The array of Report
objects returned by BatchGetReports
.
*/
public java.util.List getReports() {
return reports;
}
/**
*
* The array of Report
objects returned by BatchGetReports
.
*
*
* @param reports
* The array of Report
objects returned by BatchGetReports
.
*/
public void setReports(java.util.Collection reports) {
if (reports == null) {
this.reports = null;
return;
}
this.reports = new java.util.ArrayList(reports);
}
/**
*
* The array of Report
objects returned by BatchGetReports
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setReports(java.util.Collection)} or {@link #withReports(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param reports
* The array of Report
objects returned by BatchGetReports
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetReportsResult withReports(Report... reports) {
if (this.reports == null) {
setReports(new java.util.ArrayList(reports.length));
}
for (Report ele : reports) {
this.reports.add(ele);
}
return this;
}
/**
*
* The array of Report
objects returned by BatchGetReports
.
*
*
* @param reports
* The array of Report
objects returned by BatchGetReports
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetReportsResult withReports(java.util.Collection reports) {
setReports(reports);
return this;
}
/**
*
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a Report
.
*
*
* @return An array of ARNs passed to BatchGetReportGroups
that are not associated with a
* Report
.
*/
public java.util.List getReportsNotFound() {
return reportsNotFound;
}
/**
*
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a Report
.
*
*
* @param reportsNotFound
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a
* Report
.
*/
public void setReportsNotFound(java.util.Collection reportsNotFound) {
if (reportsNotFound == null) {
this.reportsNotFound = null;
return;
}
this.reportsNotFound = new java.util.ArrayList(reportsNotFound);
}
/**
*
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a Report
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setReportsNotFound(java.util.Collection)} or {@link #withReportsNotFound(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param reportsNotFound
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a
* Report
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetReportsResult withReportsNotFound(String... reportsNotFound) {
if (this.reportsNotFound == null) {
setReportsNotFound(new java.util.ArrayList(reportsNotFound.length));
}
for (String ele : reportsNotFound) {
this.reportsNotFound.add(ele);
}
return this;
}
/**
*
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a Report
.
*
*
* @param reportsNotFound
* An array of ARNs passed to BatchGetReportGroups
that are not associated with a
* Report
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetReportsResult withReportsNotFound(java.util.Collection reportsNotFound) {
setReportsNotFound(reportsNotFound);
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 (getReports() != null)
sb.append("Reports: ").append(getReports()).append(",");
if (getReportsNotFound() != null)
sb.append("ReportsNotFound: ").append(getReportsNotFound());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BatchGetReportsResult == false)
return false;
BatchGetReportsResult other = (BatchGetReportsResult) obj;
if (other.getReports() == null ^ this.getReports() == null)
return false;
if (other.getReports() != null && other.getReports().equals(this.getReports()) == false)
return false;
if (other.getReportsNotFound() == null ^ this.getReportsNotFound() == null)
return false;
if (other.getReportsNotFound() != null && other.getReportsNotFound().equals(this.getReportsNotFound()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getReports() == null) ? 0 : getReports().hashCode());
hashCode = prime * hashCode + ((getReportsNotFound() == null) ? 0 : getReportsNotFound().hashCode());
return hashCode;
}
@Override
public BatchGetReportsResult clone() {
try {
return (BatchGetReportsResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}