public Request<ModifyCacheSubnetGroupRequest> marshall( ModifyCacheSubnetGroupRequest modifyCacheSubnetGroupRequest) { if (modifyCacheSubnetGroupRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } Request<ModifyCacheSubnetGroupRequest> request = new DefaultRequest<ModifyCacheSubnetGroupRequest>( modifyCacheSubnetGroupRequest, "AmazonElastiCache"); request.addParameter("Action", "ModifyCacheSubnetGroup"); request.addParameter("Version", "2015-02-02"); request.setHttpMethod(HttpMethodName.POST); if (modifyCacheSubnetGroupRequest.getCacheSubnetGroupName() != null) { request.addParameter( "CacheSubnetGroupName", StringUtils.fromString(modifyCacheSubnetGroupRequest.getCacheSubnetGroupName())); } if (modifyCacheSubnetGroupRequest.getCacheSubnetGroupDescription() != null) { request.addParameter( "CacheSubnetGroupDescription", StringUtils.fromString(modifyCacheSubnetGroupRequest.getCacheSubnetGroupDescription())); } com.amazonaws.internal.SdkInternalList<String> subnetIdsList = (com.amazonaws.internal.SdkInternalList<String>) modifyCacheSubnetGroupRequest.getSubnetIds(); if (!subnetIdsList.isEmpty() || !subnetIdsList.isAutoConstruct()) { int subnetIdsListIndex = 1; for (String subnetIdsListValue : subnetIdsList) { if (subnetIdsListValue != null) { request.addParameter( "SubnetIds.SubnetIdentifier." + subnetIdsListIndex, StringUtils.fromString(subnetIdsListValue)); } subnetIdsListIndex++; } } return request; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ModifyCacheSubnetGroupRequest == false) return false; ModifyCacheSubnetGroupRequest other = (ModifyCacheSubnetGroupRequest) obj; if (other.getCacheSubnetGroupName() == null ^ this.getCacheSubnetGroupName() == null) return false; if (other.getCacheSubnetGroupName() != null && other.getCacheSubnetGroupName().equals(this.getCacheSubnetGroupName()) == false) return false; if (other.getCacheSubnetGroupDescription() == null ^ this.getCacheSubnetGroupDescription() == null) return false; if (other.getCacheSubnetGroupDescription() != null && other.getCacheSubnetGroupDescription().equals(this.getCacheSubnetGroupDescription()) == false) return false; if (other.getSubnetIds() == null ^ this.getSubnetIds() == null) return false; if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == false) return false; return true; }