/** * Simplified method form for invoking the DescribePolicies operation with an AsyncHandler. * * @see #describePoliciesAsync(DescribePoliciesRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<DescribePoliciesResult> describePoliciesAsync( com.amazonaws.handlers.AsyncHandler<DescribePoliciesRequest, DescribePoliciesResult> asyncHandler) { return describePoliciesAsync(new DescribePoliciesRequest(), asyncHandler); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getPolicyNames() == null) ? 0 : getPolicyNames().hashCode()); hashCode = prime * hashCode + ((getPolicyTypes() == null) ? 0 : getPolicyTypes().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxRecords() == null) ? 0 : getMaxRecords().hashCode()); return hashCode; }
/** * <p> * The names of one or more policies. If you omit this parameter, all policies are described. If a group name is * provided, the results are limited to that group. This list is limited to 50 items. If you specify an unknown * policy name, it is ignored with no error. * </p> * * @param policyNames * The names of one or more policies. If you omit this parameter, all policies are described. If a group name * is provided, the results are limited to that group. This list is limited to 50 items. If you specify an * unknown policy name, it is ignored with no error. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribePoliciesRequest withPolicyNames(java.util.Collection<String> policyNames) { setPolicyNames(policyNames); return this; }
describeResult = asgClient.describeAutoScalingGroups(new DescribeAutoScalingGroupsRequest().withNextToken(nextToken).withMaxRecords(asgMaxRecord)); for(AutoScalingGroup _asg : describeResult.getAutoScalingGroups()) { _scalingPolicyList.addAll(asgClient.describePolicies(new DescribePoliciesRequest().withAutoScalingGroupName(_asg.getAutoScalingGroupName())).getScalingPolicies());
/** * <p> * One or more policy types. Valid values are <code>SimpleScaling</code> and <code>StepScaling</code>. * </p> * * @param policyTypes * One or more policy types. Valid values are <code>SimpleScaling</code> and <code>StepScaling</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribePoliciesRequest withPolicyTypes(java.util.Collection<String> policyTypes) { setPolicyTypes(policyTypes); return this; }
/** * <p> * One or more policy types. Valid values are <code>SimpleScaling</code> and * <code>StepScaling</code>. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param policyTypes <p> * One or more policy types. Valid values are * <code>SimpleScaling</code> and <code>StepScaling</code>. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribePoliciesRequest withPolicyTypes(String... policyTypes) { if (getPolicyTypes() == null) { this.policyTypes = new java.util.ArrayList<String>(policyTypes.length); } for (String value : policyTypes) { this.policyTypes.add(value); } return this; }
/** * <p> * The names of one or more policies. If you omit this parameter, all * policies are described. If a group name is provided, the results are * limited to that group. This list is limited to 50 items. If you specify * an unknown policy name, it is ignored with no error. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param policyNames <p> * The names of one or more policies. If you omit this parameter, * all policies are described. If a group name is provided, the * results are limited to that group. This list is limited to 50 * items. If you specify an unknown policy name, it is ignored * with no error. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribePoliciesRequest withPolicyNames(String... policyNames) { if (getPolicyNames() == null) { this.policyNames = new java.util.ArrayList<String>(policyNames.length); } for (String value : policyNames) { this.policyNames.add(value); } return this; }
/** * <p> * The name of the Auto Scaling group. * </p> * * @param autoScalingGroupName * The name of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribePoliciesRequest withAutoScalingGroupName(String autoScalingGroupName) { setAutoScalingGroupName(autoScalingGroupName); return this; }
/** * <p> * One or more policy types. Valid values are <code>SimpleScaling</code> and <code>StepScaling</code>. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setPolicyTypes(java.util.Collection)} or {@link #withPolicyTypes(java.util.Collection)} if you want to * override the existing values. * </p> * * @param policyTypes * One or more policy types. Valid values are <code>SimpleScaling</code> and <code>StepScaling</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribePoliciesRequest withPolicyTypes(String... policyTypes) { if (this.policyTypes == null) { setPolicyTypes(new com.amazonaws.internal.SdkInternalList<String>(policyTypes.length)); } for (String ele : policyTypes) { this.policyTypes.add(ele); } return this; }
return false; DescribePoliciesRequest other = (DescribePoliciesRequest) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getPolicyNames() == null ^ this.getPolicyNames() == null) return false; if (other.getPolicyNames() != null && other.getPolicyNames().equals(this.getPolicyNames()) == false) return false; if (other.getPolicyTypes() == null ^ this.getPolicyTypes() == null) return false; if (other.getPolicyTypes() != null && other.getPolicyTypes().equals(this.getPolicyTypes()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getMaxRecords() == null ^ this.getMaxRecords() == null) return false; if (other.getMaxRecords() != null && other.getMaxRecords().equals(this.getMaxRecords()) == false) return false; return true;
/** * Simplified method form for invoking the DescribePolicies operation. * * @see #describePoliciesAsync(DescribePoliciesRequest) */ @Override public java.util.concurrent.Future<DescribePoliciesResult> describePoliciesAsync() { return describePoliciesAsync(new DescribePoliciesRequest()); }
/** * <p> * One or more policy types. Valid values are <code>SimpleScaling</code> and * <code>StepScaling</code>. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param policyTypes <p> * One or more policy types. Valid values are * <code>SimpleScaling</code> and <code>StepScaling</code>. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribePoliciesRequest withPolicyTypes(java.util.Collection<String> policyTypes) { setPolicyTypes(policyTypes); return this; }
/** * <p> * The names of one or more policies. If you omit this parameter, all policies are described. If a group name is * provided, the results are limited to that group. This list is limited to 50 items. If you specify an unknown * policy name, it is ignored with no error. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setPolicyNames(java.util.Collection)} or {@link #withPolicyNames(java.util.Collection)} if you want to * override the existing values. * </p> * * @param policyNames * The names of one or more policies. If you omit this parameter, all policies are described. If a group name * is provided, the results are limited to that group. This list is limited to 50 items. If you specify an * unknown policy name, it is ignored with no error. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribePoliciesRequest withPolicyNames(String... policyNames) { if (this.policyNames == null) { setPolicyNames(new com.amazonaws.internal.SdkInternalList<String>(policyNames.length)); } for (String ele : policyNames) { this.policyNames.add(ele); } 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 (getAutoScalingGroupName() != null) sb.append("AutoScalingGroupName: ").append(getAutoScalingGroupName()).append(","); if (getPolicyNames() != null) sb.append("PolicyNames: ").append(getPolicyNames()).append(","); if (getPolicyTypes() != null) sb.append("PolicyTypes: ").append(getPolicyTypes()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getMaxRecords() != null) sb.append("MaxRecords: ").append(getMaxRecords()); sb.append("}"); return sb.toString(); }
/** * Simplified method form for invoking the DescribePolicies operation. * * @see #describePoliciesAsync(DescribePoliciesRequest) */ @Override public java.util.concurrent.Future<DescribePoliciesResult> describePoliciesAsync() { return describePoliciesAsync(new DescribePoliciesRequest()); }
/** * <p> * The names of one or more policies. If you omit this parameter, all * policies are described. If a group name is provided, the results are * limited to that group. This list is limited to 50 items. If you specify * an unknown policy name, it is ignored with no error. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param policyNames <p> * The names of one or more policies. If you omit this parameter, * all policies are described. If a group name is provided, the * results are limited to that group. This list is limited to 50 * items. If you specify an unknown policy name, it is ignored * with no error. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribePoliciesRequest withPolicyNames(java.util.Collection<String> policyNames) { setPolicyNames(policyNames); return this; }
request.setHttpMethod(HttpMethodName.POST); if (describePoliciesRequest.getAutoScalingGroupName() != null) { request.addParameter("AutoScalingGroupName", StringUtils.fromString(describePoliciesRequest.getAutoScalingGroupName())); if (!describePoliciesRequest.getPolicyNames().isEmpty() || !((com.amazonaws.internal.SdkInternalList<String>) describePoliciesRequest.getPolicyNames()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<String> policyNamesList = (com.amazonaws.internal.SdkInternalList<String>) describePoliciesRequest .getPolicyNames(); int policyNamesListIndex = 1; if (!describePoliciesRequest.getPolicyTypes().isEmpty() || !((com.amazonaws.internal.SdkInternalList<String>) describePoliciesRequest.getPolicyTypes()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<String> policyTypesList = (com.amazonaws.internal.SdkInternalList<String>) describePoliciesRequest .getPolicyTypes(); int policyTypesListIndex = 1; if (describePoliciesRequest.getNextToken() != null) { request.addParameter("NextToken", StringUtils.fromString(describePoliciesRequest.getNextToken())); if (describePoliciesRequest.getMaxRecords() != null) { request.addParameter("MaxRecords", StringUtils.fromInteger(describePoliciesRequest.getMaxRecords()));
@Override public DescribePoliciesResult describePolicies() { return describePolicies(new DescribePoliciesRequest()); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getPolicyNames() == null) ? 0 : getPolicyNames().hashCode()); hashCode = prime * hashCode + ((getPolicyTypes() == null) ? 0 : getPolicyTypes().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getMaxRecords() == null) ? 0 : getMaxRecords().hashCode()); return hashCode; }
/** * Simplified method form for invoking the DescribePolicies operation with an AsyncHandler. * * @see #describePoliciesAsync(DescribePoliciesRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<DescribePoliciesResult> describePoliciesAsync( com.amazonaws.handlers.AsyncHandler<DescribePoliciesRequest, DescribePoliciesResult> asyncHandler) { return describePoliciesAsync(new DescribePoliciesRequest(), asyncHandler); }