Separate out ReadDataParams
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / StopTimeParameter.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.restconf.nb.rfc8040;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
12
13 /**
14  * This class represents a {@code stop-time} parameter as defined in
15  * <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-4.8.8">RFC8040 section 4.8.8</a>.
16  */
17 public final class StopTimeParameter extends AbstractReplayParameter {
18     private StopTimeParameter(final DateAndTime value) {
19         super(value);
20     }
21
22     public static @NonNull StopTimeParameter of(final DateAndTime value) {
23         return new StopTimeParameter(value);
24     }
25
26     public static @NonNull String uriName() {
27         return "stop-time";
28     }
29
30     public static @NonNull StopTimeParameter forUriValue(final String uriValue) {
31         return of(new DateAndTime(uriValue));
32     }
33 }