2 * Copyright (c) 2015 Cisco Systems, Inc. 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
9 package org.opendaylight.netconf.sal.restconf.impl;
11 import java.util.List;
13 import org.opendaylight.yangtools.yang.common.QName;
15 public class WriterParameters {
16 private final String content;
17 private final Integer depth;
18 private final List<Set<QName>> fields;
19 private final boolean prettyPrint;
20 private final boolean tagged;
22 private WriterParameters(final WriterParametersBuilder builder) {
23 this.content = builder.content;
24 this.depth = builder.depth;
25 this.fields = builder.fields;
26 this.prettyPrint = builder.prettyPrint;
27 this.tagged = builder.tagged;
30 public String getContent() {
34 public Integer getDepth() {
38 public List<Set<QName>> getFields() {
42 public boolean isPrettyPrint() {
43 return this.prettyPrint;
46 public boolean isTagged() {
50 public static class WriterParametersBuilder {
51 private String content;
52 private Integer depth;
53 private List<Set<QName>> fields;
54 private boolean prettyPrint;
55 private boolean tagged;
57 public WriterParametersBuilder() {}
59 public WriterParametersBuilder setContent(final String content) {
60 this.content = content;
64 public WriterParametersBuilder setDepth(final int depth) {
69 public WriterParametersBuilder setFields(final List<Set<QName>> fields) {
74 public WriterParametersBuilder setPrettyPrint(final boolean prettyPrint) {
75 this.prettyPrint = prettyPrint;
79 public WriterParameters build() {
80 return new WriterParameters(this);
83 public void setTagged(final boolean tagged) {