/* * 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; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class BatchGetBuildBatchesResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* An array of BuildBatch objects that represent the retrieved batch builds. *

*/ private java.util.List buildBatches; /** *

* An array that contains the identifiers of any batch builds that are not found. *

*/ private java.util.List buildBatchesNotFound; /** *

* An array of BuildBatch objects that represent the retrieved batch builds. *

* * @return An array of BuildBatch objects that represent the retrieved batch builds. */ public java.util.List getBuildBatches() { return buildBatches; } /** *

* An array of BuildBatch objects that represent the retrieved batch builds. *

* * @param buildBatches * An array of BuildBatch objects that represent the retrieved batch builds. */ public void setBuildBatches(java.util.Collection buildBatches) { if (buildBatches == null) { this.buildBatches = null; return; } this.buildBatches = new java.util.ArrayList(buildBatches); } /** *

* An array of BuildBatch objects that represent the retrieved batch builds. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBuildBatches(java.util.Collection)} or {@link #withBuildBatches(java.util.Collection)} if you want to * override the existing values. *

* * @param buildBatches * An array of BuildBatch objects that represent the retrieved batch builds. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetBuildBatchesResult withBuildBatches(BuildBatch... buildBatches) { if (this.buildBatches == null) { setBuildBatches(new java.util.ArrayList(buildBatches.length)); } for (BuildBatch ele : buildBatches) { this.buildBatches.add(ele); } return this; } /** *

* An array of BuildBatch objects that represent the retrieved batch builds. *

* * @param buildBatches * An array of BuildBatch objects that represent the retrieved batch builds. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetBuildBatchesResult withBuildBatches(java.util.Collection buildBatches) { setBuildBatches(buildBatches); return this; } /** *

* An array that contains the identifiers of any batch builds that are not found. *

* * @return An array that contains the identifiers of any batch builds that are not found. */ public java.util.List getBuildBatchesNotFound() { return buildBatchesNotFound; } /** *

* An array that contains the identifiers of any batch builds that are not found. *

* * @param buildBatchesNotFound * An array that contains the identifiers of any batch builds that are not found. */ public void setBuildBatchesNotFound(java.util.Collection buildBatchesNotFound) { if (buildBatchesNotFound == null) { this.buildBatchesNotFound = null; return; } this.buildBatchesNotFound = new java.util.ArrayList(buildBatchesNotFound); } /** *

* An array that contains the identifiers of any batch builds that are not found. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBuildBatchesNotFound(java.util.Collection)} or {@link #withBuildBatchesNotFound(java.util.Collection)} * if you want to override the existing values. *

* * @param buildBatchesNotFound * An array that contains the identifiers of any batch builds that are not found. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetBuildBatchesResult withBuildBatchesNotFound(String... buildBatchesNotFound) { if (this.buildBatchesNotFound == null) { setBuildBatchesNotFound(new java.util.ArrayList(buildBatchesNotFound.length)); } for (String ele : buildBatchesNotFound) { this.buildBatchesNotFound.add(ele); } return this; } /** *

* An array that contains the identifiers of any batch builds that are not found. *

* * @param buildBatchesNotFound * An array that contains the identifiers of any batch builds that are not found. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchGetBuildBatchesResult withBuildBatchesNotFound(java.util.Collection buildBatchesNotFound) { setBuildBatchesNotFound(buildBatchesNotFound); 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 (getBuildBatches() != null) sb.append("BuildBatches: ").append(getBuildBatches()).append(","); if (getBuildBatchesNotFound() != null) sb.append("BuildBatchesNotFound: ").append(getBuildBatchesNotFound()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchGetBuildBatchesResult == false) return false; BatchGetBuildBatchesResult other = (BatchGetBuildBatchesResult) obj; if (other.getBuildBatches() == null ^ this.getBuildBatches() == null) return false; if (other.getBuildBatches() != null && other.getBuildBatches().equals(this.getBuildBatches()) == false) return false; if (other.getBuildBatchesNotFound() == null ^ this.getBuildBatchesNotFound() == null) return false; if (other.getBuildBatchesNotFound() != null && other.getBuildBatchesNotFound().equals(this.getBuildBatchesNotFound()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBuildBatches() == null) ? 0 : getBuildBatches().hashCode()); hashCode = prime * hashCode + ((getBuildBatchesNotFound() == null) ? 0 : getBuildBatchesNotFound().hashCode()); return hashCode; } @Override public BatchGetBuildBatchesResult clone() { try { return (BatchGetBuildBatchesResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }