@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateKeyPairRequest == false) return false; CreateKeyPairRequest other = (CreateKeyPairRequest) obj; if (other.getKeyName() == null ^ this.getKeyName() == null) return false; if (other.getKeyName() != null && other.getKeyName().equals(this.getKeyName()) == false) return false; return true; }
public Request<CreateKeyPairRequest> marshall(CreateKeyPairRequest createKeyPairRequest) { if (createKeyPairRequest == null) { throw new AmazonClientException("Invalid argument passed to marshall(...)"); } Request<CreateKeyPairRequest> request = new DefaultRequest<CreateKeyPairRequest>(createKeyPairRequest, "AmazonEC2"); request.addParameter("Action", "CreateKeyPair"); request.addParameter("Version", "2012-10-01"); if (createKeyPairRequest.getKeyName() != null) { request.addParameter("KeyName", StringUtils.fromString(createKeyPairRequest.getKeyName())); } return request; }