Skip to content

Issue 246: Added the principalOrgId. #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ public static class RequestIdentity implements Serializable, Cloneable {

private String apiKey;

private String principalOrgId;

private String sourceIp;

private String cognitoAuthenticationType;
Expand Down Expand Up @@ -574,6 +576,29 @@ public RequestIdentity withApiKey(String apiKey) {
return this;
}

/**
* @return the principal org Id
*/
public String getPrincipalOrgId() {
return principalOrgId;
}

/**
* @param principalOrgId the principal org Id
*/
public void setPrincipalOrgId(String principalOrgId) {
this.principalOrgId = principalOrgId;
}

/**
* @param principalOrgId the principal org Id
* @return RequestIdentity object
*/
public RequestIdentity withPrincipalOrgId(String principalOrgId) {
this.setPrincipalOrgId(principalOrgId);
return this;
}

/**
* @return source ip address
*/
Expand Down Expand Up @@ -756,6 +781,8 @@ public String toString() {
sb.append("caller: ").append(getCaller()).append(",");
if (getApiKey() != null)
sb.append("apiKey: ").append(getApiKey()).append(",");
if (getPrincipalOrgId() != null)
sb.append("principalOrgId: ").append(getPrincipalOrgId()).append(",");
if (getSourceIp() != null)
sb.append("sourceIp: ").append(getSourceIp()).append(",");
if (getCognitoAuthenticationType() != null)
Expand Down Expand Up @@ -804,6 +831,10 @@ public boolean equals(Object obj) {
return false;
if (other.getApiKey() != null && other.getApiKey().equals(this.getApiKey()) == false)
return false;
if (other.getPrincipalOrgId() == null ^ this.getPrincipalOrgId() == null)
return false;
if (other.getPrincipalOrgId() != null && other.getPrincipalOrgId().equals(this.getPrincipalOrgId()) == false)
return false;
if (other.getSourceIp() == null ^ this.getSourceIp() == null)
return false;
if (other.getSourceIp() != null && other.getSourceIp().equals(this.getSourceIp()) == false)
Expand Down Expand Up @@ -846,6 +877,7 @@ public int hashCode() {
hashCode = prime * hashCode + ((getCognitoIdentityId() == null) ? 0 : getCognitoIdentityId().hashCode());
hashCode = prime * hashCode + ((getCaller() == null) ? 0 : getCaller().hashCode());
hashCode = prime * hashCode + ((getApiKey() == null) ? 0 : getApiKey().hashCode());
hashCode = prime * hashCode + ((getPrincipalOrgId() == null) ? 0 : getPrincipalOrgId().hashCode());
hashCode = prime * hashCode + ((getSourceIp() == null) ? 0 : getSourceIp().hashCode());
hashCode = prime * hashCode + ((getCognitoAuthenticationType() == null) ? 0 : getCognitoAuthenticationType().hashCode());
hashCode = prime * hashCode + ((getCognitoAuthenticationProvider() == null) ? 0 : getCognitoAuthenticationProvider().hashCode());
Expand Down