2727import java .util .ArrayList ;
2828import java .util .List ;
2929import java .util .Map ;
30+ import java .util .Objects ;
3031import java .util .stream .Collectors ;
3132
3233public class ServerPingRequest {
3334 private static final Gson GSON = new GsonBuilder ().setFieldNamingPolicy (FieldNamingPolicy .LOWER_CASE_WITH_UNDERSCORES ).create ();
34- private List <ClusterProfileProperties > allClusterProfilePropertiesProperties = new ArrayList <>();
35+ private List <ClusterProfileProperties > allClusterProfileProperties = new ArrayList <>();
3536
3637 public ServerPingRequest () {
3738 }
3839
3940 public ServerPingRequest (List <Map <String , String >> allClusterProfileProperties ) {
40- this .allClusterProfilePropertiesProperties = allClusterProfileProperties .stream ()
41- .map (clusterProfile -> ClusterProfileProperties . fromConfiguration ( clusterProfile ) )
41+ this .allClusterProfileProperties = allClusterProfileProperties .stream ()
42+ .map (ClusterProfileProperties :: fromConfiguration )
4243 .collect (Collectors .toList ());
4344 }
4445
4546 public List <ClusterProfileProperties > allClusterProfileProperties () {
46- return allClusterProfilePropertiesProperties ;
47+ return allClusterProfileProperties ;
4748 }
4849
4950 public static ServerPingRequest fromJSON (String json ) {
@@ -53,10 +54,23 @@ public static ServerPingRequest fromJSON(String json) {
5354 @ Override
5455 public String toString () {
5556 return "ServerPingRequest{" +
56- "allClusterProfilePropertiesProperties =" + allClusterProfilePropertiesProperties +
57+ "allClusterProfileProperties =" + allClusterProfileProperties +
5758 '}' ;
5859 }
5960
61+ @ Override
62+ public boolean equals (Object o ) {
63+ if (this == o ) return true ;
64+ if (o == null || getClass () != o .getClass ()) return false ;
65+ ServerPingRequest that = (ServerPingRequest ) o ;
66+ return Objects .equals (allClusterProfileProperties , that .allClusterProfileProperties );
67+ }
68+
69+ @ Override
70+ public int hashCode () {
71+ return Objects .hash (allClusterProfileProperties );
72+ }
73+
6074 public ServerPingRequestExecutor executor (Map <String , DockerContainers > clusterSpecificAgentInstances , PluginRequest pluginRequest ) {
6175 return new ServerPingRequestExecutor (this , clusterSpecificAgentInstances , pluginRequest );
6276 }
0 commit comments