/*
 * #%L
 * %%
 * Copyright (C) 2020 BMW Car IT GmbH
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package io.joynr.capabilities;

import io.joynr.proxy.CallbackWithModeledError;
import joynr.types.DiscoveryError;
import joynr.types.GlobalDiscoveryEntry;

public class GlobalAddRemoveQueueEntry {
    public enum MODE {
        ADD, REMOVE
    }

    public GlobalAddRemoveQueueEntry(CallbackWithModeledError<Void, DiscoveryError> callback,
                                     GlobalDiscoveryEntry globalDiscoveryEntry,
                                     String[] gbids) {
        mode = MODE.ADD;
        this.callback = callback;
        this.globalDiscoveryEntry = globalDiscoveryEntry;
        this.gbids = gbids;
        this.participantId = "";
    }

    public GlobalAddRemoveQueueEntry(CallbackWithModeledError<Void, DiscoveryError> callback, String participantId) {
        mode = MODE.REMOVE;
        this.callback = callback;
        this.participantId = participantId;
        this.globalDiscoveryEntry = null;
        this.gbids = null;
    }

    public final MODE mode;
    public final CallbackWithModeledError<Void, DiscoveryError> callback;
    public final String participantId;
    public final GlobalDiscoveryEntry globalDiscoveryEntry;
    public final String[] gbids;
}

@@ -1042,16 +1042,72 @@
 yEntry,%0A
+                                     long expiryDateMs,%0A
         
@@ -1149,24 +1149,24 @@
 %5B%5D gbids) %7B%0A
-
         mode
@@ -1266,24 +1266,66 @@
 overyEntry;%0A
+        this.expiryDateMs = expiryDateMs;%0A
         this
@@ -1642,24 +1642,56 @@
 try = null;%0A
+        this.expiryDateMs = 0L;%0A
         this
@@ -1909,24 +1909,24 @@
 overyEntry;%0A
-
     public f
@@ -1946,10 +1946,46 @@
  gbids;%0A
+    public final long expiryDateMs;%0A
 %7D%0A

Add expiryDateMs to GlobalAddRemoveQueueEntry for add