2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.restconf.nb.rfc8040;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.eclipse.jdt.annotation.Nullable;
14 import org.opendaylight.restconf.api.query.ContentParam;
15 import org.opendaylight.restconf.api.query.DepthParam;
16 import org.opendaylight.restconf.api.query.FieldsParam;
17 import org.opendaylight.restconf.api.query.PrettyPrintParam;
18 import org.opendaylight.restconf.api.query.WithDefaultsParam;
19 import org.opendaylight.yangtools.concepts.Immutable;
22 * Parser and holder of query parameters from uriInfo for data and datastore read operations.
24 public record ReadDataParams(
25 @NonNull ContentParam content,
26 @Nullable DepthParam depth,
27 @Nullable FieldsParam fields,
28 @Nullable WithDefaultsParam withDefaults,
29 @Nullable PrettyPrintParam prettyPrint) implements Immutable {
30 private static final @NonNull ReadDataParams EMPTY =
31 new ReadDataParams(ContentParam.ALL, null, null, null, null);
33 public ReadDataParams {
34 requireNonNull(content);
37 public static @NonNull ReadDataParams empty() {