@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAgentPreviews() == null) ? 0 : getAgentPreviews().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; }
/** * <p> * The resulting list of agents. * </p> * * @param agentPreviews * The resulting list of agents. * @return Returns a reference to this object so that method calls can be chained together. */ public PreviewAgentsResult withAgentPreviews(java.util.Collection<AgentPreview> agentPreviews) { setAgentPreviews(agentPreviews); return this; }
/** * <p> * When a response is generated, if there is more data to be listed, this parameter is present in the response and * contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no * more data to be listed, this parameter is set to null. * </p> * * @param nextToken * When a response is generated, if there is more data to be listed, this parameter is present in the * response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination * request. If there is no more data to be listed, this parameter is set to null. * @return Returns a reference to this object so that method calls can be chained together. */ public PreviewAgentsResult withNextToken(String nextToken) { setNextToken(nextToken); return this; }
public PreviewAgentsResult unmarshall(JsonUnmarshallerContext context) throws Exception { PreviewAgentsResult previewAgentsResult = new PreviewAgentsResult(); if (context.testExpression("agentPreviews", targetDepth)) { context.nextToken(); previewAgentsResult.setAgentPreviews(new ListUnmarshaller<AgentPreview>(AgentPreviewJsonUnmarshaller.getInstance()).unmarshall(context)); previewAgentsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));
public PreviewAgentsResult unmarshall(JsonUnmarshallerContext context) throws Exception { PreviewAgentsResult previewAgentsResult = new PreviewAgentsResult(); if (context.testExpression("agentPreviews", targetDepth)) { context.nextToken(); previewAgentsResult.setAgentPreviews(new ListUnmarshaller<AgentPreview>(AgentPreviewJsonUnmarshaller.getInstance()).unmarshall(context)); previewAgentsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PreviewAgentsResult == false) return false; PreviewAgentsResult other = (PreviewAgentsResult) obj; if (other.getAgentPreviews() == null ^ this.getAgentPreviews() == null) return false; if (other.getAgentPreviews() != null && other.getAgentPreviews().equals(this.getAgentPreviews()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; }
/** * <p> * The resulting list of agents. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setAgentPreviews(java.util.Collection)} or {@link #withAgentPreviews(java.util.Collection)} if you want * to override the existing values. * </p> * * @param agentPreviews * The resulting list of agents. * @return Returns a reference to this object so that method calls can be chained together. */ public PreviewAgentsResult withAgentPreviews(AgentPreview... agentPreviews) { if (this.agentPreviews == null) { setAgentPreviews(new java.util.ArrayList<AgentPreview>(agentPreviews.length)); } for (AgentPreview ele : agentPreviews) { this.agentPreviews.add(ele); } return this; }
/** * <p> * When a response is generated, if there is more data to be listed, this parameter is present in the response and * contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no * more data to be listed, this parameter is set to null. * </p> * * @param nextToken * When a response is generated, if there is more data to be listed, this parameter is present in the * response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination * request. If there is no more data to be listed, this parameter is set to null. * @return Returns a reference to this object so that method calls can be chained together. */ public PreviewAgentsResult withNextToken(String nextToken) { setNextToken(nextToken); 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 (getAgentPreviews() != null) sb.append("AgentPreviews: ").append(getAgentPreviews()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); }
/** * <p> * The resulting list of agents. * </p> * * @param agentPreviews * The resulting list of agents. * @return Returns a reference to this object so that method calls can be chained together. */ public PreviewAgentsResult withAgentPreviews(java.util.Collection<AgentPreview> agentPreviews) { setAgentPreviews(agentPreviews); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAgentPreviews() == null) ? 0 : getAgentPreviews().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; }
/** * <p> * The resulting list of agents. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setAgentPreviews(java.util.Collection)} or {@link #withAgentPreviews(java.util.Collection)} if you want * to override the existing values. * </p> * * @param agentPreviews * The resulting list of agents. * @return Returns a reference to this object so that method calls can be chained together. */ public PreviewAgentsResult withAgentPreviews(AgentPreview... agentPreviews) { if (this.agentPreviews == null) { setAgentPreviews(new java.util.ArrayList<AgentPreview>(agentPreviews.length)); } for (AgentPreview ele : agentPreviews) { this.agentPreviews.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PreviewAgentsResult == false) return false; PreviewAgentsResult other = (PreviewAgentsResult) obj; if (other.getAgentPreviews() == null ^ this.getAgentPreviews() == null) return false; if (other.getAgentPreviews() != null && other.getAgentPreviews().equals(this.getAgentPreviews()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == 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 (getAgentPreviews() != null) sb.append("AgentPreviews: ").append(getAgentPreviews()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); }