Skip to content

Commit d29408f

Browse files
author
lucasam
committed
Removed websocket related fields because it was addressed at
aws#92
1 parent 8c37e8d commit d29408f

File tree

2 files changed

+27
-197
lines changed

2 files changed

+27
-197
lines changed

aws-lambda-java-events/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>com.amazonaws</groupId>
55
<artifactId>aws-lambda-java-events</artifactId>
6-
<version>2.2.6</version>
6+
<version>2.2.7-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>AWS Lambda Java Events Library</name>

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

+26-196
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,9 @@ public static class ProxyRequestContext implements Serializable, Cloneable {
7070

7171
private String domainName;
7272

73-
private String protocol;
74-
75-
private String connectionId;
76-
77-
private String routeKey;
78-
79-
private String messageId;
73+
private String domainPrefix;
8074

81-
private String eventType;
82-
83-
private String messageDirection;
84-
85-
private Long connectedAt;
75+
private String protocol;
8676

8777
/**
8878
* default constructor
@@ -399,167 +389,47 @@ public ProxyRequestContext withDomainName(String domainName) {
399389
}
400390

401391
/**
402-
* @return The request protocol, for example, HTTP/1.1.
403-
*/
404-
public String getProtocol() {
405-
return protocol;
406-
}
407-
408-
/**
409-
* @param protocol The request protocol, for example, HTTP/1.1.
410-
*/
411-
public void setProtocol(String protocol) {
412-
this.protocol = protocol;
413-
}
414-
415-
/**
416-
* @param protocol The request protocol, for example, HTTP/1.1.
417-
* @return ProxyRequestContext object
418-
*/
419-
public ProxyRequestContext withProtocol(String protocol) {
420-
this.setProtocol(protocol);
421-
return this;
422-
}
423-
/**
424-
* @return A unique ID for the connection that can be used to make a callback to the client. (Websocket API Gateway)
425-
*/
426-
public String getConnectionId() {
427-
return connectionId;
428-
}
429-
430-
/**
431-
* @param connectionId A unique ID for the connection that can be used to make a callback to the client.
432-
* (Websocket API Gateway)
433-
*/
434-
public void setConnectionId(String connectionId) {
435-
this.connectionId = connectionId;
436-
}
437-
438-
/**
439-
* @param connectionId A unique ID for the connection that can be used to make a callback to the client.
440-
* (Websocket API Gateway)
441-
* @return ProxyRequestContext object
442-
*/
443-
public ProxyRequestContext withConnectionId(String connectionId) {
444-
this.setConnectionId(connectionId);
445-
return this;
446-
}
447-
448-
/**
449-
* @return The selected route key. (Websocket API Gateway)
450-
*/
451-
public String getRouteKey() {
452-
return routeKey;
453-
}
454-
455-
/**
456-
* @param routeKey The selected route key. (Websocket API Gateway)
457-
*/
458-
public void setRouteKey(String routeKey) {
459-
this.routeKey = routeKey;
460-
}
461-
462-
/**
463-
* @param routeKey The selected route key. (Websocket API Gateway)
464-
* @return ProxyRequestContext object
465-
*/
466-
public ProxyRequestContext withRouteKey(String routeKey) {
467-
this.setRouteKey(routeKey);
468-
return this;
469-
}
470-
471-
/**
472-
* @return A unique server-side ID for a message. Available only when the eventType is MESSAGE.
473-
* (Websocket API Gateway)
392+
* @return The first label of the domainName. This is often used as a caller/customer identifier.
474393
*/
475-
public String getMessageId() {
476-
return messageId;
394+
public String getDomainPrefix() {
395+
return domainPrefix;
477396
}
478397

479398
/**
480-
* @param messageId A unique server-side ID for a message. Available only when the eventType is MESSAGE.
481-
* (Websocket API Gateway)
399+
* @param domainPrefix The first label of the domainName. This is often used as a caller/customer identifier.
482400
*/
483-
public void setMessageId(String messageId) {
484-
this.messageId = messageId;
401+
public void setDomainPrefix(String domainPrefix) {
402+
this.domainPrefix = domainPrefix;
485403
}
486404

487405
/**
488-
* @param messageId A unique server-side ID for a message. Available only when the eventType is MESSAGE.
489-
* (Websocket API Gateway)
490-
* @return ProxyRequestContext object
491-
*/
492-
public ProxyRequestContext withMessageId(String messageId) {
493-
this.setMessageId(messageId);
494-
return this;
495-
}
496-
497-
/**
498-
* @return The event type: CONNECT, MESSAGE, or DISCONNECT. (Websocket API Gateway)
499-
*/
500-
public String getEventType() {
501-
return eventType;
502-
}
503-
504-
/**
505-
* @param eventType The event type: CONNECT, MESSAGE, or DISCONNECT. (Websocket API Gateway)
506-
*/
507-
public void setEventType(String eventType) {
508-
this.eventType = eventType;
509-
}
510-
511-
/**
512-
* @param eventType The event type: CONNECT, MESSAGE, or DISCONNECT. (Websocket API Gateway)
513-
* @return ProxyRequestContext object
514-
*/
515-
public ProxyRequestContext withEventType(String eventType) {
516-
this.setEventType(eventType);
517-
return this;
518-
}
519-
520-
/**
521-
* @return Message direction IN, OUT. (Websocket API Gateway)
522-
*/
523-
public String getMessageDirection() {
524-
return messageDirection;
525-
}
526-
527-
/**
528-
* @param messageDirection Message direction IN, OUT. (Websocket API Gateway)
529-
*/
530-
public void setMessageDirection(String messageDirection) {
531-
this.messageDirection = messageDirection;
532-
}
533-
534-
/**
535-
* @param messageDirection Message direction IN, OUT. (Websocket API Gateway)
536-
* @return ProxyRequestContext object
406+
* @param domainPrefix The first label of the domainName. This is often used as a caller/customer identifier.
407+
* @return
537408
*/
538-
public ProxyRequestContext withMessageDirection(String messageDirection) {
539-
this.setMessageDirection(messageDirection);
409+
public ProxyRequestContext withDomainPrefix(String domainPrefix) {
410+
this.setDomainPrefix(domainPrefix);
540411
return this;
541412
}
542-
543413
/**
544-
* @return The Epoch-formatted Websocket connection time in millis. (Websocket API Gateway)
414+
* @return The request protocol, for example, HTTP/1.1.
545415
*/
546-
public Long getConnectedAt() {
547-
return connectedAt;
416+
public String getProtocol() {
417+
return protocol;
548418
}
549419

550420
/**
551-
* @param connectedAt The Epoch-formatted Websocket connection time in millis. (Websocket API Gateway)
421+
* @param protocol The request protocol, for example, HTTP/1.1.
552422
*/
553-
public void setConnectedAt(Long connectedAt) {
554-
this.connectedAt = connectedAt;
423+
public void setProtocol(String protocol) {
424+
this.protocol = protocol;
555425
}
556426

557427
/**
558-
* @param connectedAt The Epoch-formatted Websocket connection time in millis. (Websocket API Gateway)
428+
* @param protocol The request protocol, for example, HTTP/1.1.
559429
* @return ProxyRequestContext object
560430
*/
561-
public ProxyRequestContext withConnectedAt(Long connectedAt) {
562-
this.setConnectedAt(connectedAt);
431+
public ProxyRequestContext withProtocol(String protocol) {
432+
this.setProtocol(protocol);
563433
return this;
564434
}
565435

@@ -588,6 +458,8 @@ public String toString() {
588458
sb.append("resourcePath: ").append(getResourcePath()).append(",");
589459
if (getHttpMethod() != null)
590460
sb.append("httpMethod: ").append(getHttpMethod()).append(",");
461+
if (getApiId() != null)
462+
sb.append("apiId: ").append(getApiId());
591463
if (getPath() != null)
592464
sb.append("path: ").append(getPath()).append(",");
593465
if (getAuthorizer() != null)
@@ -600,22 +472,10 @@ public String toString() {
600472
sb.append("protocol: ").append(getProtocol()).append(",");
601473
if (getRequestTimeEpoch() != null)
602474
sb.append("requestTimeEpoch: ").append(getRequestTimeEpoch()).append(",");
475+
if (getDomainPrefix() != null)
476+
sb.append("domainPrefix: ").append(getDomainPrefix()).append(",");
603477
if (getDomainName() != null)
604-
sb.append("domainName: ").append(getDomainName()).append(",");
605-
if (getConnectionId() != null)
606-
sb.append("connectionId: ").append(getConnectionId()).append(",");
607-
if (getRouteKey() != null)
608-
sb.append("routeKey: ").append(getRouteKey()).append(",");
609-
if (getMessageId() != null)
610-
sb.append("messageId: ").append(getMessageId()).append(",");
611-
if (getEventType() != null)
612-
sb.append("eventType: ").append(getEventType()).append(",");
613-
if (getMessageDirection() != null)
614-
sb.append("messageDirection: ").append(getMessageDirection()).append(",");
615-
if (getConnectedAt() != null)
616-
sb.append("connectedAt: ").append(getConnectedAt()).append(",");
617-
if (getApiId() != null)
618-
sb.append("apiId: ").append(getApiId());
478+
sb.append("domainName: ").append(getDomainName());
619479
sb.append("}");
620480
return sb.toString();
621481
}
@@ -690,30 +550,6 @@ public boolean equals(Object obj) {
690550
return false;
691551
if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false)
692552
return false;
693-
if (other.getConnectionId() == null ^ this.getConnectionId() == null)
694-
return false;
695-
if (other.getConnectionId() != null && other.getConnectionId().equals(this.getConnectionId()) == false)
696-
return false;
697-
if (other.getRouteKey() == null ^ this.getRouteKey() == null)
698-
return false;
699-
if (other.getRouteKey() != null && other.getRouteKey().equals(this.getRouteKey()) == false)
700-
return false;
701-
if (other.getMessageId() == null ^ this.getMessageId() == null)
702-
return false;
703-
if (other.getMessageId() != null && other.getMessageId().equals(this.getMessageId()) == false)
704-
return false;
705-
if (other.getEventType() == null ^ this.getEventType() == null)
706-
return false;
707-
if (other.getEventType() != null && other.getEventType().equals(this.getEventType()) == false)
708-
return false;
709-
if (other.getMessageDirection() == null ^ this.getMessageDirection() == null)
710-
return false;
711-
if (other.getMessageDirection() != null && other.getMessageDirection().equals(this.getMessageDirection()) == false)
712-
return false;
713-
if (other.getConnectedAt() == null ^ this.getConnectedAt() == null)
714-
return false;
715-
if (other.getConnectedAt() != null && other.getConnectedAt().equals(this.getConnectedAt()) == false)
716-
return false;
717553
return true;
718554
}
719555

@@ -737,12 +573,6 @@ public int hashCode() {
737573
hashCode = prime * hashCode + ((getRequestTimeEpoch() == null) ? 0 : getRequestTimeEpoch().hashCode());
738574
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
739575
hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode());
740-
hashCode = prime * hashCode + ((getConnectionId() == null) ? 0 : getConnectionId().hashCode());
741-
hashCode = prime * hashCode + ((getRouteKey() == null) ? 0 : getRouteKey().hashCode());
742-
hashCode = prime * hashCode + ((getMessageId() == null) ? 0 : getMessageId().hashCode());
743-
hashCode = prime * hashCode + ((getEventType() == null) ? 0 : getEventType().hashCode());
744-
hashCode = prime * hashCode + ((getMessageDirection() == null) ? 0 : getMessageDirection().hashCode());
745-
hashCode = prime * hashCode + ((getConnectedAt() == null) ? 0 : getConnectedAt().hashCode());
746576
return hashCode;
747577
}
748578

0 commit comments

Comments
 (0)