/** * <p> * An array of <code>Deployment</code> objects that describe the deployments. * </p> * * @param deployments * An array of <code>Deployment</code> objects that describe the deployments. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsResult withDeployments(java.util.Collection<Deployment> deployments) { setDeployments(deployments); return this; }
/** * <p> * An array of <code>Deployment</code> objects that describe the deployments. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDeployments(java.util.Collection)} or {@link #withDeployments(java.util.Collection)} if you want to * override the existing values. * </p> * * @param deployments * An array of <code>Deployment</code> objects that describe the deployments. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsResult withDeployments(Deployment... deployments) { if (this.deployments == null) { setDeployments(new com.amazonaws.internal.SdkInternalList<Deployment>(deployments.length)); } for (Deployment ele : deployments) { this.deployments.add(ele); } return this; }
public DescribeDeploymentsResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeDeploymentsResult describeDeploymentsResult = new DescribeDeploymentsResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return describeDeploymentsResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Deployments", targetDepth)) { context.nextToken(); describeDeploymentsResult.setDeployments(new ListUnmarshaller<Deployment>(DeploymentJsonUnmarshaller.getInstance()).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return describeDeploymentsResult; }
/** * <p> * An array of <code>Deployment</code> objects that describe the deployments. * </p> * * @param deployments * An array of <code>Deployment</code> objects that describe the deployments. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsResult withDeployments(java.util.Collection<Deployment> deployments) { setDeployments(deployments); return this; }
/** * <p> * An array of <code>Deployment</code> objects that describe the deployments. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDeployments(java.util.Collection)} or {@link #withDeployments(java.util.Collection)} if you want to * override the existing values. * </p> * * @param deployments * An array of <code>Deployment</code> objects that describe the deployments. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeDeploymentsResult withDeployments(Deployment... deployments) { if (this.deployments == null) { setDeployments(new com.amazonaws.internal.SdkInternalList<Deployment>(deployments.length)); } for (Deployment ele : deployments) { this.deployments.add(ele); } return this; }
public DescribeDeploymentsResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeDeploymentsResult describeDeploymentsResult = new DescribeDeploymentsResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return describeDeploymentsResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Deployments", targetDepth)) { context.nextToken(); describeDeploymentsResult.setDeployments(new ListUnmarshaller<Deployment>(DeploymentJsonUnmarshaller.getInstance()).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return describeDeploymentsResult; }