/** * <p> * A JSON-formatted list of AWS services. * </p> * * @param services * A JSON-formatted list of AWS services. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeServicesResult withServices(java.util.Collection<Service> services) { setServices(services); return this; }
/** * <p> * A JSON-formatted list of AWS services. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setServices(java.util.Collection)} or {@link #withServices(java.util.Collection)} if you want to override * the existing values. * </p> * * @param services * A JSON-formatted list of AWS services. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeServicesResult withServices(Service... services) { if (this.services == null) { setServices(new com.amazonaws.internal.SdkInternalList<Service>(services.length)); } for (Service ele : services) { this.services.add(ele); } return this; }
public DescribeServicesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeServicesResult describeServicesResult = new DescribeServicesResult(); 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 describeServicesResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("services", targetDepth)) { context.nextToken(); describeServicesResult.setServices(new ListUnmarshaller<Service>(ServiceJsonUnmarshaller.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 describeServicesResult; }
/** * <p> * A JSON-formatted list of AWS services. * </p> * * @param services * A JSON-formatted list of AWS services. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeServicesResult withServices(java.util.Collection<Service> services) { setServices(services); return this; }
/** * <p> * A JSON-formatted list of AWS services. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setServices(java.util.Collection)} or {@link #withServices(java.util.Collection)} if you want to override * the existing values. * </p> * * @param services * A JSON-formatted list of AWS services. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeServicesResult withServices(Service... services) { if (this.services == null) { setServices(new com.amazonaws.internal.SdkInternalList<Service>(services.length)); } for (Service ele : services) { this.services.add(ele); } return this; }
public DescribeServicesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeServicesResult describeServicesResult = new DescribeServicesResult(); 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 describeServicesResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("services", targetDepth)) { context.nextToken(); describeServicesResult.setServices(new ListUnmarshaller<Service>(ServiceJsonUnmarshaller.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 describeServicesResult; }