/* * 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.apigateway.model; import java.io.Serializable; import javax.annotation.Generated; /** *

* The identifier of an ApiKey used in a UsagePlan. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ImportApiKeysResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* A list of all the ApiKey identifiers. *

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

* A list of warning messages. *

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

* A list of all the ApiKey identifiers. *

* * @return A list of all the ApiKey identifiers. */ public java.util.List getIds() { return ids; } /** *

* A list of all the ApiKey identifiers. *

* * @param ids * A list of all the ApiKey identifiers. */ public void setIds(java.util.Collection ids) { if (ids == null) { this.ids = null; return; } this.ids = new java.util.ArrayList(ids); } /** *

* A list of all the ApiKey identifiers. *

*

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

* * @param ids * A list of all the ApiKey identifiers. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportApiKeysResult withIds(String... ids) { if (this.ids == null) { setIds(new java.util.ArrayList(ids.length)); } for (String ele : ids) { this.ids.add(ele); } return this; } /** *

* A list of all the ApiKey identifiers. *

* * @param ids * A list of all the ApiKey identifiers. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportApiKeysResult withIds(java.util.Collection ids) { setIds(ids); return this; } /** *

* A list of warning messages. *

* * @return A list of warning messages. */ public java.util.List getWarnings() { return warnings; } /** *

* A list of warning messages. *

* * @param warnings * A list of warning messages. */ public void setWarnings(java.util.Collection warnings) { if (warnings == null) { this.warnings = null; return; } this.warnings = new java.util.ArrayList(warnings); } /** *

* A list of warning messages. *

*

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

* * @param warnings * A list of warning messages. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportApiKeysResult withWarnings(String... warnings) { if (this.warnings == null) { setWarnings(new java.util.ArrayList(warnings.length)); } for (String ele : warnings) { this.warnings.add(ele); } return this; } /** *

* A list of warning messages. *

* * @param warnings * A list of warning messages. * @return Returns a reference to this object so that method calls can be chained together. */ public ImportApiKeysResult withWarnings(java.util.Collection warnings) { setWarnings(warnings); 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 (getIds() != null) sb.append("Ids: ").append(getIds()).append(","); if (getWarnings() != null) sb.append("Warnings: ").append(getWarnings()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ImportApiKeysResult == false) return false; ImportApiKeysResult other = (ImportApiKeysResult) obj; if (other.getIds() == null ^ this.getIds() == null) return false; if (other.getIds() != null && other.getIds().equals(this.getIds()) == false) return false; if (other.getWarnings() == null ^ this.getWarnings() == null) return false; if (other.getWarnings() != null && other.getWarnings().equals(this.getWarnings()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIds() == null) ? 0 : getIds().hashCode()); hashCode = prime * hashCode + ((getWarnings() == null) ? 0 : getWarnings().hashCode()); return hashCode; } @Override public ImportApiKeysResult clone() { try { return (ImportApiKeysResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }