/* Copyright 2018 Telstra Open Source
 *
 *   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.
 */

package org.openkilda.northbound.dto.flows;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Value;

@Value
public class VerificationInput {
    @JsonProperty("timeout")
    private int timeoutMillis;

    @JsonCreator
    public VerificationInput(
            @JsonProperty("timeout") int timeoutMillis) {
        this.timeoutMillis = timeoutMillis;
    }
}

@@ -786,16 +786,44 @@
 Value;%0A%0A
+import java.util.Optional;%0A%0A
 @Value%0Ap
@@ -854,16 +854,69 @@
 Input %7B%0A
+    public static final int DEFAULT_TIMEOUT = 2000;%0A%0A
     @Jso
@@ -1052,19 +1052,23 @@
 meout%22) 
-i
+I
 nt
+eger
  timeout
@@ -1106,29 +1106,74 @@
 illis = 
-timeoutMillis
+Optional.ofNullable(timeoutMillis).orElse(DEFAULT_TIMEOUT)
 ;%0A    %7D%0A

Make timeout value optional in flow verification request