// 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;

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 = "WindProto";
option java_package = "com.google.maps.weather.v1";
option objc_class_prefix = "GMWV1";
option php_namespace = "Google\\Geo\\Weather\\V1";

// Represents a set of wind properties.
message Wind {
  // The direction of the wind, the angle it is coming from.
  WindDirection direction = 1;

  // The speed of the wind.
  WindSpeed speed = 2;

  // The wind gust (sudden increase in the wind speed).
  WindSpeed gust = 3;
}

// Represents the direction from which the wind originates.
message WindDirection {
  // The direction of the wind in degrees (values from 0 to 360).
  optional int32 degrees = 1;

  // The code that represents the cardinal direction from which the wind is
  // blowing.
  CardinalDirection cardinal = 2;
}

// Represents the speed of the wind.
message WindSpeed {
  // The value of the wind speed.
  optional float value = 1;

  // The code that represents the unit used to measure the wind speed.
  SpeedUnit unit = 2;
}

// Represents a cardinal direction (including ordinal directions).
enum CardinalDirection {
  // The cardinal direction is unspecified.
  CARDINAL_DIRECTION_UNSPECIFIED = 0;

  // The north cardinal direction.
  NORTH = 1;

  // The north-northeast secondary intercardinal direction.
  NORTH_NORTHEAST = 2;

  // The northeast intercardinal direction.
  NORTHEAST = 3;

  // The east-northeast secondary intercardinal direction.
  EAST_NORTHEAST = 4;

  // The east cardinal direction.
  EAST = 5;

  // The east-southeast secondary intercardinal direction.
  EAST_SOUTHEAST = 6;

  // The southeast intercardinal direction.
  SOUTHEAST = 7;

  // The south-southeast secondary intercardinal direction.
  SOUTH_SOUTHEAST = 8;

  // The south cardinal direction.
  SOUTH = 9;

  // The south-southwest secondary intercardinal direction.
  SOUTH_SOUTHWEST = 10;

  // The southwest intercardinal direction.
  SOUTHWEST = 11;

  // The west-southwest secondary intercardinal direction.
  WEST_SOUTHWEST = 12;

  // The west cardinal direction.
  WEST = 13;

  // The west-northwest secondary intercardinal direction.
  WEST_NORTHWEST = 14;

  // The northwest intercardinal direction.
  NORTHWEST = 15;

  // The north-northwest secondary intercardinal direction.
  NORTH_NORTHWEST = 16;
}

// Represents the unit used to measure speed.
enum SpeedUnit {
  // The speed unit is unspecified.
  SPEED_UNIT_UNSPECIFIED = 0;

  // The speed is measured in kilometers per hour.
  KILOMETERS_PER_HOUR = 1;

  // The speed is measured in miles per hour.
  MILES_PER_HOUR = 2;
}
