@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getPasswordLastUsed() == null) ? 0 : getPasswordLastUsed().hashCode()); hashCode = prime * hashCode + ((getPermissionsBoundary() == null) ? 0 : getPermissionsBoundary().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getPasswordLastUsed() == null) ? 0 : getPasswordLastUsed().hashCode()); hashCode = prime * hashCode + ((getPermissionsBoundary() == null) ? 0 : getPermissionsBoundary().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
arn = user.getUser().getArn(); } catch (AmazonServiceException e) { if (e.getErrorCode().compareTo("AccessDenied") == 0) {
awsAccountNumber = user.getArn().split(":")[4];
if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null)
/** * Unfortunately Amazon AWS mandates to use ARN notation to get the tags. Therefore we first need to get the account * number through the IAM service and then construct the ARN out of the account no and region * * @return the arn string used to query the tags */ private String getDbInstanceResourceName() { String userArn = this.identityManagement.getUser().getUser().getArn(); AmazonResourceName userResourceName = AmazonResourceName.fromString(userArn); AmazonResourceName dbResourceArn = new AmazonResourceName.Builder(). withService("rds"). withRegion(getRegion()). withAccount(userResourceName.getAccount()). withResourceType("db"). withResourceName(getDbInstanceIdentifier()). withResourceTypeDelimiter(":"). build(); return dbResourceArn.toString(); } }
/** * Unfortunately Amazon AWS mandates to use ARN notation to get the tags. Therefore we first need to get the account * number through the IAM service and then construct the ARN out of the account no and region * * @return the arn string used to query the tags */ private String getDbInstanceResourceName() { String userArn = this.identityManagement.getUser().getUser().getArn(); AmazonResourceName userResourceName = AmazonResourceName.fromString(userArn); AmazonResourceName dbResourceArn = new AmazonResourceName.Builder(). withService("rds"). withRegion(getRegion()). withAccount(userResourceName.getAccount()). withResourceType("db"). withResourceName(getDbInstanceIdentifier()). withResourceTypeDelimiter(":"). build(); return dbResourceArn.toString(); } }