@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); hashCode = prime * hashCode + ((getItems() == null) ? 0 : getItems().hashCode()); return hashCode; }
/** * Constructs a new BatchPutAttributesRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param domainName * The name of the domain in which the attributes are being stored. * @param items * A list of items on which to perform the operation. */ public BatchPutAttributesRequest(String domainName, java.util.List<ReplaceableItem> items) { setDomainName(domainName); setItems(items); }
/** * A list of items on which to perform the operation. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param items A list of items on which to perform the operation. * * @return A reference to this updated object so that method calls can be chained * together. */ public BatchPutAttributesRequest withItems(ReplaceableItem... items) { if (getItems() == null) setItems(new java.util.ArrayList<ReplaceableItem>(items.length)); for (ReplaceableItem value : items) { getItems().add(value); } return this; }
/** * A list of items on which to perform the operation. * * @param items * A list of items on which to perform the operation. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutAttributesRequest withItems(java.util.Collection<ReplaceableItem> items) { setItems(items); return this; }
/** * The name of the domain in which the attributes are being stored. * * @param domainName * The name of the domain in which the attributes are being stored. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutAttributesRequest withDomainName(String domainName) { setDomainName(domainName); return this; }
private void executeBatch(String domainName, List<ReplaceableItem> insertItems) { if (!insertItems.isEmpty()) { BatchPutAttributesRequest request = new BatchPutAttributesRequest(domainName, insertItems); this.client.batchPutAttributes(request); } }
/** * A list of items on which to perform the operation. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setItems(java.util.Collection)} or {@link #withItems(java.util.Collection)} if you want to override the * existing values. * </p> * * @param items * A list of items on which to perform the operation. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutAttributesRequest withItems(ReplaceableItem... items) { if (this.items == null) { setItems(new com.amazonaws.internal.SdkInternalList<ReplaceableItem>(items.length)); } for (ReplaceableItem ele : items) { this.items.add(ele); } return this; }
/** * The name of the domain in which the attributes are being stored. * * @param domainName * The name of the domain in which the attributes are being stored. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutAttributesRequest withDomainName(String domainName) { setDomainName(domainName); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchPutAttributesRequest == false) return false; BatchPutAttributesRequest other = (BatchPutAttributesRequest) obj; if (other.getDomainName() == null ^ this.getDomainName() == null) return false; if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false) return false; if (other.getItems() == null ^ this.getItems() == null) return false; if (other.getItems() != null && other.getItems().equals(this.getItems()) == false) return false; return true; }
/** * Constructs a new BatchPutAttributesRequest object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param domainName The name of the domain in which the attributes are * being stored. * @param items A list of items on which to perform the operation. */ public BatchPutAttributesRequest(String domainName, java.util.List<ReplaceableItem> items) { setDomainName(domainName); setItems(items); }
/** * A list of items on which to perform the operation. * * @param items * A list of items on which to perform the operation. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutAttributesRequest withItems(java.util.Collection<ReplaceableItem> items) { setItems(items); 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 (getDomainName() != null) sb.append("DomainName: ").append(getDomainName()).append(","); if (getItems() != null) sb.append("Items: ").append(getItems()); sb.append("}"); return sb.toString(); }
/** * Constructs a new BatchPutAttributesRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param domainName * The name of the domain in which the attributes are being stored. * @param items * A list of items on which to perform the operation. */ public BatchPutAttributesRequest(String domainName, java.util.List<ReplaceableItem> items) { setDomainName(domainName); setItems(items); }
/** * A list of items on which to perform the operation. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setItems(java.util.Collection)} or {@link #withItems(java.util.Collection)} if you want to override the * existing values. * </p> * * @param items * A list of items on which to perform the operation. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchPutAttributesRequest withItems(ReplaceableItem... items) { if (this.items == null) { setItems(new com.amazonaws.internal.SdkInternalList<ReplaceableItem>(items.length)); } for (ReplaceableItem ele : items) { this.items.add(ele); } return this; }
request.setHttpMethod(HttpMethodName.POST); if (batchPutAttributesRequest.getDomainName() != null) { request.addParameter("DomainName", StringUtils.fromString(batchPutAttributesRequest.getDomainName())); if (!batchPutAttributesRequest.getItems().isEmpty() || !((com.amazonaws.internal.SdkInternalList<ReplaceableItem>) batchPutAttributesRequest.getItems()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<ReplaceableItem> itemsList = (com.amazonaws.internal.SdkInternalList<ReplaceableItem>) batchPutAttributesRequest .getItems(); int itemsListIndex = 1;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchPutAttributesRequest == false) return false; BatchPutAttributesRequest other = (BatchPutAttributesRequest)obj; if (other.getDomainName() == null ^ this.getDomainName() == null) return false; if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false) return false; if (other.getItems() == null ^ this.getItems() == null) return false; if (other.getItems() != null && other.getItems().equals(this.getItems()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); hashCode = prime * hashCode + ((getItems() == null) ? 0 : getItems().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDomainName() != null) sb.append("DomainName: " + getDomainName() + ","); if (getItems() != null) sb.append("Items: " + getItems() ); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); hashCode = prime * hashCode + ((getItems() == null) ? 0 : getItems().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchPutAttributesRequest == false) return false; BatchPutAttributesRequest other = (BatchPutAttributesRequest) obj; if (other.getDomainName() == null ^ this.getDomainName() == null) return false; if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false) return false; if (other.getItems() == null ^ this.getItems() == null) return false; if (other.getItems() != null && other.getItems().equals(this.getItems()) == false) return false; return true; }