2 * Copyright (c) 2010-2024 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.openweathermap.internal.dto.base;
15 import org.eclipse.jdt.annotation.Nullable;
17 import com.google.gson.annotations.SerializedName;
20 * Generated Plain Old Java Objects class for {@link Precipitation} from JSON.
22 * @author Christoph Weitkamp - Initial contribution
24 public class Precipitation {
26 private @Nullable Double oneHour;
28 private @Nullable Double threeHours;
30 public @Nullable Double get1h() {
34 public @Nullable Double get3h() {
38 public Double getVolume() {
39 return oneHour != null ? oneHour : threeHours != null ? threeHours / 3 : 0;