Skip to content

Commit

Permalink
smaller fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-zippenfenig committed Oct 23, 2023
1 parent 23cbc40 commit ae72a79
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 31 deletions.
9 changes: 5 additions & 4 deletions flatbuffers/openmeteo_sdk.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ enum Model: byte {
EC_Earth3P_HR,
MPI_ESM1_2_XR,
NICAM16_8S,
cams_europe,
cams_global
}

enum Variable: byte {
Expand Down Expand Up @@ -177,7 +179,7 @@ enum Variable: byte {
swell_wave_peak_period,
swell_wave_direction,
pm10,
pm2_5,
pm2p5,
dust,
aerosol_optical_depth,
carbon_monoxide,
Expand All @@ -192,13 +194,13 @@ enum Variable: byte {
olive_pollen,
ragweed_pollen,
european_aqi,
european_aqi_pm2_5,
european_aqi_pm2p5,
european_aqi_pm10,
european_aqi_no2,
european_aqi_o3,
european_aqi_so2,
us_aqi,
us_aqi_pm2_5,
us_aqi_pm2p5,
us_aqi_pm10,
us_aqi_no2,
us_aqi_o3,
Expand Down Expand Up @@ -254,7 +256,6 @@ table ApiResponse {
current: SeriesAndTime;
daily: SeriesAndTime;
hourly: SeriesAndTime;
three_hourly: SeriesAndTime;
six_hourly: SeriesAndTime;
minutely_15: SeriesAndTime;
}
Expand Down
2 changes: 2 additions & 0 deletions python/openmeteo_sdk/Model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ class Model(Enum):
EC_Earth3P_HR = 46
MPI_ESM1_2_XR = 47
NICAM16_8S = 48
cams_europe = 49
cams_global = 50
6 changes: 3 additions & 3 deletions python/openmeteo_sdk/Variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Variable(Enum):
swell_wave_peak_period = 69
swell_wave_direction = 70
pm10 = 71
pm2_5 = 72
pm2p5 = 72
dust = 73
aerosol_optical_depth = 74
carbon_monoxide = 75
Expand All @@ -92,13 +92,13 @@ class Variable(Enum):
olive_pollen = 84
ragweed_pollen = 85
european_aqi = 86
european_aqi_pm2_5 = 87
european_aqi_pm2p5 = 87
european_aqi_pm10 = 88
european_aqi_no2 = 89
european_aqi_o3 = 90
european_aqi_so2 = 91
us_aqi = 92
us_aqi_pm2_5 = 93
us_aqi_pm2p5 = 93
us_aqi_pm10 = 94
us_aqi_no2 = 95
us_aqi_o3 = 96
Expand Down
22 changes: 9 additions & 13 deletions swift/Sources/OpenMeteoSdk/openmeteo_sdk_generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ public enum openmeteo_sdk_Model: Int8, Enum, Verifiable {
case ecEarth3pHr = 46
case mpiEsm12Xr = 47
case nicam168s = 48
case camsEurope = 49
case camsGlobal = 50

public static var max: openmeteo_sdk_Model { return .nicam168s }
public static var max: openmeteo_sdk_Model { return .camsGlobal }
public static var min: openmeteo_sdk_Model { return .undefined }
}

Expand Down Expand Up @@ -190,7 +192,7 @@ public enum openmeteo_sdk_Variable: Int8, Enum, Verifiable {
case swellWavePeakPeriod = 69
case swellWaveDirection = 70
case pm10 = 71
case pm25 = 72
case pm2p5 = 72
case dust = 73
case aerosolOpticalDepth = 74
case carbonMonoxide = 75
Expand All @@ -205,13 +207,13 @@ public enum openmeteo_sdk_Variable: Int8, Enum, Verifiable {
case olivePollen = 84
case ragweedPollen = 85
case europeanAqi = 86
case europeanAqiPm25 = 87
case europeanAqiPm2p5 = 87
case europeanAqiPm10 = 88
case europeanAqiNo2 = 89
case europeanAqiO3 = 90
case europeanAqiSo2 = 91
case usAqi = 92
case usAqiPm25 = 93
case usAqiPm2p5 = 93
case usAqiPm10 = 94
case usAqiNo2 = 95
case usAqiO3 = 96
Expand Down Expand Up @@ -421,9 +423,8 @@ public struct openmeteo_sdk_ApiResponse: FlatBufferObject, Verifiable {
case current = 22
case daily = 24
case hourly = 26
case threeHourly = 28
case sixHourly = 30
case minutely15 = 32
case sixHourly = 28
case minutely15 = 30
var v: Int32 { Int32(self.rawValue) }
var p: VOffset { self.rawValue }
}
Expand All @@ -442,10 +443,9 @@ public struct openmeteo_sdk_ApiResponse: FlatBufferObject, Verifiable {
public var current: openmeteo_sdk_SeriesAndTime? { let o = _accessor.offset(VTOFFSET.current.v); return o == 0 ? nil : openmeteo_sdk_SeriesAndTime(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
public var daily: openmeteo_sdk_SeriesAndTime? { let o = _accessor.offset(VTOFFSET.daily.v); return o == 0 ? nil : openmeteo_sdk_SeriesAndTime(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
public var hourly: openmeteo_sdk_SeriesAndTime? { let o = _accessor.offset(VTOFFSET.hourly.v); return o == 0 ? nil : openmeteo_sdk_SeriesAndTime(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
public var threeHourly: openmeteo_sdk_SeriesAndTime? { let o = _accessor.offset(VTOFFSET.threeHourly.v); return o == 0 ? nil : openmeteo_sdk_SeriesAndTime(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
public var sixHourly: openmeteo_sdk_SeriesAndTime? { let o = _accessor.offset(VTOFFSET.sixHourly.v); return o == 0 ? nil : openmeteo_sdk_SeriesAndTime(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
public var minutely15: openmeteo_sdk_SeriesAndTime? { let o = _accessor.offset(VTOFFSET.minutely15.v); return o == 0 ? nil : openmeteo_sdk_SeriesAndTime(_accessor.bb, o: _accessor.indirect(o + _accessor.postion)) }
public static func startApiResponse(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 15) }
public static func startApiResponse(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 14) }
public static func add(latitude: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: latitude, def: 0.0, at: VTOFFSET.latitude.p) }
public static func add(longitude: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: longitude, def: 0.0, at: VTOFFSET.longitude.p) }
public static func add(elevation: Float32, _ fbb: inout FlatBufferBuilder) { fbb.add(element: elevation, def: 0.0, at: VTOFFSET.elevation.p) }
Expand All @@ -458,7 +458,6 @@ public struct openmeteo_sdk_ApiResponse: FlatBufferObject, Verifiable {
public static func add(current: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: current, at: VTOFFSET.current.p) }
public static func add(daily: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: daily, at: VTOFFSET.daily.p) }
public static func add(hourly: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: hourly, at: VTOFFSET.hourly.p) }
public static func add(threeHourly: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: threeHourly, at: VTOFFSET.threeHourly.p) }
public static func add(sixHourly: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: sixHourly, at: VTOFFSET.sixHourly.p) }
public static func add(minutely15: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: minutely15, at: VTOFFSET.minutely15.p) }
public static func endApiResponse(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
Expand All @@ -476,7 +475,6 @@ public struct openmeteo_sdk_ApiResponse: FlatBufferObject, Verifiable {
currentOffset current: Offset = Offset(),
dailyOffset daily: Offset = Offset(),
hourlyOffset hourly: Offset = Offset(),
threeHourlyOffset threeHourly: Offset = Offset(),
sixHourlyOffset sixHourly: Offset = Offset(),
minutely15Offset minutely15: Offset = Offset()
) -> Offset {
Expand All @@ -493,7 +491,6 @@ public struct openmeteo_sdk_ApiResponse: FlatBufferObject, Verifiable {
openmeteo_sdk_ApiResponse.add(current: current, &fbb)
openmeteo_sdk_ApiResponse.add(daily: daily, &fbb)
openmeteo_sdk_ApiResponse.add(hourly: hourly, &fbb)
openmeteo_sdk_ApiResponse.add(threeHourly: threeHourly, &fbb)
openmeteo_sdk_ApiResponse.add(sixHourly: sixHourly, &fbb)
openmeteo_sdk_ApiResponse.add(minutely15: minutely15, &fbb)
return openmeteo_sdk_ApiResponse.endApiResponse(&fbb, start: __start)
Expand All @@ -513,7 +510,6 @@ public struct openmeteo_sdk_ApiResponse: FlatBufferObject, Verifiable {
try _v.visit(field: VTOFFSET.current.p, fieldName: "current", required: false, type: ForwardOffset<openmeteo_sdk_SeriesAndTime>.self)
try _v.visit(field: VTOFFSET.daily.p, fieldName: "daily", required: false, type: ForwardOffset<openmeteo_sdk_SeriesAndTime>.self)
try _v.visit(field: VTOFFSET.hourly.p, fieldName: "hourly", required: false, type: ForwardOffset<openmeteo_sdk_SeriesAndTime>.self)
try _v.visit(field: VTOFFSET.threeHourly.p, fieldName: "threeHourly", required: false, type: ForwardOffset<openmeteo_sdk_SeriesAndTime>.self)
try _v.visit(field: VTOFFSET.sixHourly.p, fieldName: "sixHourly", required: false, type: ForwardOffset<openmeteo_sdk_SeriesAndTime>.self)
try _v.visit(field: VTOFFSET.minutely15.p, fieldName: "minutely15", required: false, type: ForwardOffset<openmeteo_sdk_SeriesAndTime>.self)
_v.finish()
Expand Down
9 changes: 2 additions & 7 deletions ts/api-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,13 @@ hourly(obj?:SeriesAndTime):SeriesAndTime|null {
return offset ? (obj || new SeriesAndTime()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
}

threeHourly(obj?:SeriesAndTime):SeriesAndTime|null {
const offset = this.bb!.__offset(this.bb_pos, 28);
return offset ? (obj || new SeriesAndTime()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
}

sixHourly(obj?:SeriesAndTime):SeriesAndTime|null {
const offset = this.bb!.__offset(this.bb_pos, 30);
const offset = this.bb!.__offset(this.bb_pos, 28);
return offset ? (obj || new SeriesAndTime()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
}

minutely15(obj?:SeriesAndTime):SeriesAndTime|null {
const offset = this.bb!.__offset(this.bb_pos, 32);
const offset = this.bb!.__offset(this.bb_pos, 30);
return offset ? (obj || new SeriesAndTime()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
}

Expand Down
4 changes: 3 additions & 1 deletion ts/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@ export enum Model {
MRI_AGCM3_2_S = 45,
EC_Earth3P_HR = 46,
MPI_ESM1_2_XR = 47,
NICAM16_8S = 48
NICAM16_8S = 48,
cams_europe = 49,
cams_global = 50
}
6 changes: 3 additions & 3 deletions ts/variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export enum Variable {
swell_wave_peak_period = 69,
swell_wave_direction = 70,
pm10 = 71,
pm2_5 = 72,
pm2p5 = 72,
dust = 73,
aerosol_optical_depth = 74,
carbon_monoxide = 75,
Expand All @@ -88,13 +88,13 @@ export enum Variable {
olive_pollen = 84,
ragweed_pollen = 85,
european_aqi = 86,
european_aqi_pm2_5 = 87,
european_aqi_pm2p5 = 87,
european_aqi_pm10 = 88,
european_aqi_no2 = 89,
european_aqi_o3 = 90,
european_aqi_so2 = 91,
us_aqi = 92,
us_aqi_pm2_5 = 93,
us_aqi_pm2p5 = 93,
us_aqi_pm10 = 94,
us_aqi_no2 = 95,
us_aqi_o3 = 96,
Expand Down

0 comments on commit ae72a79

Please sign in to comment.