// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.maps.weather.v1;

import "google/maps/weather/v1/air_pressure.proto";
import "google/maps/weather/v1/ice.proto";
import "google/maps/weather/v1/precipitation.proto";
import "google/maps/weather/v1/temperature.proto";
import "google/maps/weather/v1/visibility.proto";
import "google/maps/weather/v1/weather_condition.proto";
import "google/maps/weather/v1/wind.proto";
import "google/type/datetime.proto";
import "google/type/interval.proto";

option csharp_namespace = "Google.Geo.Weather.V1";
option go_package = "cloud.google.com/go/maps/weather/apiv1/weatherpb;weatherpb";
option java_multiple_files = true;
option java_outer_classname = "ForecastHourProto";
option java_package = "com.google.maps.weather.v1";
option objc_class_prefix = "GMWV1";
option php_namespace = "Google\\Geo\\Weather\\V1";

// Represents an hourly forecast record at a given location.
message ForecastHour {
  // The one hour interval (in UTC time) this forecast data is valid for (the
  // timestamps are rounded down to the closest hour).
  google.type.Interval interval = 1;

  // The local date and time in the time zone of the location (civil time) which
  // this hourly forecast is calculated for. This field may be used for display
  // purposes on the client.
  // Note: this date will consist of the year, month, day, hour and offset from
  // UTC.
  google.type.DateTime display_date_time = 2;

  // True if this hour is between the local sunrise (inclusive) and sunset
  // (exclusive) times. Otherwise, it is nighttime (between the sunset and the
  // next sunrise).
  // Note: this hour will be considered as daytime or nighttime if the interval
  // intersects with the local sunrise and sunset times respectively (e.g.: if
  // the interval is from 5am to 6am and sunrise is at 5:59am, then is_daytime
  // will be true).
  optional bool is_daytime = 3;

  // The foreacasted weather condition.
  WeatherCondition weather_condition = 4;

  // The forecasted temperature.
  Temperature temperature = 5;

  // The measure of how the temperature will feel like at the requested
  // location.
  Temperature feels_like_temperature = 6;

  // The forecasted dew point temperature.
  Temperature dew_point = 7;

  // The forecasted heat index temperature.
  Temperature heat_index = 8;

  // The forecasted wind chill, air temperature exposed on the skin.
  Temperature wind_chill = 9;

  // The forecasted wet bulb temperature, lowest temperature achievable by
  // evaporating water.
  Temperature wet_bulb_temperature = 10;

  // The forecasted percent of relative humidity (values from 0 to 100).
  optional int32 relative_humidity = 11;

  // The forecasted ultraviolet (UV) index.
  optional int32 uv_index = 12;

  // The forecasted precipitation probability and amount of precipitation
  // accumulated over the last hour.
  Precipitation precipitation = 13;

  // The forecasted thunderstorm probability (values from 0 to 100).
  optional int32 thunderstorm_probability = 14;

  // The forecasted air pressure conditions.
  AirPressure air_pressure = 15;

  // The forecasted wind conditions.
  Wind wind = 16;

  // The forecasted visibility.
  Visibility visibility = 17;

  // The forecasted percentage of the sky covered by clouds (values from 0 to
  // 100).
  optional int32 cloud_cover = 18;

  // The forecasted ice thickness.
  IceThickness ice_thickness = 19;
}
