2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.vigicrues.internal.dto.opendatasoft;
15 import java.time.ZoneId;
16 import java.util.Arrays;
17 import java.util.Optional;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.eclipse.jdt.annotation.Nullable;
23 * The {@link Parameters} is the Java class used to map the JSON
24 * response to the webservice request.
26 * @author Gaƫl L'hopital - Initial contribution
29 public class Parameters {
30 private String[] dataset = {};
31 private String timezone = "";
33 private String format = "";
34 private @Nullable Refine refine;
35 private String[] facet = {};
37 public Optional<String> getDataset() {
38 return Arrays.stream(dataset).findFirst();
41 public ZoneId getTimezone() {
42 return ZoneId.of(timezone);
45 public int getRows() {
49 public String getFormat() {
53 public Optional<Refine> getRefine() {
54 Refine refine = this.refine;
56 return Optional.of(refine);
58 return Optional.empty();
61 public String[] getFacets() {