/** * <p> * The refresh status of the specified Trusted Advisor checks. * </p> * * @param statuses * The refresh status of the specified Trusted Advisor checks. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTrustedAdvisorCheckRefreshStatusesResult withStatuses(java.util.Collection<TrustedAdvisorCheckRefreshStatus> statuses) { setStatuses(statuses); return this; }
/** * <p> * The refresh status of the specified Trusted Advisor checks. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setStatuses(java.util.Collection)} or {@link #withStatuses(java.util.Collection)} if you want to override * the existing values. * </p> * * @param statuses * The refresh status of the specified Trusted Advisor checks. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTrustedAdvisorCheckRefreshStatusesResult withStatuses(TrustedAdvisorCheckRefreshStatus... statuses) { if (this.statuses == null) { setStatuses(new com.amazonaws.internal.SdkInternalList<TrustedAdvisorCheckRefreshStatus>(statuses.length)); } for (TrustedAdvisorCheckRefreshStatus ele : statuses) { this.statuses.add(ele); } return this; }
public DescribeTrustedAdvisorCheckRefreshStatusesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeTrustedAdvisorCheckRefreshStatusesResult describeTrustedAdvisorCheckRefreshStatusesResult = new DescribeTrustedAdvisorCheckRefreshStatusesResult(); 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 describeTrustedAdvisorCheckRefreshStatusesResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("statuses", targetDepth)) { context.nextToken(); describeTrustedAdvisorCheckRefreshStatusesResult.setStatuses(new ListUnmarshaller<TrustedAdvisorCheckRefreshStatus>( TrustedAdvisorCheckRefreshStatusJsonUnmarshaller.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 describeTrustedAdvisorCheckRefreshStatusesResult; }
/** * <p> * The refresh status of the specified Trusted Advisor checks. * </p> * * @param statuses * The refresh status of the specified Trusted Advisor checks. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTrustedAdvisorCheckRefreshStatusesResult withStatuses(java.util.Collection<TrustedAdvisorCheckRefreshStatus> statuses) { setStatuses(statuses); return this; }
/** * <p> * The refresh status of the specified Trusted Advisor checks. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setStatuses(java.util.Collection)} or {@link #withStatuses(java.util.Collection)} if you want to override * the existing values. * </p> * * @param statuses * The refresh status of the specified Trusted Advisor checks. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTrustedAdvisorCheckRefreshStatusesResult withStatuses(TrustedAdvisorCheckRefreshStatus... statuses) { if (this.statuses == null) { setStatuses(new com.amazonaws.internal.SdkInternalList<TrustedAdvisorCheckRefreshStatus>(statuses.length)); } for (TrustedAdvisorCheckRefreshStatus ele : statuses) { this.statuses.add(ele); } return this; }
public DescribeTrustedAdvisorCheckRefreshStatusesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeTrustedAdvisorCheckRefreshStatusesResult describeTrustedAdvisorCheckRefreshStatusesResult = new DescribeTrustedAdvisorCheckRefreshStatusesResult(); 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 describeTrustedAdvisorCheckRefreshStatusesResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("statuses", targetDepth)) { context.nextToken(); describeTrustedAdvisorCheckRefreshStatusesResult.setStatuses(new ListUnmarshaller<TrustedAdvisorCheckRefreshStatus>( TrustedAdvisorCheckRefreshStatusJsonUnmarshaller.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 describeTrustedAdvisorCheckRefreshStatusesResult; }