mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-18 05:25:45 +00:00
📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code * Fix merge conflicts and some sonar issues Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
@@ -24,11 +24,18 @@
|
||||
package com.iluwatar.serverless.faas;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* Lambda context information.
|
||||
*/
|
||||
@ToString
|
||||
@EqualsAndHashCode
|
||||
@Setter
|
||||
@Getter
|
||||
public class LambdaInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3936130599040848923L;
|
||||
@@ -40,103 +47,4 @@ public class LambdaInfo implements Serializable {
|
||||
private String functionVersion;
|
||||
private Integer memoryLimitInMb;
|
||||
|
||||
public String getAwsRequestId() {
|
||||
return awsRequestId;
|
||||
}
|
||||
|
||||
public void setAwsRequestId(String awsRequestId) {
|
||||
this.awsRequestId = awsRequestId;
|
||||
}
|
||||
|
||||
public String getLogGroupName() {
|
||||
return logGroupName;
|
||||
}
|
||||
|
||||
public void setLogGroupName(String logGroupName) {
|
||||
this.logGroupName = logGroupName;
|
||||
}
|
||||
|
||||
public String getLogStreamName() {
|
||||
return logStreamName;
|
||||
}
|
||||
|
||||
public void setLogStreamName(String logStreamName) {
|
||||
this.logStreamName = logStreamName;
|
||||
}
|
||||
|
||||
public String getFunctionName() {
|
||||
return functionName;
|
||||
}
|
||||
|
||||
public void setFunctionName(String functionName) {
|
||||
this.functionName = functionName;
|
||||
}
|
||||
|
||||
public String getFunctionVersion() {
|
||||
return functionVersion;
|
||||
}
|
||||
|
||||
public void setFunctionVersion(String functionVersion) {
|
||||
this.functionVersion = functionVersion;
|
||||
}
|
||||
|
||||
public Integer getMemoryLimitInMb() {
|
||||
return memoryLimitInMb;
|
||||
}
|
||||
|
||||
public void setMemoryLimitInMb(Integer memoryLimitInMb) {
|
||||
this.memoryLimitInMb = memoryLimitInMb;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LambdaInfo{"
|
||||
+ "awsRequestId='" + awsRequestId + '\''
|
||||
+ ", logGroupName='" + logGroupName + '\''
|
||||
+ ", logStreamName='" + logStreamName + '\''
|
||||
+ ", functionName='" + functionName + '\''
|
||||
+ ", functionVersion='" + functionVersion + '\''
|
||||
+ ", memoryLimitInMb=" + memoryLimitInMb
|
||||
+ '}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LambdaInfo that = (LambdaInfo) o;
|
||||
|
||||
if (!Objects.equals(awsRequestId, that.awsRequestId)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(logGroupName, that.logGroupName)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(logStreamName, that.logStreamName)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(functionName, that.functionName)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(functionVersion, that.functionVersion)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(memoryLimitInMb, that.memoryLimitInMb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
var result = awsRequestId != null ? awsRequestId.hashCode() : 0;
|
||||
result = 31 * result + (logGroupName != null ? logGroupName.hashCode() : 0);
|
||||
result = 31 * result + (logStreamName != null ? logStreamName.hashCode() : 0);
|
||||
result = 31 * result + (functionName != null ? functionName.hashCode() : 0);
|
||||
result = 31 * result + (functionVersion != null ? functionVersion.hashCode() : 0);
|
||||
result = 31 * result + (memoryLimitInMb != null ? memoryLimitInMb.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user