public Request<DescribeNetworkInterfacesRequest> marshall( DescribeNetworkInterfacesRequest describeNetworkInterfacesRequest) { if (describeNetworkInterfacesRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } Request<DescribeNetworkInterfacesRequest> request = new DefaultRequest<DescribeNetworkInterfacesRequest>( describeNetworkInterfacesRequest, "AmazonEC2"); request.addParameter("Action", "DescribeNetworkInterfaces"); request.addParameter("Version", "2015-10-01"); java.util.List<String> networkInterfaceIdsList = describeNetworkInterfacesRequest.getNetworkInterfaceIds(); int networkInterfaceIdsListIndex = 1; for (String networkInterfaceIdsListValue : networkInterfaceIdsList) { if (networkInterfaceIdsListValue != null) { request.addParameter( "NetworkInterfaceId." + networkInterfaceIdsListIndex, StringUtils.fromString(networkInterfaceIdsListValue)); } networkInterfaceIdsListIndex++; } java.util.List<Filter> filtersList = describeNetworkInterfacesRequest.getFilters(); int filtersListIndex = 1; for (Filter filtersListValue : filtersList) { Filter filterMember = filtersListValue; if (filterMember != null) { if (filterMember.getName() != null) { request.addParameter( "Filter." + filtersListIndex + ".Name", StringUtils.fromString(filterMember.getName())); } java.util.List<String> valuesList = filterMember.getValues(); int valuesListIndex = 1; for (String valuesListValue : valuesList) { if (valuesListValue != null) { request.addParameter( "Filter." + filtersListIndex + ".Value." + valuesListIndex, StringUtils.fromString(valuesListValue)); } valuesListIndex++; } } filtersListIndex++; } return request; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeNetworkInterfacesRequest == false) return false; DescribeNetworkInterfacesRequest other = (DescribeNetworkInterfacesRequest) obj; if (other.getNetworkInterfaceIds() == null ^ this.getNetworkInterfaceIds() == null) return false; if (other.getNetworkInterfaceIds() != null && other.getNetworkInterfaceIds().equals(this.getNetworkInterfaceIds()) == false) return false; if (other.getFilters() == null ^ this.getFilters() == null) return false; if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false) return false; return true; }