// 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/celestial_events.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/weather_condition.proto";
import "google/maps/weather/v1/wind.proto";
import "google/type/date.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 = "ForecastDayProto";
option java_package = "com.google.maps.weather.v1";
option objc_class_prefix = "GMWV1";
option php_namespace = "Google\\Geo\\Weather\\V1";

// Represents a daily forecast record at a given location.
message ForecastDay {
  // The UTC time interval when this forecasted day is starts (inclusive) and
  // ends (exclusive).
  // Note: a day starts at 7am and ends at 7am next day, local time.
  // For example: If the local time zone is UTC-7, then the interval will start
  // at the time `14:00:00.000Z` and end at the same hour the next day.
  google.type.Interval interval = 1;

  // The local date in the time zone of the location (civil time) which this
  // daily forecast is calculated for. This field may be used for display
  // purposes on the client.
  google.type.Date display_date = 2;

  // The forecasted weather conditions for the daytime part of the day (7am to
  // 7pm local time).
  ForecastDayPart daytime_forecast = 3;

  // The forecasted weather conditions for the nighttime part of the day (7pm to
  // 7am next day, local time).
  ForecastDayPart nighttime_forecast = 4;

  // The maximum (high) temperature throughout the day.
  Temperature max_temperature = 5;

  // The minimum (low) temperature throughout the day.
  Temperature min_temperature = 6;

  // The maximum (high) feels-like temperature throughout the day.
  Temperature feels_like_max_temperature = 7;

  // The minimum (low) feels-like temperature throughout the day.
  Temperature feels_like_min_temperature = 8;

  // The maximum heat index temperature throughout the day.
  Temperature max_heat_index = 11;

  // The events related to the sun (e.g. sunrise, sunset).
  SunEvents sun_events = 9;

  // The events related to the moon (e.g. moonrise, moonset).
  MoonEvents moon_events = 10;
}

// Represents a forecast record for a part of the day.
message ForecastDayPart {
  // The UTC date and time when this part of the day starts (inclusive) and ends
  // (exclusive).
  // Note: a part of a day starts at 7am and ends at 7pm the same day, local
  // time. For example: If the local time zone is UTC-7, then the daytime
  // interval will start at the time `14:00:00.000Z` and end at `02:00:00.000Z`
  // the next day and the nighttime interval will start at `02:00:00.000Z` the
  // next day and end at `14:00:00.000Z` that same day.
  google.type.Interval interval = 1;

  // The forecasted weather condition.
  WeatherCondition weather_condition = 2;

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

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

  // The forecasted precipitation.
  Precipitation precipitation = 5;

  // The average thunderstorm probability.
  optional int32 thunderstorm_probability = 6;

  // The average wind direction and maximum speed and gust.
  Wind wind = 7;

  // Average cloud cover percent.
  optional int32 cloud_cover = 8;

  // The accumulated amount of ice for the part of the day.
  IceThickness ice_thickness = 9;
}
