2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.tr064.internal.soap;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.tr064.internal.dto.scpd.root.SCPDServiceType;
22 * The {@link SOAPRequest} is a wrapper for SOAP requests
24 * @author Jan N. Klug - Initial contribution
27 public class SOAPRequest {
28 public SCPDServiceType service;
29 public String soapAction;
30 public Map<String, String> arguments = Map.of();
32 public SOAPRequest(SCPDServiceType service, String soapAction) {
33 this.service = service;
34 this.soapAction = soapAction;
37 public SOAPRequest(SCPDServiceType service, String soapAction, Map<String, String> arguments) {
38 this.service = service;
39 this.soapAction = soapAction;
40 this.arguments = arguments;
44 public boolean equals(@Nullable Object o) {
48 if (o == null || getClass() != o.getClass()) {
51 SOAPRequest that = (SOAPRequest) o;
53 if (!service.equals(that.service)) {
56 if (!soapAction.equals(that.soapAction)) {
60 return arguments.equals(that.arguments);
64 public int hashCode() {
65 int result = service.hashCode();
66 result = 31 * result + soapAction.hashCode();
67 result = 31 * result + arguments.hashCode();
72 public String toString() {
73 return "SOAPRequest{" + "service=" + service + ", soapAction='" + soapAction + '\'' + ", arguments=" + arguments