Skip to content

Commit 2af9acf

Browse files
msailescarlzogh
andauthored
Issue 246: Added the principalOrgId. (#247)
Co-authored-by: Carl Zogheib <[email protected]>
1 parent c4f3af3 commit 2af9acf

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/APIGatewayProxyRequestEvent.java

+32
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ public static class RequestIdentity implements Serializable, Cloneable {
440440

441441
private String apiKey;
442442

443+
private String principalOrgId;
444+
443445
private String sourceIp;
444446

445447
private String cognitoAuthenticationType;
@@ -574,6 +576,29 @@ public RequestIdentity withApiKey(String apiKey) {
574576
return this;
575577
}
576578

579+
/**
580+
* @return the principal org Id
581+
*/
582+
public String getPrincipalOrgId() {
583+
return principalOrgId;
584+
}
585+
586+
/**
587+
* @param principalOrgId the principal org Id
588+
*/
589+
public void setPrincipalOrgId(String principalOrgId) {
590+
this.principalOrgId = principalOrgId;
591+
}
592+
593+
/**
594+
* @param principalOrgId the principal org Id
595+
* @return RequestIdentity object
596+
*/
597+
public RequestIdentity withPrincipalOrgId(String principalOrgId) {
598+
this.setPrincipalOrgId(principalOrgId);
599+
return this;
600+
}
601+
577602
/**
578603
* @return source ip address
579604
*/
@@ -756,6 +781,8 @@ public String toString() {
756781
sb.append("caller: ").append(getCaller()).append(",");
757782
if (getApiKey() != null)
758783
sb.append("apiKey: ").append(getApiKey()).append(",");
784+
if (getPrincipalOrgId() != null)
785+
sb.append("principalOrgId: ").append(getPrincipalOrgId()).append(",");
759786
if (getSourceIp() != null)
760787
sb.append("sourceIp: ").append(getSourceIp()).append(",");
761788
if (getCognitoAuthenticationType() != null)
@@ -804,6 +831,10 @@ public boolean equals(Object obj) {
804831
return false;
805832
if (other.getApiKey() != null && other.getApiKey().equals(this.getApiKey()) == false)
806833
return false;
834+
if (other.getPrincipalOrgId() == null ^ this.getPrincipalOrgId() == null)
835+
return false;
836+
if (other.getPrincipalOrgId() != null && other.getPrincipalOrgId().equals(this.getPrincipalOrgId()) == false)
837+
return false;
807838
if (other.getSourceIp() == null ^ this.getSourceIp() == null)
808839
return false;
809840
if (other.getSourceIp() != null && other.getSourceIp().equals(this.getSourceIp()) == false)
@@ -846,6 +877,7 @@ public int hashCode() {
846877
hashCode = prime * hashCode + ((getCognitoIdentityId() == null) ? 0 : getCognitoIdentityId().hashCode());
847878
hashCode = prime * hashCode + ((getCaller() == null) ? 0 : getCaller().hashCode());
848879
hashCode = prime * hashCode + ((getApiKey() == null) ? 0 : getApiKey().hashCode());
880+
hashCode = prime * hashCode + ((getPrincipalOrgId() == null) ? 0 : getPrincipalOrgId().hashCode());
849881
hashCode = prime * hashCode + ((getSourceIp() == null) ? 0 : getSourceIp().hashCode());
850882
hashCode = prime * hashCode + ((getCognitoAuthenticationType() == null) ? 0 : getCognitoAuthenticationType().hashCode());
851883
hashCode = prime * hashCode + ((getCognitoAuthenticationProvider() == null) ? 0 : getCognitoAuthenticationProvider().hashCode());

0 commit comments

Comments
 (0)