Introduce HttpStatusCode
[netconf.git] / protocol / restconf-api / src / main / java / org / opendaylight / restconf / api / FormatParameters.java
1 /*
2  * Copyright (c) 2024 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.api;
9
10 import static java.util.Objects.requireNonNull;
11
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.restconf.api.query.PrettyPrintParam;
14 import org.opendaylight.restconf.api.query.RestconfQueryParam;
15 import org.opendaylight.yangtools.concepts.Immutable;
16
17 /**
18  * The set of {@link RestconfQueryParam}s governing output formatting.
19  *
20  * @param prettyPrint the {@link PrettyPrintParam} parameter
21  */
22 @NonNullByDefault
23 public record FormatParameters(PrettyPrintParam prettyPrint) implements Immutable {
24     public static final FormatParameters COMPACT = new FormatParameters(PrettyPrintParam.FALSE);
25     public static final FormatParameters PRETTY = new FormatParameters(PrettyPrintParam.TRUE);
26
27     /**
28      * Return the {@link PrettyPrintParam} parameter.
29      */
30     public FormatParameters {
31         requireNonNull(prettyPrint);
32     }
33 }