1858 lines
46 KiB
Python
1858 lines
46 KiB
Python
# generated by datamodel-codegen:
|
|
# filename: https://api.weather.gov/openapi.yaml
|
|
# timestamp: 2022-03-12T20:57:35+00:00
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import datetime
|
|
from enum import Enum
|
|
from typing import Any, Dict, List, Optional, Union
|
|
|
|
from pydantic import AnyUrl, BaseModel, Extra, Field, confloat, conint, constr
|
|
|
|
|
|
class Category(Enum):
|
|
Met = "Met"
|
|
Geo = "Geo"
|
|
Safety = "Safety"
|
|
Security = "Security"
|
|
Rescue = "Rescue"
|
|
Fire = "Fire"
|
|
Health = "Health"
|
|
Env = "Env"
|
|
Transport = "Transport"
|
|
Infra = "Infra"
|
|
CBRNE = "CBRNE"
|
|
Other = "Other"
|
|
|
|
|
|
class Response(Enum):
|
|
Shelter = "Shelter"
|
|
Evacuate = "Evacuate"
|
|
Prepare = "Prepare"
|
|
Execute = "Execute"
|
|
Avoid = "Avoid"
|
|
Monitor = "Monitor"
|
|
Assess = "Assess"
|
|
AllClear = "AllClear"
|
|
None_ = "None"
|
|
|
|
|
|
class Pagination(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
next: AnyUrl = Field(..., description="A link to the next set of alerts")
|
|
|
|
|
|
class AlertCollection(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
title: Optional[str] = Field(
|
|
None, description="A title describing the alert collection"
|
|
)
|
|
updated: Optional[datetime] = Field(
|
|
None, description="The last time a change occurred to this collection"
|
|
)
|
|
pagination: Optional[Pagination] = Field(
|
|
None, description="Links for retrieving more data"
|
|
)
|
|
|
|
|
|
class AlertCap(BaseModel):
|
|
pass
|
|
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
|
|
class AlertId(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: str = Field(..., description="The identifier of the alert message.")
|
|
|
|
|
|
class AlertCertainty(Enum):
|
|
Observed = "Observed"
|
|
Likely = "Likely"
|
|
Possible = "Possible"
|
|
Unlikely = "Unlikely"
|
|
Unknown = "Unknown"
|
|
|
|
|
|
class AlertMessageType(Enum):
|
|
Alert = "Alert"
|
|
Update = "Update"
|
|
Cancel = "Cancel"
|
|
Ack = "Ack"
|
|
Error = "Error"
|
|
|
|
|
|
class AlertSeverity(Enum):
|
|
Extreme = "Extreme"
|
|
Severe = "Severe"
|
|
Moderate = "Moderate"
|
|
Minor = "Minor"
|
|
Unknown = "Unknown"
|
|
|
|
|
|
class AlertStatus(Enum):
|
|
Actual = "Actual"
|
|
Exercise = "Exercise"
|
|
System = "System"
|
|
Test = "Test"
|
|
Draft = "Draft"
|
|
|
|
|
|
class AlertUrgency(Enum):
|
|
Immediate = "Immediate"
|
|
Expected = "Expected"
|
|
Future = "Future"
|
|
Past = "Past"
|
|
Unknown = "Unknown"
|
|
|
|
|
|
class Author(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
name: Optional[str] = None
|
|
|
|
|
|
class AlertXMLParameter(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
valueName: Optional[str] = None
|
|
value: Optional[str] = None
|
|
|
|
|
|
class Author1(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
name: Optional[str] = None
|
|
|
|
|
|
class BinaryFile(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: bytes
|
|
|
|
|
|
class GeometryString(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Optional[str] = Field(
|
|
None, description="A geometry represented in Well-Known Text (WKT) format."
|
|
)
|
|
|
|
|
|
class GeoJsonBoundingBox(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: List[float] = Field(
|
|
...,
|
|
description=(
|
|
"A GeoJSON bounding box. Please refer to IETF RFC 7946 for information on"
|
|
" the GeoJSON format."
|
|
),
|
|
min_items=4,
|
|
)
|
|
|
|
|
|
class GeoJsonCoordinate(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: List[float] = Field(
|
|
...,
|
|
description=(
|
|
"A GeoJSON coordinate. Please refer to IETF RFC 7946 for information on the"
|
|
" GeoJSON format."
|
|
),
|
|
min_items=2,
|
|
)
|
|
|
|
|
|
class Type(Enum):
|
|
Point = "Point"
|
|
|
|
|
|
class GeoJsonGeometryItem(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
type: Type
|
|
coordinates: GeoJsonCoordinate
|
|
bbox: Optional[GeoJsonBoundingBox] = None
|
|
|
|
|
|
class Type1(Enum):
|
|
LineString = "LineString"
|
|
|
|
|
|
class Type2(Enum):
|
|
Polygon = "Polygon"
|
|
|
|
|
|
class Type3(Enum):
|
|
MultiPoint = "MultiPoint"
|
|
|
|
|
|
class GeoJsonGeometryItem3(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
type: Type3
|
|
coordinates: List[GeoJsonCoordinate]
|
|
bbox: Optional[GeoJsonBoundingBox] = None
|
|
|
|
|
|
class Type4(Enum):
|
|
MultiLineString = "MultiLineString"
|
|
|
|
|
|
class Type5(Enum):
|
|
MultiPolygon = "MultiPolygon"
|
|
|
|
|
|
class Type6(Enum):
|
|
Feature = "Feature"
|
|
|
|
|
|
class Type7(Enum):
|
|
FeatureCollection = "FeatureCollection"
|
|
|
|
|
|
class GeoJsonLineString(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: List[GeoJsonCoordinate] = Field(
|
|
...,
|
|
description=(
|
|
"A GeoJSON line string. Please refer to IETF RFC 7946 for information on"
|
|
" the GeoJSON format."
|
|
),
|
|
min_items=2,
|
|
)
|
|
|
|
|
|
class GeoJsonPolygon(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: List[List[GeoJsonCoordinate]] = Field(
|
|
...,
|
|
description=(
|
|
"A GeoJSON polygon. Please refer to IETF RFC 7946 for information on the"
|
|
" GeoJSON format."
|
|
),
|
|
)
|
|
|
|
|
|
class _Type(Enum):
|
|
wx_Gridpoint = "wx:Gridpoint"
|
|
|
|
|
|
class Coverage(Enum):
|
|
areas = "areas"
|
|
brief = "brief"
|
|
chance = "chance"
|
|
definite = "definite"
|
|
few = "few"
|
|
frequent = "frequent"
|
|
intermittent = "intermittent"
|
|
isolated = "isolated"
|
|
likely = "likely"
|
|
numerous = "numerous"
|
|
occasional = "occasional"
|
|
patchy = "patchy"
|
|
periods = "periods"
|
|
scattered = "scattered"
|
|
slight_chance = "slight_chance"
|
|
widespread = "widespread"
|
|
|
|
|
|
class Weather1(Enum):
|
|
blowing_dust = "blowing_dust"
|
|
blowing_sand = "blowing_sand"
|
|
blowing_snow = "blowing_snow"
|
|
drizzle = "drizzle"
|
|
fog = "fog"
|
|
freezing_fog = "freezing_fog"
|
|
freezing_drizzle = "freezing_drizzle"
|
|
freezing_rain = "freezing_rain"
|
|
freezing_spray = "freezing_spray"
|
|
frost = "frost"
|
|
hail = "hail"
|
|
haze = "haze"
|
|
ice_crystals = "ice_crystals"
|
|
ice_fog = "ice_fog"
|
|
rain = "rain"
|
|
rain_showers = "rain_showers"
|
|
sleet = "sleet"
|
|
smoke = "smoke"
|
|
snow = "snow"
|
|
snow_showers = "snow_showers"
|
|
thunderstorms = "thunderstorms"
|
|
volcanic_ash = "volcanic_ash"
|
|
water_spouts = "water_spouts"
|
|
|
|
|
|
class Intensity(Enum):
|
|
very_light = "very_light"
|
|
light = "light"
|
|
moderate = "moderate"
|
|
heavy = "heavy"
|
|
|
|
|
|
class Attribute(Enum):
|
|
damaging_wind = "damaging_wind"
|
|
dry_thunderstorms = "dry_thunderstorms"
|
|
flooding = "flooding"
|
|
gusty_wind = "gusty_wind"
|
|
heavy_rain = "heavy_rain"
|
|
large_hail = "large_hail"
|
|
small_hail = "small_hail"
|
|
tornadoes = "tornadoes"
|
|
|
|
|
|
class ValueItem1(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
phenomenon: constr(regex=r"^\w{2}$") = Field(
|
|
...,
|
|
description=(
|
|
"Hazard code. This value will correspond to a P-VTEC phenomenon code as"
|
|
" defined in NWS Directive 10-1703.\n"
|
|
),
|
|
)
|
|
significance: constr(regex=r"^\w$") = Field(
|
|
...,
|
|
description=(
|
|
"Significance code. This value will correspond to a P-VTEC significance"
|
|
" code as defined in NWS Directive 10-1703.\nThis will most frequently be"
|
|
' "A" for a watch or "Y" for an advisory.\n'
|
|
),
|
|
)
|
|
event_number: int = Field(
|
|
...,
|
|
description=(
|
|
"Event number. If this hazard refers to a national or regional center"
|
|
" product (such as a Storm Prediction Center convective watch), this value"
|
|
" will be the sequence number of that product.\n"
|
|
),
|
|
)
|
|
|
|
|
|
class TemperatureUnit(Enum):
|
|
F = "F"
|
|
C = "C"
|
|
|
|
|
|
class TemperatureTrend(Enum):
|
|
rising = "rising"
|
|
falling = "falling"
|
|
|
|
|
|
class WindDirection(Enum):
|
|
N = "N"
|
|
NNE = "NNE"
|
|
NE = "NE"
|
|
ENE = "ENE"
|
|
E = "E"
|
|
ESE = "ESE"
|
|
SE = "SE"
|
|
SSE = "SSE"
|
|
S = "S"
|
|
SSW = "SSW"
|
|
SW = "SW"
|
|
WSW = "WSW"
|
|
W = "W"
|
|
WNW = "WNW"
|
|
NW = "NW"
|
|
NNW = "NNW"
|
|
|
|
|
|
class GridpointForecastUnits(Enum):
|
|
us = "us"
|
|
si = "si"
|
|
|
|
|
|
class ISO8601Duration(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: constr(
|
|
regex=r"^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$"
|
|
) = Field(..., description="A time duration in ISO 8601 format.", example="P2DT12H")
|
|
|
|
|
|
class ISO8601Interval(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Union[
|
|
constr(
|
|
regex=r"^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:?\d{2}?)|NOW)\/(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:?\d{2}?)|NOW)$"
|
|
),
|
|
constr(
|
|
regex=r"^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:?\d{2}?)|NOW)\/P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$"
|
|
),
|
|
constr(
|
|
regex=r"^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?\/(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:?\d{2}?)|NOW)$"
|
|
),
|
|
] = Field(
|
|
...,
|
|
description=(
|
|
"A time interval in ISO 8601 format. This can be one of:\n\n 1. Start"
|
|
" and end time\n 2. Start time and duration\n 3. Duration and end"
|
|
' time\nThe string "NOW" can also be used in place of a start/end time.\n'
|
|
),
|
|
)
|
|
|
|
|
|
class JsonLdContext(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Union[List, Dict[str, Any]]
|
|
|
|
|
|
class LandRegionCode(Enum):
|
|
AR = "AR"
|
|
CR = "CR"
|
|
ER = "ER"
|
|
PR = "PR"
|
|
SR = "SR"
|
|
WR = "WR"
|
|
|
|
|
|
class MarineAreaCode(Enum):
|
|
AM = "AM"
|
|
AN = "AN"
|
|
GM = "GM"
|
|
LC = "LC"
|
|
LE = "LE"
|
|
LH = "LH"
|
|
LM = "LM"
|
|
LO = "LO"
|
|
LS = "LS"
|
|
PH = "PH"
|
|
PK = "PK"
|
|
PM = "PM"
|
|
PS = "PS"
|
|
PZ = "PZ"
|
|
SL = "SL"
|
|
|
|
|
|
class MarineRegionCode(Enum):
|
|
AL = "AL"
|
|
AT = "AT"
|
|
GL = "GL"
|
|
GM = "GM"
|
|
PA = "PA"
|
|
PI = "PI"
|
|
|
|
|
|
class Intensity1(Enum):
|
|
light = "light"
|
|
heavy = "heavy"
|
|
|
|
|
|
class Modifier(Enum):
|
|
patches = "patches"
|
|
blowing = "blowing"
|
|
low_drifting = "low_drifting"
|
|
freezing = "freezing"
|
|
shallow = "shallow"
|
|
partial = "partial"
|
|
showers = "showers"
|
|
|
|
|
|
class Weather2(Enum):
|
|
fog_mist = "fog_mist"
|
|
dust_storm = "dust_storm"
|
|
dust = "dust"
|
|
drizzle = "drizzle"
|
|
funnel_cloud = "funnel_cloud"
|
|
fog = "fog"
|
|
smoke = "smoke"
|
|
hail = "hail"
|
|
snow_pellets = "snow_pellets"
|
|
haze = "haze"
|
|
ice_crystals = "ice_crystals"
|
|
ice_pellets = "ice_pellets"
|
|
dust_whirls = "dust_whirls"
|
|
spray = "spray"
|
|
rain = "rain"
|
|
sand = "sand"
|
|
snow_grains = "snow_grains"
|
|
snow = "snow"
|
|
squalls = "squalls"
|
|
sand_storm = "sand_storm"
|
|
thunderstorms = "thunderstorms"
|
|
unknown = "unknown"
|
|
volcanic_ash = "volcanic_ash"
|
|
|
|
|
|
class MetarPhenomenon(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
intensity: Intensity1
|
|
modifier: Modifier
|
|
weather: Weather2
|
|
rawString: str
|
|
inVicinity: Optional[bool] = None
|
|
|
|
|
|
class MetarSkyCoverage(Enum):
|
|
OVC = "OVC"
|
|
BKN = "BKN"
|
|
SCT = "SCT"
|
|
FEW = "FEW"
|
|
SKC = "SKC"
|
|
CLR = "CLR"
|
|
VV = "VV"
|
|
|
|
|
|
class NWSForecastOfficeId(Enum):
|
|
AKQ = "AKQ"
|
|
ALY = "ALY"
|
|
BGM = "BGM"
|
|
BOX = "BOX"
|
|
BTV = "BTV"
|
|
BUF = "BUF"
|
|
CAE = "CAE"
|
|
CAR = "CAR"
|
|
CHS = "CHS"
|
|
CLE = "CLE"
|
|
CTP = "CTP"
|
|
GSP = "GSP"
|
|
GYX = "GYX"
|
|
ILM = "ILM"
|
|
ILN = "ILN"
|
|
LWX = "LWX"
|
|
MHX = "MHX"
|
|
OKX = "OKX"
|
|
PBZ = "PBZ"
|
|
PHI = "PHI"
|
|
RAH = "RAH"
|
|
RLX = "RLX"
|
|
RNK = "RNK"
|
|
ABQ = "ABQ"
|
|
AMA = "AMA"
|
|
BMX = "BMX"
|
|
BRO = "BRO"
|
|
CRP = "CRP"
|
|
EPZ = "EPZ"
|
|
EWX = "EWX"
|
|
FFC = "FFC"
|
|
FWD = "FWD"
|
|
HGX = "HGX"
|
|
HUN = "HUN"
|
|
JAN = "JAN"
|
|
JAX = "JAX"
|
|
KEY = "KEY"
|
|
LCH = "LCH"
|
|
LIX = "LIX"
|
|
LUB = "LUB"
|
|
LZK = "LZK"
|
|
MAF = "MAF"
|
|
MEG = "MEG"
|
|
MFL = "MFL"
|
|
MLB = "MLB"
|
|
MOB = "MOB"
|
|
MRX = "MRX"
|
|
OHX = "OHX"
|
|
OUN = "OUN"
|
|
SHV = "SHV"
|
|
SJT = "SJT"
|
|
SJU = "SJU"
|
|
TAE = "TAE"
|
|
TBW = "TBW"
|
|
TSA = "TSA"
|
|
ABR = "ABR"
|
|
APX = "APX"
|
|
ARX = "ARX"
|
|
BIS = "BIS"
|
|
BOU = "BOU"
|
|
CYS = "CYS"
|
|
DDC = "DDC"
|
|
DLH = "DLH"
|
|
DMX = "DMX"
|
|
DTX = "DTX"
|
|
DVN = "DVN"
|
|
EAX = "EAX"
|
|
FGF = "FGF"
|
|
FSD = "FSD"
|
|
GID = "GID"
|
|
GJT = "GJT"
|
|
GLD = "GLD"
|
|
GRB = "GRB"
|
|
GRR = "GRR"
|
|
ICT = "ICT"
|
|
ILX = "ILX"
|
|
IND = "IND"
|
|
IWX = "IWX"
|
|
JKL = "JKL"
|
|
LBF = "LBF"
|
|
LMK = "LMK"
|
|
LOT = "LOT"
|
|
LSX = "LSX"
|
|
MKX = "MKX"
|
|
MPX = "MPX"
|
|
MQT = "MQT"
|
|
OAX = "OAX"
|
|
PAH = "PAH"
|
|
PUB = "PUB"
|
|
RIW = "RIW"
|
|
SGF = "SGF"
|
|
TOP = "TOP"
|
|
UNR = "UNR"
|
|
BOI = "BOI"
|
|
BYZ = "BYZ"
|
|
EKA = "EKA"
|
|
FGZ = "FGZ"
|
|
GGW = "GGW"
|
|
HNX = "HNX"
|
|
LKN = "LKN"
|
|
LOX = "LOX"
|
|
MFR = "MFR"
|
|
MSO = "MSO"
|
|
MTR = "MTR"
|
|
OTX = "OTX"
|
|
PDT = "PDT"
|
|
PIH = "PIH"
|
|
PQR = "PQR"
|
|
PSR = "PSR"
|
|
REV = "REV"
|
|
SEW = "SEW"
|
|
SGX = "SGX"
|
|
SLC = "SLC"
|
|
STO = "STO"
|
|
TFX = "TFX"
|
|
TWC = "TWC"
|
|
VEF = "VEF"
|
|
AER = "AER"
|
|
AFC = "AFC"
|
|
AFG = "AFG"
|
|
AJK = "AJK"
|
|
ALU = "ALU"
|
|
GUM = "GUM"
|
|
HPA = "HPA"
|
|
HFO = "HFO"
|
|
PPG = "PPG"
|
|
STU = "STU"
|
|
NH1 = "NH1"
|
|
NH2 = "NH2"
|
|
ONA = "ONA"
|
|
ONP = "ONP"
|
|
|
|
|
|
class NWSZoneID(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: constr(regex=r"^[A-Z]{2}[CZ]\d{3}$") = Field(
|
|
...,
|
|
description=(
|
|
"UGC identifier for a NWS forecast zone or county.\nThe first two letters"
|
|
" will correspond to either a state code or marine area code (see"
|
|
" #/components/schemas/StateTerritoryCode and"
|
|
" #/components/schemas/MarineAreaCode for lists of valid letter"
|
|
" combinations).\nThe third letter will be Z for public/fire zone or C for"
|
|
" county.\n"
|
|
),
|
|
)
|
|
|
|
|
|
class NWSZoneType(Enum):
|
|
land = "land"
|
|
marine = "marine"
|
|
forecast = "forecast"
|
|
public = "public"
|
|
coastal = "coastal"
|
|
offshore = "offshore"
|
|
fire = "fire"
|
|
county = "county"
|
|
|
|
|
|
class _Type1(Enum):
|
|
wx_ObservationStation = "wx:ObservationStation"
|
|
|
|
|
|
class _Type2(Enum):
|
|
wx_ObservationStation = "wx:ObservationStation"
|
|
|
|
|
|
class _Type3(Enum):
|
|
GovernmentOrganization = "GovernmentOrganization"
|
|
|
|
|
|
class _Type4(Enum):
|
|
PostalAddress = "PostalAddress"
|
|
|
|
|
|
class Address(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_type: Optional[_Type4] = Field(None, alias="@type")
|
|
streetAddress: Optional[str] = None
|
|
addressLocality: Optional[str] = None
|
|
addressRegion: Optional[str] = None
|
|
postalCode: Optional[str] = None
|
|
|
|
|
|
class Office(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_type: Optional[_Type3] = Field(None, alias="@type")
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
id: Optional[str] = None
|
|
name: Optional[str] = None
|
|
address: Optional[Address] = None
|
|
telephone: Optional[str] = None
|
|
faxNumber: Optional[str] = None
|
|
email: Optional[str] = None
|
|
sameAs: Optional[AnyUrl] = None
|
|
nwsRegion: Optional[str] = None
|
|
parentOrganization: Optional[AnyUrl] = None
|
|
responsibleCounties: Optional[List[AnyUrl]] = None
|
|
responsibleForecastZones: Optional[List[AnyUrl]] = None
|
|
responsibleFireZones: Optional[List[AnyUrl]] = None
|
|
approvedObservationStations: Optional[List[AnyUrl]] = None
|
|
|
|
|
|
class OfficeHeadline(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
id: Optional[str] = None
|
|
office: Optional[AnyUrl] = None
|
|
important: Optional[bool] = None
|
|
issuanceTime: Optional[datetime] = None
|
|
link: Optional[AnyUrl] = None
|
|
name: Optional[str] = None
|
|
title: Optional[str] = None
|
|
summary: Optional[str] = None
|
|
content: Optional[str] = None
|
|
|
|
|
|
class OfficeHeadlineCollection(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: JsonLdContext = Field(..., alias="@context")
|
|
_graph: List[OfficeHeadline] = Field(..., alias="@graph")
|
|
|
|
|
|
class _Type5(Enum):
|
|
wx_Point = "wx:Point"
|
|
|
|
|
|
class PointString(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: constr(regex=r"^(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)$")
|
|
|
|
|
|
class ProblemDetail(BaseModel):
|
|
class Config:
|
|
extra = Extra.allow
|
|
allow_mutation = False
|
|
|
|
type: AnyUrl = Field(
|
|
...,
|
|
description=(
|
|
"A URI reference (RFC 3986) that identifies the problem type. This is only"
|
|
" an identifier and is not necessarily a resolvable URL.\n"
|
|
),
|
|
example="urn:noaa:nws:api:UnexpectedProblem",
|
|
)
|
|
title: str = Field(
|
|
...,
|
|
description="A short, human-readable summary of the problem type.",
|
|
example="Unexpected Problem",
|
|
)
|
|
status: confloat(ge=100.0, le=999.0) = Field(
|
|
...,
|
|
description=(
|
|
"The HTTP status code (RFC 7231, Section 6) generated by the origin server"
|
|
" for this occurrence of the problem.\n"
|
|
),
|
|
example=500,
|
|
)
|
|
detail: str = Field(
|
|
...,
|
|
description=(
|
|
"A human-readable explanation specific to this occurrence of the problem."
|
|
),
|
|
example="An unexpected problem has occurred.",
|
|
)
|
|
instance: AnyUrl = Field(
|
|
...,
|
|
description=(
|
|
"A URI reference (RFC 3986) that identifies the specific occurrence of the"
|
|
" problem. This is only an identifier and is not necessarily a resolvable"
|
|
" URL.\n"
|
|
),
|
|
example="urn:noaa:nws:api:request:493c3a1d-f87e-407f-ae2c-24483f5aab63",
|
|
)
|
|
correlationId: str = Field(
|
|
...,
|
|
description=(
|
|
"A unique identifier for the request, used for NWS debugging purposes."
|
|
" Please include this identifier with any correspondence to help us"
|
|
" investigate your issue.\n"
|
|
),
|
|
example="493c3a1d-f87e-407f-ae2c-24483f5aab63",
|
|
)
|
|
|
|
|
|
class QualityControl(Enum):
|
|
Z = "Z"
|
|
C = "C"
|
|
S = "S"
|
|
V = "V"
|
|
X = "X"
|
|
Q = "Q"
|
|
G = "G"
|
|
B = "B"
|
|
T = "T"
|
|
|
|
|
|
class RegionCode(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Union[LandRegionCode, MarineRegionCode]
|
|
|
|
|
|
class StateTerritoryCode(Enum):
|
|
AL = "AL"
|
|
AK = "AK"
|
|
AS = "AS"
|
|
AR = "AR"
|
|
AZ = "AZ"
|
|
CA = "CA"
|
|
CO = "CO"
|
|
CT = "CT"
|
|
DE = "DE"
|
|
DC = "DC"
|
|
FL = "FL"
|
|
GA = "GA"
|
|
GU = "GU"
|
|
HI = "HI"
|
|
ID = "ID"
|
|
IL = "IL"
|
|
IN = "IN"
|
|
IA = "IA"
|
|
KS = "KS"
|
|
KY = "KY"
|
|
LA = "LA"
|
|
ME = "ME"
|
|
MD = "MD"
|
|
MA = "MA"
|
|
MI = "MI"
|
|
MN = "MN"
|
|
MS = "MS"
|
|
MO = "MO"
|
|
MT = "MT"
|
|
NE = "NE"
|
|
NV = "NV"
|
|
NH = "NH"
|
|
NJ = "NJ"
|
|
NM = "NM"
|
|
NY = "NY"
|
|
NC = "NC"
|
|
ND = "ND"
|
|
OH = "OH"
|
|
OK = "OK"
|
|
OR = "OR"
|
|
PA = "PA"
|
|
PR = "PR"
|
|
RI = "RI"
|
|
SC = "SC"
|
|
SD = "SD"
|
|
TN = "TN"
|
|
TX = "TX"
|
|
UT = "UT"
|
|
VT = "VT"
|
|
VI = "VI"
|
|
VA = "VA"
|
|
WA = "WA"
|
|
WV = "WV"
|
|
WI = "WI"
|
|
WY = "WY"
|
|
|
|
|
|
class TextProduct(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
id: Optional[str] = None
|
|
wmoCollectiveId: Optional[str] = None
|
|
issuingOffice: Optional[str] = None
|
|
issuanceTime: Optional[datetime] = None
|
|
productCode: Optional[str] = None
|
|
productName: Optional[str] = None
|
|
productText: Optional[str] = None
|
|
|
|
|
|
class TextProductCollection(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_graph: Optional[List[TextProduct]] = Field(None, alias="@graph")
|
|
|
|
|
|
class _GraphItem(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
productCode: str
|
|
productName: str
|
|
|
|
|
|
class TextProductTypeCollection(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_graph: Optional[List[_GraphItem]] = Field(None, alias="@graph")
|
|
|
|
|
|
class TextProductLocationCollection(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
locations: Optional[Dict[str, str]] = None
|
|
|
|
|
|
class UnitOfMeasure(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: constr(regex=r"^((wmo|uc|wmoUnit|nwsUnit):)?.*$") = Field(
|
|
...,
|
|
description=(
|
|
'A string denoting a unit of measure, expressed in the format "{unit}" or'
|
|
' "{namespace}:{unit}".\nUnits with the namespace "wmo" or "wmoUnit" are'
|
|
" defined in the World Meteorological Organization Codes Registry at"
|
|
" http://codes.wmo.int/common/unit and should be canonically resolvable to"
|
|
" http://codes.wmo.int/common/unit/{unit}.\nUnits with the namespace"
|
|
' "nwsUnit" are currently custom and do not align to any standard.\nUnits'
|
|
' with no namespace or the namespace "uc" are compliant with the Unified'
|
|
" Code for Units of Measure syntax defined at https://unitsofmeasure.org/."
|
|
" This also aligns with recent versions of the Geographic Markup Language"
|
|
" (GML) standard, the IWXXM standard, and OGC Observations and Measurements"
|
|
" v2.0 (ISO/DIS 19156).\nNamespaced units are considered deprecated. We"
|
|
" will be aligning API to use the same standards as GML/IWXXM in the"
|
|
" future.\n"
|
|
),
|
|
)
|
|
|
|
|
|
class _Type6(Enum):
|
|
wx_Zone = "wx:Zone"
|
|
|
|
|
|
class StateEnum(Enum):
|
|
_ = ""
|
|
|
|
|
|
class Zone(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
geometry: Optional[GeometryString] = None
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
_type: Optional[_Type6] = Field(None, alias="@type")
|
|
id: Optional[NWSZoneID] = None
|
|
type: Optional[NWSZoneType] = None
|
|
name: Optional[str] = None
|
|
effectiveDate: Optional[datetime] = None
|
|
expirationDate: Optional[datetime] = None
|
|
state: Optional[Union[StateTerritoryCode, StateEnum]] = None
|
|
cwa: Optional[List[NWSForecastOfficeId]] = None
|
|
forecastOffices: Optional[List[AnyUrl]] = None
|
|
timeZone: Optional[List[str]] = None
|
|
observationStations: Optional[List[AnyUrl]] = None
|
|
radarStation: Optional[str] = None
|
|
|
|
|
|
class ZoneJsonLd(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Zone
|
|
|
|
|
|
class Feature3(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Zone] = None
|
|
|
|
|
|
class ZoneCollectionJsonLd(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_graph: Optional[List[Zone]] = Field(None, alias="@graph")
|
|
|
|
|
|
class Period(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
number: int = Field(..., description="A sequential identifier number.")
|
|
name: str = Field(
|
|
...,
|
|
description="A textual description of the period.",
|
|
example="This Afternoon",
|
|
)
|
|
detailedForecast: str = Field(
|
|
..., description="A detailed textual forecast for the period."
|
|
)
|
|
|
|
|
|
class ZoneForecast(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
geometry: Optional[GeometryString] = None
|
|
zone: Optional[AnyUrl] = Field(
|
|
None, description="An API link to the zone this forecast is for."
|
|
)
|
|
updated: Optional[datetime] = Field(
|
|
None, description="The time this zone forecast product was published."
|
|
)
|
|
periods: Optional[List[Period]] = Field(
|
|
None, description="An array of forecast periods."
|
|
)
|
|
|
|
|
|
class ZoneForecastJsonLd(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: ZoneForecast
|
|
|
|
|
|
class Geocode(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
UGC: Optional[List[NWSZoneID]] = Field(
|
|
None, description="A list of NWS public zone or county identifiers."
|
|
)
|
|
SAME: Optional[List[constr(regex=r"^\d{6}$")]] = Field(
|
|
None,
|
|
description=(
|
|
"A list of SAME (Specific Area Message Encoding) codes for affected"
|
|
" counties."
|
|
),
|
|
)
|
|
|
|
|
|
class Reference(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_id: Optional[AnyUrl] = Field(
|
|
None, alias="@id", description="An API link to the prior alert."
|
|
)
|
|
identifier: Optional[AlertId] = None
|
|
sender: Optional[str] = Field(None, description="The sender of the prior alert.")
|
|
sent: Optional[datetime] = Field(
|
|
None, description="The time the prior alert was sent."
|
|
)
|
|
|
|
|
|
class Alert(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
id: Optional[AlertId] = None
|
|
areaDesc: Optional[str] = Field(
|
|
None, description="A textual description of the area affected by the alert."
|
|
)
|
|
geocode: Optional[Geocode] = Field(
|
|
None,
|
|
description=(
|
|
"Lists of codes for NWS public zones and counties affected by the alert."
|
|
),
|
|
)
|
|
affectedZones: Optional[List[AnyUrl]] = Field(
|
|
None,
|
|
description=(
|
|
"An array of API links for zones affected by the alert. This is an"
|
|
" API-specific extension field and is not part of the CAP specification.\n"
|
|
),
|
|
)
|
|
references: Optional[List[Reference]] = Field(
|
|
None, description="A list of prior alerts that this alert updates or replaces."
|
|
)
|
|
sent: Optional[datetime] = Field(
|
|
None, description="The time of the origination of the alert message."
|
|
)
|
|
effective: Optional[datetime] = Field(
|
|
None, description="The effective time of the information of the alert message."
|
|
)
|
|
onset: Optional[datetime] = Field(
|
|
None,
|
|
description=(
|
|
"The expected time of the beginning of the subject event of the alert"
|
|
" message."
|
|
),
|
|
)
|
|
expires: Optional[datetime] = Field(
|
|
None, description="The expiry time of the information of the alert message."
|
|
)
|
|
ends: Optional[datetime] = Field(
|
|
None,
|
|
description="The expected end time of the subject event of the alert message.",
|
|
)
|
|
status: Optional[AlertStatus] = None
|
|
messageType: Optional[AlertMessageType] = None
|
|
category: Optional[Category] = Field(
|
|
None,
|
|
description=(
|
|
"The code denoting the category of the subject event of the alert message."
|
|
),
|
|
)
|
|
severity: Optional[AlertSeverity] = None
|
|
certainty: Optional[AlertCertainty] = None
|
|
urgency: Optional[AlertUrgency] = None
|
|
event: Optional[str] = Field(
|
|
None,
|
|
description=(
|
|
"The text denoting the type of the subject event of the alert message."
|
|
),
|
|
)
|
|
sender: Optional[str] = Field(
|
|
None, description="Email address of the NWS webmaster."
|
|
)
|
|
senderName: Optional[str] = Field(
|
|
None, description="The text naming the originator of the alert message."
|
|
)
|
|
headline: Optional[str] = Field(
|
|
None, description="The text headline of the alert message."
|
|
)
|
|
description: Optional[str] = Field(
|
|
None, description="The text describing the subject event of the alert message."
|
|
)
|
|
instruction: Optional[str] = Field(
|
|
None,
|
|
description=(
|
|
"The text describing the recommended action to be taken by recipients of"
|
|
" the alert message.\n"
|
|
),
|
|
)
|
|
response: Optional[Response] = Field(
|
|
None,
|
|
description=(
|
|
"The code denoting the type of action recommended for the target"
|
|
" audience.\nThis corresponds to responseType in the CAP specification.\n"
|
|
),
|
|
)
|
|
parameters: Optional[Dict[str, List]] = Field(
|
|
None,
|
|
description=(
|
|
"System-specific additional parameters associated with the alert"
|
|
" message.\nThe keys in this object correspond to parameter definitions in"
|
|
" the NWS CAP specification.\n"
|
|
),
|
|
)
|
|
|
|
|
|
class Feature(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Alert] = None
|
|
|
|
|
|
class AlertCollectionJsonLd(AlertCollection):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_graph: Optional[List[Alert]] = Field(None, alias="@graph")
|
|
|
|
|
|
class AlertJsonLd(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_graph: Optional[List[Alert]] = Field(None, alias="@graph")
|
|
|
|
|
|
class AlertAtomEntry(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
id: Optional[str] = None
|
|
updated: Optional[str] = None
|
|
published: Optional[str] = None
|
|
author: Optional[Author] = None
|
|
summary: Optional[str] = None
|
|
event: Optional[str] = None
|
|
sent: Optional[str] = None
|
|
effective: Optional[str] = None
|
|
expires: Optional[str] = None
|
|
status: Optional[str] = None
|
|
msgType: Optional[str] = None
|
|
category: Optional[str] = None
|
|
urgency: Optional[str] = None
|
|
severity: Optional[str] = None
|
|
certainty: Optional[str] = None
|
|
areaDesc: Optional[str] = None
|
|
polygon: Optional[str] = None
|
|
geocode: Optional[List[AlertXMLParameter]] = None
|
|
parameter: Optional[List[AlertXMLParameter]] = None
|
|
|
|
|
|
class AlertAtomFeed(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
id: Optional[str] = None
|
|
generator: Optional[str] = None
|
|
updated: Optional[str] = None
|
|
author: Optional[Author1] = None
|
|
title: Optional[str] = None
|
|
entry: Optional[List[AlertAtomEntry]] = None
|
|
|
|
|
|
class AreaCode(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Union[StateTerritoryCode, MarineAreaCode] = Field(
|
|
..., description="State/territory codes and marine area codes"
|
|
)
|
|
|
|
|
|
class GeoJsonGeometryItem1(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
type: Type1
|
|
coordinates: GeoJsonLineString
|
|
bbox: Optional[GeoJsonBoundingBox] = None
|
|
|
|
|
|
class GeoJsonGeometryItem2(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
type: Type2
|
|
coordinates: GeoJsonPolygon
|
|
bbox: Optional[GeoJsonBoundingBox] = None
|
|
|
|
|
|
class GeoJsonGeometryItem4(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
type: Type4
|
|
coordinates: List[GeoJsonLineString]
|
|
bbox: Optional[GeoJsonBoundingBox] = None
|
|
|
|
|
|
class GeoJsonGeometryItem5(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
type: Type5
|
|
coordinates: List[GeoJsonPolygon]
|
|
bbox: Optional[GeoJsonBoundingBox] = None
|
|
|
|
|
|
class GeoJsonGeometry(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Optional[
|
|
Union[
|
|
GeoJsonGeometryItem,
|
|
GeoJsonGeometryItem1,
|
|
GeoJsonGeometryItem2,
|
|
GeoJsonGeometryItem3,
|
|
GeoJsonGeometryItem4,
|
|
GeoJsonGeometryItem5,
|
|
]
|
|
] = Field(
|
|
None,
|
|
description=(
|
|
"A GeoJSON geometry object. Please refer to IETF RFC 7946 for information"
|
|
" on the GeoJSON format."
|
|
),
|
|
)
|
|
|
|
|
|
class GeoJsonFeature(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
id: Optional[AnyUrl] = None
|
|
type: Type6
|
|
geometry: GeoJsonGeometry
|
|
properties: Dict[str, Any]
|
|
|
|
|
|
class GeoJsonFeatureCollection(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
type: Type7
|
|
features: List[GeoJsonFeature]
|
|
|
|
|
|
class Value1(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
validTime: ISO8601Interval
|
|
value: List[ValueItem1]
|
|
|
|
|
|
class Hazards(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
values: List[Value1]
|
|
|
|
|
|
class Value2(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
validTime: ISO8601Interval
|
|
value: float
|
|
|
|
|
|
class GridpointQuantitativeValueLayer(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
uom: Optional[UnitOfMeasure] = None
|
|
values: List[Value2]
|
|
|
|
|
|
class QuantitativeValue(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
value: Optional[float] = Field(None, description="A measured value")
|
|
maxValue: Optional[float] = Field(
|
|
None, description="The maximum value of a range of measured values"
|
|
)
|
|
minValue: Optional[float] = Field(
|
|
None, description="The minimum value of a range of measured values"
|
|
)
|
|
unitCode: Optional[UnitOfMeasure] = None
|
|
qualityControl: Optional[QualityControl] = Field(
|
|
None,
|
|
description=(
|
|
"For values in observation records, the quality control flag from the MADIS"
|
|
" system. The definitions of these flags can be found at"
|
|
" https://madis.ncep.noaa.gov/madis_sfc_qc_notes.shtml\n"
|
|
),
|
|
)
|
|
|
|
|
|
class RelativeLocation(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
city: Optional[str] = None
|
|
state: Optional[str] = None
|
|
distance: Optional[QuantitativeValue] = None
|
|
bearing: Optional[QuantitativeValue] = None
|
|
|
|
|
|
class RelativeLocationGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[RelativeLocation] = None
|
|
|
|
|
|
class RelativeLocationJsonLd(RelativeLocation):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
geometry: GeometryString
|
|
|
|
|
|
class ZoneGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Zone] = None
|
|
|
|
|
|
class ZoneCollectionGeoJson(GeoJsonFeatureCollection):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
features: Optional[List[Feature3]] = None
|
|
|
|
|
|
class ZoneForecastGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[ZoneForecast] = None
|
|
|
|
|
|
class AlertCollectionGeoJson(GeoJsonFeatureCollection, AlertCollection):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
features: Optional[List[Feature]] = None
|
|
|
|
|
|
class AlertGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Alert] = None
|
|
|
|
|
|
class ValueItem(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
coverage: Coverage
|
|
weather: Weather1
|
|
intensity: Intensity
|
|
visibility: QuantitativeValue
|
|
attributes: List[Attribute]
|
|
|
|
|
|
class Value(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
validTime: ISO8601Interval
|
|
value: List[ValueItem]
|
|
|
|
|
|
class Weather(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
values: List[Value]
|
|
|
|
|
|
class Gridpoint(BaseModel):
|
|
class Config:
|
|
extra = Extra.allow
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
geometry: Optional[GeometryString] = None
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
_type: Optional[_Type] = Field(None, alias="@type")
|
|
updateTime: Optional[datetime] = None
|
|
validTimes: Optional[ISO8601Interval] = None
|
|
elevation: Optional[QuantitativeValue] = None
|
|
forecastOffice: Optional[AnyUrl] = None
|
|
gridId: Optional[str] = None
|
|
gridX: Optional[conint(ge=0)] = None
|
|
gridY: Optional[conint(ge=0)] = None
|
|
weather: Optional[Weather] = None
|
|
hazards: Optional[Hazards] = None
|
|
|
|
|
|
class GridpointGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Gridpoint] = None
|
|
|
|
|
|
class GridpointJsonLd(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Gridpoint
|
|
|
|
|
|
class GridpointForecastPeriod(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
number: Optional[conint(ge=1)] = Field(
|
|
None, description="Sequential period number."
|
|
)
|
|
name: Optional[str] = Field(
|
|
None,
|
|
description=(
|
|
"A textual identifier for the period. This value will not be present for"
|
|
" hourly forecasts.\n"
|
|
),
|
|
example="Tuesday Night",
|
|
)
|
|
startTime: Optional[datetime] = Field(
|
|
None, description="The starting time that this forecast period is valid for."
|
|
)
|
|
endTime: Optional[datetime] = Field(
|
|
None, description="The ending time that this forecast period is valid for."
|
|
)
|
|
isDaytime: Optional[bool] = Field(
|
|
None, description="Indicates whether this period is daytime or nighttime."
|
|
)
|
|
temperature: Optional[Union[QuantitativeValue, int]] = Field(
|
|
None,
|
|
description=(
|
|
"High/low temperature for the period, depending on whether the period is"
|
|
" day or night.\nThis property as an integer value is deprecated. Future"
|
|
" versions will express this value as a quantitative value object. To make"
|
|
' use of the future standard format now, set the "forecast_temperature_qv"'
|
|
" feature flag on the request.\n"
|
|
),
|
|
)
|
|
temperatureUnit: Optional[TemperatureUnit] = Field(
|
|
None,
|
|
description=(
|
|
"The unit of the temperature value (Fahrenheit or Celsius).\nThis property"
|
|
" is deprecated. Future versions will indicate the unit within the"
|
|
" quantitative value object for the temperature property. To make use of"
|
|
' the future standard format now, set the "forecast_temperature_qv" feature'
|
|
" flag on the request.\n"
|
|
),
|
|
)
|
|
temperatureTrend: Optional[TemperatureTrend] = Field(
|
|
None,
|
|
description=(
|
|
"If not null, indicates a non-diurnal temperature trend for the period"
|
|
" (either rising temperature overnight, or falling temperature during the"
|
|
" day)\n"
|
|
),
|
|
)
|
|
windSpeed: Optional[Union[QuantitativeValue, str]] = Field(
|
|
None,
|
|
description=(
|
|
"Wind speed for the period.\nThis property as an string value is"
|
|
" deprecated. Future versions will express this value as a quantitative"
|
|
" value object. To make use of the future standard format now, set the"
|
|
' "forecast_wind_speed_qv" feature flag on the request.\n'
|
|
),
|
|
)
|
|
windGust: Optional[Union[QuantitativeValue, str]] = Field(
|
|
None,
|
|
description=(
|
|
"Peak wind gust for the period.\nThis property as an string value is"
|
|
" deprecated. Future versions will express this value as a quantitative"
|
|
" value object. To make use of the future standard format now, set the"
|
|
' "forecast_wind_speed_qv" feature flag on the request.\n'
|
|
),
|
|
)
|
|
windDirection: Optional[WindDirection] = Field(
|
|
None,
|
|
description=(
|
|
"The prevailing direction of the wind for the period, using a 16-point"
|
|
" compass."
|
|
),
|
|
)
|
|
icon: Optional[AnyUrl] = Field(
|
|
None, description="A link to an icon representing the forecast summary."
|
|
)
|
|
shortForecast: Optional[str] = Field(
|
|
None, description="A brief textual forecast summary for the period."
|
|
)
|
|
detailedForecast: Optional[str] = Field(
|
|
None, description="A detailed textual forecast for the period."
|
|
)
|
|
|
|
|
|
class CloudLayer(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
base: QuantitativeValue
|
|
amount: MetarSkyCoverage
|
|
|
|
|
|
class Observation(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
geometry: Optional[GeometryString] = None
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
_type: Optional[_Type1] = Field(None, alias="@type")
|
|
elevation: Optional[QuantitativeValue] = None
|
|
station: Optional[AnyUrl] = None
|
|
timestamp: Optional[datetime] = None
|
|
rawMessage: Optional[str] = None
|
|
textDescription: Optional[str] = None
|
|
icon: Optional[AnyUrl] = None
|
|
presentWeather: Optional[List[MetarPhenomenon]] = None
|
|
temperature: Optional[QuantitativeValue] = None
|
|
dewpoint: Optional[QuantitativeValue] = None
|
|
windDirection: Optional[QuantitativeValue] = None
|
|
windSpeed: Optional[QuantitativeValue] = None
|
|
windGust: Optional[QuantitativeValue] = None
|
|
barometricPressure: Optional[QuantitativeValue] = None
|
|
seaLevelPressure: Optional[QuantitativeValue] = None
|
|
visibility: Optional[QuantitativeValue] = None
|
|
maxTemperatureLast24Hours: Optional[QuantitativeValue] = None
|
|
minTemperatureLast24Hours: Optional[QuantitativeValue] = None
|
|
precipitationLastHour: Optional[QuantitativeValue] = None
|
|
precipitationLast3Hours: Optional[QuantitativeValue] = None
|
|
precipitationLast6Hours: Optional[QuantitativeValue] = None
|
|
relativeHumidity: Optional[QuantitativeValue] = None
|
|
windChill: Optional[QuantitativeValue] = None
|
|
heatIndex: Optional[QuantitativeValue] = None
|
|
cloudLayers: Optional[List[CloudLayer]] = None
|
|
|
|
|
|
class ObservationGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Observation] = None
|
|
|
|
|
|
class ObservationJsonLd(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
__root__: Observation
|
|
|
|
|
|
class Feature1(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Observation] = None
|
|
|
|
|
|
class ObservationCollectionGeoJson(GeoJsonFeatureCollection):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
features: Optional[List[Feature1]] = None
|
|
|
|
|
|
class ObservationCollectionJsonLd(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_graph: Optional[List[Observation]] = Field(None, alias="@graph")
|
|
|
|
|
|
class ObservationStation(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
geometry: Optional[GeometryString] = None
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
_type: Optional[_Type2] = Field(None, alias="@type")
|
|
elevation: Optional[QuantitativeValue] = None
|
|
stationIdentifier: Optional[str] = None
|
|
name: Optional[str] = None
|
|
timeZone: Optional[str] = None
|
|
forecast: Optional[AnyUrl] = Field(
|
|
None,
|
|
description="A link to the NWS public forecast zone containing this station.",
|
|
)
|
|
county: Optional[AnyUrl] = Field(
|
|
None, description="A link to the NWS county zone containing this station."
|
|
)
|
|
fireWeatherZone: Optional[AnyUrl] = Field(
|
|
None,
|
|
description=(
|
|
"A link to the NWS fire weather forecast zone containing this station."
|
|
),
|
|
)
|
|
|
|
|
|
class ObservationStationGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[ObservationStation] = None
|
|
|
|
|
|
class ObservationStationJsonLd(ObservationStation):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_context: JsonLdContext = Field(..., alias="@context")
|
|
geometry: GeometryString
|
|
|
|
|
|
class Feature2(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[ObservationStation] = None
|
|
|
|
|
|
class ObservationStationCollectionGeoJson(GeoJsonFeatureCollection):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
features: Optional[List[Feature2]] = None
|
|
observationStations: Optional[List[AnyUrl]] = None
|
|
|
|
|
|
class ObservationStationCollectionJsonLd(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
_graph: Optional[List[ObservationStation]] = Field(None, alias="@graph")
|
|
observationStations: Optional[List[AnyUrl]] = None
|
|
|
|
|
|
class Point(BaseModel):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
geometry: Optional[GeometryString] = None
|
|
_id: Optional[AnyUrl] = Field(None, alias="@id")
|
|
_type: Optional[_Type5] = Field(None, alias="@type")
|
|
cwa: Optional[NWSForecastOfficeId] = None
|
|
forecastOffice: Optional[AnyUrl] = None
|
|
gridId: Optional[NWSForecastOfficeId] = None
|
|
gridX: Optional[conint(ge=0)] = None
|
|
gridY: Optional[conint(ge=0)] = None
|
|
forecast: Optional[AnyUrl] = None
|
|
forecastHourly: Optional[AnyUrl] = None
|
|
forecastGridData: Optional[AnyUrl] = None
|
|
observationStations: Optional[AnyUrl] = None
|
|
relativeLocation: Optional[
|
|
Union[RelativeLocationGeoJson, RelativeLocationJsonLd]
|
|
] = None
|
|
forecastZone: Optional[AnyUrl] = None
|
|
county: Optional[AnyUrl] = None
|
|
fireWeatherZone: Optional[AnyUrl] = None
|
|
timeZone: Optional[str] = None
|
|
radarStation: Optional[str] = None
|
|
|
|
|
|
class PointGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[Point] = None
|
|
|
|
|
|
class PointJsonLd(Point):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_context: JsonLdContext = Field(..., alias="@context")
|
|
geometry: GeometryString
|
|
|
|
|
|
class GridpointForecast(BaseModel):
|
|
class Config:
|
|
extra = Extra.forbid
|
|
allow_mutation = False
|
|
|
|
_context: Optional[JsonLdContext] = Field(None, alias="@context")
|
|
geometry: Optional[GeometryString] = None
|
|
units: Optional[GridpointForecastUnits] = None
|
|
forecastGenerator: Optional[str] = Field(
|
|
None,
|
|
description=(
|
|
"The internal generator class used to create the forecast text (used for"
|
|
" NWS debugging)."
|
|
),
|
|
)
|
|
generatedAt: Optional[datetime] = Field(
|
|
None, description="The time this forecast data was generated."
|
|
)
|
|
updateTime: Optional[datetime] = Field(
|
|
None,
|
|
description=(
|
|
"The last update time of the data this forecast was generated from."
|
|
),
|
|
)
|
|
updated: Optional[datetime] = Field(
|
|
None, description="This property is deprecated (use updateTime instead)."
|
|
)
|
|
validTimes: Optional[ISO8601Interval] = None
|
|
elevation: Optional[QuantitativeValue] = None
|
|
periods: Optional[List[GridpointForecastPeriod]] = Field(
|
|
None, description="An array of forecast periods."
|
|
)
|
|
|
|
|
|
class GridpointForecastGeoJson(GeoJsonFeature):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
properties: Optional[GridpointForecast] = None
|
|
|
|
|
|
class GridpointForecastJsonLd(GridpointForecast):
|
|
class Config:
|
|
allow_mutation = False
|
|
|
|
_context: JsonLdContext = Field(..., alias="@context")
|
|
geometry: GeometryString
|