@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); hashCode = prime * hashCode + ((getReservedNodes() == null) ? 0 : getReservedNodes().hashCode()); return hashCode; }
/** * <p> * A value that indicates the starting point for the next set of response records in a subsequent request. If a * value is returned in a response, you can retrieve the next set of records by providing this returned marker value * in the <code>Marker</code> parameter and retrying the command. If the <code>Marker</code> field is empty, all * response records have been retrieved for the request. * </p> * * @param marker * A value that indicates the starting point for the next set of response records in a subsequent request. If * a value is returned in a response, you can retrieve the next set of records by providing this returned * marker value in the <code>Marker</code> parameter and retrying the command. If the <code>Marker</code> * field is empty, all response records have been retrieved for the request. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeReservedNodesResult withMarker(String marker) { setMarker(marker); return this; }
/** * <p> * The list of <code>ReservedNode</code> objects. * </p> * * @param reservedNodes * The list of <code>ReservedNode</code> objects. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeReservedNodesResult withReservedNodes(java.util.Collection<ReservedNode> reservedNodes) { setReservedNodes(reservedNodes); return this; }
public DescribeReservedNodesResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeReservedNodesResult describeReservedNodesResult = new DescribeReservedNodesResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeReservedNodesResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeReservedNodesResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ReservedNodes", targetDepth)) { describeReservedNodesResult.withReservedNodes(new ArrayList<ReservedNode>()); continue; } if (context.testExpression("ReservedNodes/ReservedNode", targetDepth)) { describeReservedNodesResult.withReservedNodes(ReservedNodeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeReservedNodesResult; } } } }
public DescribeReservedNodesResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeReservedNodesResult describeReservedNodesResult = new DescribeReservedNodesResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeReservedNodesResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeReservedNodesResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ReservedNodes", targetDepth)) { describeReservedNodesResult.withReservedNodes(new ArrayList<ReservedNode>()); continue; } if (context.testExpression("ReservedNodes/ReservedNode", targetDepth)) { describeReservedNodesResult.withReservedNodes(ReservedNodeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeReservedNodesResult; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeReservedNodesResult == false) return false; DescribeReservedNodesResult other = (DescribeReservedNodesResult) obj; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; if (other.getReservedNodes() == null ^ this.getReservedNodes() == null) return false; if (other.getReservedNodes() != null && other.getReservedNodes().equals(this.getReservedNodes()) == false) return false; return true; }
/** * <p> * The list of <code>ReservedNode</code> objects. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setReservedNodes(java.util.Collection)} or {@link #withReservedNodes(java.util.Collection)} if you want * to override the existing values. * </p> * * @param reservedNodes * The list of <code>ReservedNode</code> objects. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeReservedNodesResult withReservedNodes(ReservedNode... reservedNodes) { if (this.reservedNodes == null) { setReservedNodes(new com.amazonaws.internal.SdkInternalList<ReservedNode>(reservedNodes.length)); } for (ReservedNode ele : reservedNodes) { this.reservedNodes.add(ele); } return this; }
/** * <p> * A value that indicates the starting point for the next set of response records in a subsequent request. If a * value is returned in a response, you can retrieve the next set of records by providing this returned marker value * in the <code>Marker</code> parameter and retrying the command. If the <code>Marker</code> field is empty, all * response records have been retrieved for the request. * </p> * * @param marker * A value that indicates the starting point for the next set of response records in a subsequent request. If * a value is returned in a response, you can retrieve the next set of records by providing this returned * marker value in the <code>Marker</code> parameter and retrying the command. If the <code>Marker</code> * field is empty, all response records have been retrieved for the request. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeReservedNodesResult withMarker(String marker) { setMarker(marker); 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 (getMarker() != null) sb.append("Marker: ").append(getMarker()).append(","); if (getReservedNodes() != null) sb.append("ReservedNodes: ").append(getReservedNodes()); sb.append("}"); return sb.toString(); }
/** * <p> * The list of <code>ReservedNode</code> objects. * </p> * * @param reservedNodes * The list of <code>ReservedNode</code> objects. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeReservedNodesResult withReservedNodes(java.util.Collection<ReservedNode> reservedNodes) { setReservedNodes(reservedNodes); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); hashCode = prime * hashCode + ((getReservedNodes() == null) ? 0 : getReservedNodes().hashCode()); return hashCode; }
/** * <p> * The list of <code>ReservedNode</code> objects. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setReservedNodes(java.util.Collection)} or {@link #withReservedNodes(java.util.Collection)} if you want * to override the existing values. * </p> * * @param reservedNodes * The list of <code>ReservedNode</code> objects. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeReservedNodesResult withReservedNodes(ReservedNode... reservedNodes) { if (this.reservedNodes == null) { setReservedNodes(new com.amazonaws.internal.SdkInternalList<ReservedNode>(reservedNodes.length)); } for (ReservedNode ele : reservedNodes) { this.reservedNodes.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeReservedNodesResult == false) return false; DescribeReservedNodesResult other = (DescribeReservedNodesResult) obj; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; if (other.getReservedNodes() == null ^ this.getReservedNodes() == null) return false; if (other.getReservedNodes() != null && other.getReservedNodes().equals(this.getReservedNodes()) == false) return false; return true; }
/** * 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 (getMarker() != null) sb.append("Marker: ").append(getMarker()).append(","); if (getReservedNodes() != null) sb.append("ReservedNodes: ").append(getReservedNodes()); sb.append("}"); return sb.toString(); }