diff options
author | Scott Murray <scott.murray@konsulko.com> | 2023-09-20 12:26:45 -0400 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2023-09-20 12:48:19 -0400 |
commit | 6a853805d2479bf7b111511b1f94907e425c607a (patch) | |
tree | 343a651a5e4a944de525f585eceb752d9ed3840a /lib | |
parent | 20d76f947ef9d4a9093df0e5ad04476963655173 (diff) |
Rework to use KUKSA.val databroker gRPC API
Rework to move from the WebSocket API with the older KUKSA.val
server to the gRPC "VAL" API of the databroker.
Changes include:
- All VISS WebSocket API code has been removed, and the signal
providers replumbed to be driven by a new VssClient class with
a hvac-specific child class to hold all the gRPC API
handling.
- The generated code for the VAL API and its dependencies has
been checked in under lib/generated, as there still does not
seem to be a good way to generate it during the Flutter build.
- The configuration file is now expected to be "hvac.yaml" instead
of "hvac_config.yaml". The authorization token field name has
been renamed to "authorization", and there are new "use-tls" and
"ca-certificate" configuration fields. TLS is disabled by default
for now, and the default CA certificate is /etc/kuksa.val/CA.pem.
- Bumped minimum SDK version to 2.18 in pubspec.yaml to enable
"super" keyword support. This matches what the version was set
to in flutter-homescreen.
- The Vehicle and VehicleSignals classes have been reworked into
a VehicleAcStatus class + provider, and users have been updated
to use the Riverpod provider select functionality to attempt to
reduce naive over-updating.
- VSS paths have been rationalized to use the definitions in the
VSSPath class so only one location will need to be updated on any
signal name changes.
- Added .gitignore file from flutter-homescreen to keep things
clean in the future.
Bug-AGL: SPEC-4762
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Idbabb54ead52bf38796f264a3c8a270aa170e2cd
Diffstat (limited to 'lib')
33 files changed, 3615 insertions, 649 deletions
diff --git a/lib/Buttons/AC.dart b/lib/Buttons/AC.dart index e0c610a..f07bf1d 100644 --- a/lib/Buttons/AC.dart +++ b/lib/Buttons/AC.dart @@ -4,19 +4,14 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-provider.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle_methods.dart'; +import 'package:flutter_hvac/vehicle-signals/vehicle_ac_status_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; import '../size.dart'; class AC extends ConsumerStatefulWidget { - WebSocket socket; - String serverPath; - AC({ - Key? key, - required this.serverPath, - required this.socket, - }) : super(key: key); + AC({Key? key}) : super(key: key); @override _ACState createState() => _ACState(); @@ -45,11 +40,10 @@ class _ACState extends ConsumerState<AC> with SingleTickerProviderStateMixin { }); _controller.addStatusListener((status) { - if (status == AnimationStatus.completed) { - VISS.set(widget.socket, ref,widget.serverPath, isAcActive.toString()); - } - if (status == AnimationStatus.dismissed) { - VISS.set(widget.socket, ref,widget.serverPath, isAcActive.toString()); + if (status == AnimationStatus.completed || status == AnimationStatus.dismissed) { + var vss = ref.read(vssClientProvider); + if (vss != null) + vss.setBool(VSSPath.vehicleIsAirConditioningActive, isAcActive, true); } }); } @@ -63,7 +57,8 @@ class _ACState extends ConsumerState<AC> with SingleTickerProviderStateMixin { @override Widget build(BuildContext context) { - isAcActive = ref.watch(vehicleProvider).isAcActive; + isAcActive = ref.watch(vehicleAcStatusProvider.select((p) => p.isAcActive)); + return AnimatedBuilder( animation: _controller, builder: (BuildContext context, _) { @@ -114,7 +109,7 @@ class _ACState extends ConsumerState<AC> with SingleTickerProviderStateMixin { onTap: () { isAcActive ? _controller.reverse() : _controller.forward(); ref - .read(vehicleProvider.notifier) + .read(vehicleAcStatusProvider.notifier) .update(isAcActive: !isAcActive); }, ); diff --git a/lib/Buttons/ac_on_face.dart b/lib/Buttons/ac_on_face.dart index f0c0f41..9d8ded3 100644 --- a/lib/Buttons/ac_on_face.dart +++ b/lib/Buttons/ac_on_face.dart @@ -5,19 +5,18 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg_provider/flutter_svg_provider.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vehicle_ac_status_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; -import '../kuksa-server/vehicle-class.dart'; -import '../kuksa-server/vehicle_methods.dart'; import '../size.dart'; class AcOnFace extends ConsumerStatefulWidget { final String img; - WebSocket socket; + AcOnFace({ Key? key, required this.img, - required this.socket, }) : super(key: key); @override @@ -45,26 +44,20 @@ class _AcOnFaceState extends ConsumerState<AcOnFace> _controller.addListener(() {}); _controller.addStatusListener((status) { + String direction = ""; if (status == AnimationStatus.completed) { - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Left.AirDistribution", 'up'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Right.AirDistribution", 'up'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Left.AirDistribution", 'up'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Right.AirDistribution", 'up'); + direction = "MIDDLE"; + } else if (status == AnimationStatus.dismissed) { + direction = "DOWN"; } - - if (status == AnimationStatus.dismissed) { - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Left.AirDistribution", 'middle'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Right.AirDistribution", 'middle'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Left.AirDistribution", 'middle'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Right.AirDistribution", 'middle'); + if (direction.isNotEmpty) { + var vss = ref.read(vssClientProvider); + if (vss != null) { + vss.setString(VSSPath.vehicleFrontLeftAirDistribution, direction, true); + vss.setString(VSSPath.vehicleFrontRightAirDistribution, direction, true); + vss.setString(VSSPath.vehicleRearLeftAirDistribution, direction, true); + vss.setString(VSSPath.vehicleRearRightAirDistribution, direction, true); + } } }); } @@ -78,8 +71,9 @@ class _AcOnFaceState extends ConsumerState<AcOnFace> @override Widget build(BuildContext context) { - vehicle vehicledata = ref.watch(vehicleProvider); - if (vehicledata.isAcDirectionUp == false) { + bool isAcDirectionUp = ref.watch(vehicleAcStatusProvider.select((p) => p.isAcDirectionUp)); + bool isAcDirectionDown = ref.watch(vehicleAcStatusProvider.select((p) => p.isAcDirectionDown)); + if (isAcDirectionUp == false) { _controller.reverse(); } @@ -95,7 +89,7 @@ class _AcOnFaceState extends ConsumerState<AcOnFace> decoration: BoxDecoration( - gradient: vehicledata.isAcDirectionUp + gradient: isAcDirectionUp ? RadialGradient( colors: [Colors.black, Colors.lightBlue], radius: 2, @@ -122,18 +116,16 @@ class _AcOnFaceState extends ConsumerState<AcOnFace> ), ), onTap: () { - if (vehicledata.isAcDirectionDown) { + if (isAcDirectionDown) { ref - .watch(vehicleProvider.notifier) - .update(isAcDirectionDown: !vehicledata.isAcDirectionDown); + .watch(vehicleAcStatusProvider.notifier) + .update(isAcDirectionDown: !isAcDirectionDown); } Future.delayed(Duration(milliseconds: 500),(){ - vehicledata.isAcDirectionUp - ? _controller.reverse() - : _controller.forward(); + isAcDirectionUp ? _controller.reverse() : _controller.forward(); - ref.watch(vehicleProvider.notifier).update( - isAcDirectionUp: !vehicledata.isAcDirectionUp, + ref.watch(vehicleAcStatusProvider.notifier).update( + isAcDirectionUp: !isAcDirectionUp, ); }); diff --git a/lib/Buttons/ac_on_foot.dart b/lib/Buttons/ac_on_foot.dart index 41e2569..d1f2180 100644 --- a/lib/Buttons/ac_on_foot.dart +++ b/lib/Buttons/ac_on_foot.dart @@ -5,19 +5,18 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg_provider/flutter_svg_provider.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vehicle_ac_status_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; -import '../kuksa-server/vehicle-class.dart'; -import '../kuksa-server/vehicle_methods.dart'; import '../size.dart'; class AcOnFoot extends ConsumerStatefulWidget { final String img; - WebSocket socket; + AcOnFoot({ Key? key, required this.img, - required this.socket, }) : super(key: key); @override @@ -45,27 +44,20 @@ class _AcOnFootState extends ConsumerState<AcOnFoot> _controller.addListener(() {}); _controller.addStatusListener((status) { + String direction = ""; if (status == AnimationStatus.completed) { - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Left.AirDistribution", 'down'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Right.AirDistribution", 'down'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Left.AirDistribution", 'down'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Right.AirDistribution", 'down'); - + direction = "DOWN"; + } else if (status == AnimationStatus.dismissed) { + direction = "MIDDLE"; } - - if (status == AnimationStatus.dismissed) { - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Left.AirDistribution", 'middle'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row1.Right.AirDistribution", 'middle'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Left.AirDistribution", 'middle'); - VISS.set(widget.socket,ref, - "Vehicle.Cabin.HVAC.Station.Row2.Right.AirDistribution", 'middle'); + if (direction.isNotEmpty) { + var vss = ref.read(vssClientProvider); + if (vss != null) { + vss.setString(VSSPath.vehicleFrontLeftAirDistribution, direction, true); + vss.setString(VSSPath.vehicleFrontRightAirDistribution, direction, true); + vss.setString(VSSPath.vehicleRearLeftAirDistribution, direction, true); + vss.setString(VSSPath.vehicleRearRightAirDistribution, direction, true); + } } }); } @@ -79,8 +71,9 @@ class _AcOnFootState extends ConsumerState<AcOnFoot> @override Widget build(BuildContext context) { - vehicle vehicledata = ref.watch(vehicleProvider); - if (vehicledata.isAcDirectionDown == false) { + bool isAcDirectionUp = ref.watch(vehicleAcStatusProvider.select((p) => p.isAcDirectionUp)); + bool isAcDirectionDown = ref.watch(vehicleAcStatusProvider.select((p) => p.isAcDirectionDown)); + if (isAcDirectionDown == false) { _controller.reverse(); } @@ -96,7 +89,7 @@ class _AcOnFootState extends ConsumerState<AcOnFoot> decoration: BoxDecoration( - gradient: vehicledata.isAcDirectionDown + gradient: isAcDirectionDown ? RadialGradient( colors: [Colors.black, Colors.lightBlue], radius: 2, @@ -123,18 +116,16 @@ class _AcOnFootState extends ConsumerState<AcOnFoot> ), ), onTap: () { - if (vehicledata.isAcDirectionUp == true) { + if (isAcDirectionUp == true) { ref - .watch(vehicleProvider.notifier) - .update(isAcDirectionUp: !vehicledata.isAcDirectionUp); + .watch(vehicleAcStatusProvider.notifier) + .update(isAcDirectionUp: !isAcDirectionUp); } Future.delayed(Duration(milliseconds: 500),(){ - vehicledata.isAcDirectionDown - ? _controller.reverse() - : _controller.forward(); + isAcDirectionDown ? _controller.reverse() : _controller.forward(); - ref.watch(vehicleProvider.notifier).update( - isAcDirectionDown: !vehicledata.isAcDirectionDown, + ref.watch(vehicleAcStatusProvider.notifier).update( + isAcDirectionDown: !isAcDirectionDown, ); }); diff --git a/lib/Buttons/auto.dart b/lib/Buttons/auto.dart index 1bdb045..8e94e63 100644 --- a/lib/Buttons/auto.dart +++ b/lib/Buttons/auto.dart @@ -4,18 +4,12 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vehicle_ac_status_provider.dart'; import '../size.dart'; class Auto extends ConsumerStatefulWidget { - WebSocket socket; - String serverPath; - Auto({ - Key? key, - required this.serverPath, - required this.socket, - }) : super(key: key); + Auto({Key? key}) : super(key: key); @override _AutoState createState() => _AutoState(); @@ -52,7 +46,8 @@ class _AutoState extends ConsumerState<Auto> @override Widget build(BuildContext context) { - isAutoActive = ref.watch(vehicleProvider).isAutoActive; + isAutoActive = ref.watch(vehicleAcStatusProvider.select((p) => p.isAutoActive)); + return AnimatedBuilder( animation: _controller, builder: (BuildContext context, _) { @@ -100,7 +95,7 @@ class _AutoState extends ConsumerState<Auto> onTap: () { isAutoActive ? _controller.reverse() : _controller.forward(); ref - .read(vehicleProvider.notifier) + .read(vehicleAcStatusProvider.notifier) .update(isAutoActive: !isAutoActive); }, ); diff --git a/lib/Buttons/defrost_recirculate.dart b/lib/Buttons/defrost_recirculate.dart index 909bbf5..69adb89 100644 --- a/lib/Buttons/defrost_recirculate.dart +++ b/lib/Buttons/defrost_recirculate.dart @@ -5,20 +5,16 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg_provider/flutter_svg_provider.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-class.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-provider.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle_methods.dart'; +import 'package:flutter_hvac/vehicle-signals/vehicle_ac_status_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; import 'package:flutter_hvac/size.dart'; class CustomButton extends ConsumerStatefulWidget { - WebSocket socket; - String serverPath; String img; String type; CustomButton({ Key? key, - required this.serverPath, - required this.socket, required this.img, required this.type, }) : super(key: key); @@ -30,7 +26,9 @@ class CustomButton extends ConsumerStatefulWidget { class _CustomButtonState extends ConsumerState<CustomButton> with SingleTickerProviderStateMixin { late AnimationController _controller; - late vehicle vehicledata; + late bool isFrontDefrosterActive; + late bool isRearDefrosterActive; + late bool isRecirculationActive; late Animation<Color?> _colorAnimation; @override @@ -51,35 +49,18 @@ class _CustomButtonState extends ConsumerState<CustomButton> }); _controller.addStatusListener((status) { - if (status == AnimationStatus.completed) { - if (widget.type == 'Front_defrost') { - VISS.set(widget.socket,ref, widget.serverPath, - vehicledata.isFrontDefrosterActive.toString()); - } - if (widget.type == "Rear_defrost") { - VISS.set(widget.socket,ref, widget.serverPath, - vehicledata.isRearDefrosterActive.toString()); - } - if (widget.type == "Recirculation") { - VISS.set(widget.socket,ref, widget.serverPath, - vehicledata.isRecirculationActive.toString()); - } - - - - } - if (status == AnimationStatus.dismissed) { - if (widget.type == 'Front_defrost') { - VISS.set(widget.socket, ref,widget.serverPath, - vehicledata.isFrontDefrosterActive.toString()); - } - if (widget.type == "Rear_defrost") { - VISS.set(widget.socket, ref,widget.serverPath, - vehicledata.isRearDefrosterActive.toString()); - } - if (widget.type == "Recirculation") { - VISS.set(widget.socket, ref,widget.serverPath, - vehicledata.isRecirculationActive.toString()); + if (status == AnimationStatus.completed || status == AnimationStatus.dismissed) { + var vss = ref.read(vssClientProvider); + if (vss != null) { + if (widget.type == 'Front_defrost') { + vss.setBool(VSSPath.vehicleIsFrontDefrosterActive, isFrontDefrosterActive, true); + } + if (widget.type == "Rear_defrost") { + vss.setBool(VSSPath.vehicleIsRearDefrosterActive, isRearDefrosterActive, true); + } + if (widget.type == "Recirculation") { + vss.setBool(VSSPath.vehicleIsRecirculationActive, isRecirculationActive, true); + } } } }); @@ -94,7 +75,10 @@ class _CustomButtonState extends ConsumerState<CustomButton> @override Widget build(BuildContext context) { - vehicledata = ref.watch(vehicleProvider); + isFrontDefrosterActive = ref.watch(vehicleAcStatusProvider.select((p) => p.isFrontDefrosterActive)); + isRearDefrosterActive = ref.watch(vehicleAcStatusProvider.select((p) => p.isRearDefrosterActive)); + isRecirculationActive = ref.watch(vehicleAcStatusProvider.select((p) => p.isRecirculationActive)); + return AnimatedBuilder( animation: _controller, builder: (BuildContext context, _) { @@ -108,20 +92,20 @@ class _CustomButtonState extends ConsumerState<CustomButton> decoration: BoxDecoration( gradient: widget.type == "Front_defrost" - ? vehicledata.isFrontDefrosterActive + ? isFrontDefrosterActive ? RadialGradient( colors: [Colors.black, Colors.lightBlue], radius: 2, ) : null : widget.type == "Rear_defrost" - ? vehicledata.isRearDefrosterActive + ? isRearDefrosterActive ? RadialGradient( colors: [Colors.black, Colors.lightBlue], radius: 2, ) : null - : vehicledata.isRecirculationActive + : isRecirculationActive ? RadialGradient( colors: [Colors.black, Colors.lightBlue], radius: 2, @@ -149,26 +133,25 @@ class _CustomButtonState extends ConsumerState<CustomButton> ), onTap: () { if (widget.type == "Front_defrost") { - vehicledata.isFrontDefrosterActive + isFrontDefrosterActive ? _controller.reverse() : _controller.forward(); - ref.read(vehicleProvider.notifier).update( - isFrontDefrosterActive: - !vehicledata.isFrontDefrosterActive); + ref.read(vehicleAcStatusProvider.notifier).update( + isFrontDefrosterActive: !isFrontDefrosterActive); } if (widget.type == "Rear_defrost") { - vehicledata.isRearDefrosterActive + isRearDefrosterActive ? _controller.reverse() : _controller.forward(); - ref.read(vehicleProvider.notifier).update( - isRearDefrosterActive: !vehicledata.isRearDefrosterActive); + ref.read(vehicleAcStatusProvider.notifier).update( + isRearDefrosterActive: !isRearDefrosterActive); } if (widget.type == "Recirculation") { - vehicledata.isRecirculationActive + isRecirculationActive ? _controller.reverse() : _controller.forward(); - ref.read(vehicleProvider.notifier).update( - isRecirculationActive: !vehicledata.isRecirculationActive); + ref.read(vehicleAcStatusProvider.notifier).update( + isRecirculationActive: !isRecirculationActive); } }, ); diff --git a/lib/Buttons/fresh_air.dart b/lib/Buttons/fresh_air.dart index 3858cba..edaacd5 100644 --- a/lib/Buttons/fresh_air.dart +++ b/lib/Buttons/fresh_air.dart @@ -5,18 +5,14 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg_provider/flutter_svg_provider.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vehicle_ac_status_provider.dart'; import '../size.dart'; class FreshAir extends ConsumerStatefulWidget { - WebSocket socket; - String serverPath; String img; FreshAir({ Key? key, - required this.serverPath, - required this.socket, required this.img, }) : super(key: key); @@ -58,7 +54,8 @@ class _FreshAirState extends ConsumerState<FreshAir> with SingleTickerProviderSt @override Widget build(BuildContext context) { - isFreshAirCirculateActive = ref.watch(vehicleProvider).isFreshAirCirculateActive; + isFreshAirCirculateActive = ref.watch(vehicleAcStatusProvider.select((p) => p.isFreshAirCirculateActive)); + return AnimatedBuilder( animation: _controller, builder: (BuildContext context, _) { @@ -100,7 +97,7 @@ class _FreshAirState extends ConsumerState<FreshAir> with SingleTickerProviderSt onTap: () { isFreshAirCirculateActive ? _controller.reverse() : _controller.forward(); ref - .read(vehicleProvider.notifier) + .read(vehicleAcStatusProvider.notifier) .update(isFreshAirCirculateActive: !isFreshAirCirculateActive); }, ); diff --git a/lib/config.dart b/lib/config.dart index db7266e..39a5a41 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -1,111 +1,108 @@ // SPDX-License-Identifier: Apache-2.0 - import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_hvac/kuksa-server/intial_connection.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:yaml/yaml.dart'; +class KuksaConfig { + final String hostname; + final int port; + final String authorization; + final bool use_tls; + final List<int> ca_certificate; + final String tls_server_name; -class GetConfig extends ConsumerStatefulWidget { - const GetConfig({Key? key, required this.client}) : super(key: key); - final HttpClient client; + static String configFilePath = '/etc/xdg/AGL/hvac.yaml'; + static String defaultHostname = 'localhost'; + static int defaultPort = 55555; + static String defaultCaCertPath = '/etc/kuksa-val/CA.pem'; - @override - ConsumerState<GetConfig> createState() => _GetConfigState(); + KuksaConfig({required this.hostname, required this.port, required this.authorization, + required this.use_tls, required this.ca_certificate, required this.tls_server_name}); } -class _GetConfigState extends ConsumerState<GetConfig> { - @override - void initState() { - super.initState(); - WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - final configStateProvider = ref.read(ConfigStateprovider.notifier); +// NOTE: This may need to be changed to a FutureProvider to avoid slowing +// down the top-level widget initState... - String configFilePath = '/etc/xdg/AGL/HVAC_config.yaml'; +final kuksaConfigProvider = Provider((ref) { + final configFile = File(KuksaConfig.configFilePath); + try { + print("Reading configuration ${KuksaConfig.configFilePath}"); + String content = configFile.readAsStringSync(); + final dynamic yamlMap = loadYaml(content); + String hostname = KuksaConfig.defaultHostname; + if (yamlMap.containsKey('hostname')) { + hostname = yamlMap['hostname']; + } - final configFile = File(configFilePath); - configFile.readAsString().then((content) { - final dynamic yamlMap = loadYaml(content); - configStateProvider.update( - hostname: yamlMap['hostname'], - port: yamlMap['port'], - kuksaAuthToken: yamlMap['kuskaAuthToken'], - ); - }); - }); - } - - @override - Widget build(BuildContext context) { - final config = ref.watch(ConfigStateprovider); - if (config.hostname == "" || - config.port == 0 || - config.kuksaAuthToken == "" - ) { - return Scaffold( - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: const [ - Text("ERROR", - style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), - Text( - "Something Wrong with config file! Check config.yaml file and restart"), - ], - )), - ); + int port = KuksaConfig.defaultPort; + if (yamlMap.containsKey('port')) { + port = yamlMap['port']; } - return InitialScreen(client: widget.client); - } -} -class Config { - Config({ - required this.hostname, - required this.port, - required this.kuksaAuthToken, + String token = ""; + if (yamlMap.containsKey('authorization')) { + String s = yamlMap['authorization']; + if (s.isNotEmpty) { + if (s.startsWith("/")) { + debugPrint("Reading authorization token $s"); + try { + token = File(s).readAsStringSync(); + } on Exception catch(_) { + print("ERROR: Could not read authorization token file $token"); + token = ""; + } + } else { + token = s; + } + } + } + //debugPrint("authorization = $token"); - }); - final String hostname; - final int port; - final String kuksaAuthToken; + bool use_tls = false; + if (yamlMap.containsKey('use-tls')) { + var value = yamlMap['use-tls']; + if (value is bool) + use_tls = value; + } + //debugPrint("Use TLS = $use_tls"); - Config copywith({ - String? hostname, - int? port, - String? kuksaAuthToken, - String? mapboxAccessToken, - }) => - Config( - hostname: hostname ?? this.hostname, - port: port ?? this.port, - kuksaAuthToken: kuksaAuthToken ?? this.kuksaAuthToken, - ); -} + List<int> ca_cert = []; + String ca_path = KuksaConfig.defaultCaCertPath; + if (yamlMap.containsKey('ca-certificate')) { + ca_path = yamlMap['ca-certificate']; + } + try { + ca_cert = File(ca_path).readAsBytesSync(); + } on Exception catch(_) { + print("ERROR: Could not read CA certificate file $ca_path"); + ca_cert = []; + } + //debugPrint("CA cert = $ca_cert"); -final ConfigStateprovider = -StateNotifierProvider<ConfigStateNotifier, Config>( - (ref) => ConfigStateNotifier()); + String tls_server_name = ""; + if (yamlMap.containsKey('tls-server-name')) { + tls_server_name = yamlMap['tls_server_name']; + } -class ConfigStateNotifier extends StateNotifier<Config> { - ConfigStateNotifier() : super(_initialValue); - static final Config _initialValue = Config( - hostname: "", - port: 0, - kuksaAuthToken: "", - ); - void update({ - String? hostname, - int? port, - String? kuksaAuthToken, - }) { - state = state.copywith( - hostname: hostname, - port: port, - kuksaAuthToken: kuksaAuthToken, - ); + return KuksaConfig( + hostname: hostname, + port: port, + authorization: token, + use_tls: use_tls, + ca_certificate: ca_cert, + tls_server_name: tls_server_name + ); + } on Exception catch(_) { + return KuksaConfig( + hostname: KuksaConfig.defaultHostname, + port: KuksaConfig.defaultPort, + authorization: "", + use_tls: false, + ca_certificate: [], + tls_server_name: "" + ); } -} +}); + diff --git a/lib/generated/google/protobuf/timestamp.pb.dart b/lib/generated/google/protobuf/timestamp.pb.dart new file mode 100644 index 0000000..ca4a49a --- /dev/null +++ b/lib/generated/google/protobuf/timestamp.pb.dart @@ -0,0 +1,83 @@ +/// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; + +class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Timestamp', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'google.protobuf'), createEmptyInstance: create, toProto3Json: $mixin.TimestampMixin.toProto3JsonHelper, fromProto3Json: $mixin.TimestampMixin.fromProto3JsonHelper) + ..aInt64(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'seconds') + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'nanos', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + Timestamp._() : super(); + factory Timestamp({ + $fixnum.Int64? seconds, + $core.int? nanos, + }) { + final _result = create(); + if (seconds != null) { + _result.seconds = seconds; + } + if (nanos != null) { + _result.nanos = nanos; + } + return _result; + } + factory Timestamp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Timestamp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Timestamp clone() => Timestamp()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Timestamp copyWith(void Function(Timestamp) updates) => super.copyWith((message) => updates(message as Timestamp)) as Timestamp; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Timestamp create() => Timestamp._(); + Timestamp createEmptyInstance() => create(); + static $pb.PbList<Timestamp> createRepeated() => $pb.PbList<Timestamp>(); + @$core.pragma('dart2js:noInline') + static Timestamp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Timestamp>(create); + static Timestamp? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get seconds => $_getI64(0); + @$pb.TagNumber(1) + set seconds($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasSeconds() => $_has(0); + @$pb.TagNumber(1) + void clearSeconds() => clearField(1); + + @$pb.TagNumber(2) + $core.int get nanos => $_getIZ(1); + @$pb.TagNumber(2) + set nanos($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasNanos() => $_has(1); + @$pb.TagNumber(2) + void clearNanos() => clearField(2); + /// Creates a new instance from [dateTime]. + /// + /// Time zone information will not be preserved. + static Timestamp fromDateTime($core.DateTime dateTime) { + final result = create(); + $mixin.TimestampMixin.setFromDateTime(result, dateTime); + return result; + } +} + diff --git a/lib/generated/google/protobuf/timestamp.pbenum.dart b/lib/generated/google/protobuf/timestamp.pbenum.dart new file mode 100644 index 0000000..9d127fd --- /dev/null +++ b/lib/generated/google/protobuf/timestamp.pbenum.dart @@ -0,0 +1,7 @@ +/// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + diff --git a/lib/generated/google/protobuf/timestamp.pbjson.dart b/lib/generated/google/protobuf/timestamp.pbjson.dart new file mode 100644 index 0000000..421f785 --- /dev/null +++ b/lib/generated/google/protobuf/timestamp.pbjson.dart @@ -0,0 +1,21 @@ +/// +// Generated code. Do not modify. +// source: google/protobuf/timestamp.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use timestampDescriptor instead') +const Timestamp$json = const { + '1': 'Timestamp', + '2': const [ + const {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, + const {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, + ], +}; + +/// Descriptor for `Timestamp`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List timestampDescriptor = $convert.base64Decode('CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbmFub3M='); diff --git a/lib/generated/kuksa/val/v1/types.pb.dart b/lib/generated/kuksa/val/v1/types.pb.dart new file mode 100644 index 0000000..17bcbb3 --- /dev/null +++ b/lib/generated/kuksa/val/v1/types.pb.dart @@ -0,0 +1,1560 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/types.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../../../google/protobuf/timestamp.pb.dart' as $0; + +import 'types.pbenum.dart'; + +export 'types.pbenum.dart'; + +class DataEntry extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DataEntry', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'path') + ..aOM<Datapoint>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value', subBuilder: Datapoint.create) + ..aOM<Datapoint>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'actuatorTarget', subBuilder: Datapoint.create) + ..aOM<Metadata>(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'metadata', subBuilder: Metadata.create) + ..hasRequiredFields = false + ; + + DataEntry._() : super(); + factory DataEntry({ + $core.String? path, + Datapoint? value, + Datapoint? actuatorTarget, + Metadata? metadata, + }) { + final _result = create(); + if (path != null) { + _result.path = path; + } + if (value != null) { + _result.value = value; + } + if (actuatorTarget != null) { + _result.actuatorTarget = actuatorTarget; + } + if (metadata != null) { + _result.metadata = metadata; + } + return _result; + } + factory DataEntry.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DataEntry.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DataEntry clone() => DataEntry()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DataEntry copyWith(void Function(DataEntry) updates) => super.copyWith((message) => updates(message as DataEntry)) as DataEntry; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static DataEntry create() => DataEntry._(); + DataEntry createEmptyInstance() => create(); + static $pb.PbList<DataEntry> createRepeated() => $pb.PbList<DataEntry>(); + @$core.pragma('dart2js:noInline') + static DataEntry getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DataEntry>(create); + static DataEntry? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get path => $_getSZ(0); + @$pb.TagNumber(1) + set path($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPath() => $_has(0); + @$pb.TagNumber(1) + void clearPath() => clearField(1); + + @$pb.TagNumber(2) + Datapoint get value => $_getN(1); + @$pb.TagNumber(2) + set value(Datapoint v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasValue() => $_has(1); + @$pb.TagNumber(2) + void clearValue() => clearField(2); + @$pb.TagNumber(2) + Datapoint ensureValue() => $_ensure(1); + + @$pb.TagNumber(3) + Datapoint get actuatorTarget => $_getN(2); + @$pb.TagNumber(3) + set actuatorTarget(Datapoint v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasActuatorTarget() => $_has(2); + @$pb.TagNumber(3) + void clearActuatorTarget() => clearField(3); + @$pb.TagNumber(3) + Datapoint ensureActuatorTarget() => $_ensure(2); + + @$pb.TagNumber(10) + Metadata get metadata => $_getN(3); + @$pb.TagNumber(10) + set metadata(Metadata v) { setField(10, v); } + @$pb.TagNumber(10) + $core.bool hasMetadata() => $_has(3); + @$pb.TagNumber(10) + void clearMetadata() => clearField(10); + @$pb.TagNumber(10) + Metadata ensureMetadata() => $_ensure(3); +} + +enum Datapoint_Value { + string, + bool_12, + int32, + int64, + uint32, + uint64, + float, + double_18, + stringArray, + boolArray, + int32Array, + int64Array, + uint32Array, + uint64Array, + floatArray, + doubleArray, + notSet +} + +class Datapoint extends $pb.GeneratedMessage { + static const $core.Map<$core.int, Datapoint_Value> _Datapoint_ValueByTag = { + 11 : Datapoint_Value.string, + 12 : Datapoint_Value.bool_12, + 13 : Datapoint_Value.int32, + 14 : Datapoint_Value.int64, + 15 : Datapoint_Value.uint32, + 16 : Datapoint_Value.uint64, + 17 : Datapoint_Value.float, + 18 : Datapoint_Value.double_18, + 21 : Datapoint_Value.stringArray, + 22 : Datapoint_Value.boolArray, + 23 : Datapoint_Value.int32Array, + 24 : Datapoint_Value.int64Array, + 25 : Datapoint_Value.uint32Array, + 26 : Datapoint_Value.uint64Array, + 27 : Datapoint_Value.floatArray, + 28 : Datapoint_Value.doubleArray, + 0 : Datapoint_Value.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Datapoint', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..oo(0, [11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28]) + ..aOM<$0.Timestamp>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'timestamp', subBuilder: $0.Timestamp.create) + ..aOS(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'string') + ..aOB(12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bool') + ..a<$core.int>(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'int32', $pb.PbFieldType.OS3) + ..a<$fixnum.Int64>(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'int64', $pb.PbFieldType.OS6, defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$core.int>(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'uint32', $pb.PbFieldType.OU3) + ..a<$fixnum.Int64>(16, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'uint64', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$core.double>(17, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'float', $pb.PbFieldType.OF) + ..a<$core.double>(18, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'double', $pb.PbFieldType.OD) + ..aOM<StringArray>(21, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stringArray', subBuilder: StringArray.create) + ..aOM<BoolArray>(22, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'boolArray', subBuilder: BoolArray.create) + ..aOM<Int32Array>(23, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'int32Array', subBuilder: Int32Array.create) + ..aOM<Int64Array>(24, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'int64Array', subBuilder: Int64Array.create) + ..aOM<Uint32Array>(25, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'uint32Array', subBuilder: Uint32Array.create) + ..aOM<Uint64Array>(26, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'uint64Array', subBuilder: Uint64Array.create) + ..aOM<FloatArray>(27, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'floatArray', subBuilder: FloatArray.create) + ..aOM<DoubleArray>(28, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'doubleArray', subBuilder: DoubleArray.create) + ..hasRequiredFields = false + ; + + Datapoint._() : super(); + factory Datapoint({ + $0.Timestamp? timestamp, + $core.String? string, + $core.bool? bool_12, + $core.int? int32, + $fixnum.Int64? int64, + $core.int? uint32, + $fixnum.Int64? uint64, + $core.double? float, + $core.double? double_18, + StringArray? stringArray, + BoolArray? boolArray, + Int32Array? int32Array, + Int64Array? int64Array, + Uint32Array? uint32Array, + Uint64Array? uint64Array, + FloatArray? floatArray, + DoubleArray? doubleArray, + }) { + final _result = create(); + if (timestamp != null) { + _result.timestamp = timestamp; + } + if (string != null) { + _result.string = string; + } + if (bool_12 != null) { + _result.bool_12 = bool_12; + } + if (int32 != null) { + _result.int32 = int32; + } + if (int64 != null) { + _result.int64 = int64; + } + if (uint32 != null) { + _result.uint32 = uint32; + } + if (uint64 != null) { + _result.uint64 = uint64; + } + if (float != null) { + _result.float = float; + } + if (double_18 != null) { + _result.double_18 = double_18; + } + if (stringArray != null) { + _result.stringArray = stringArray; + } + if (boolArray != null) { + _result.boolArray = boolArray; + } + if (int32Array != null) { + _result.int32Array = int32Array; + } + if (int64Array != null) { + _result.int64Array = int64Array; + } + if (uint32Array != null) { + _result.uint32Array = uint32Array; + } + if (uint64Array != null) { + _result.uint64Array = uint64Array; + } + if (floatArray != null) { + _result.floatArray = floatArray; + } + if (doubleArray != null) { + _result.doubleArray = doubleArray; + } + return _result; + } + factory Datapoint.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Datapoint.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Datapoint clone() => Datapoint()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Datapoint copyWith(void Function(Datapoint) updates) => super.copyWith((message) => updates(message as Datapoint)) as Datapoint; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Datapoint create() => Datapoint._(); + Datapoint createEmptyInstance() => create(); + static $pb.PbList<Datapoint> createRepeated() => $pb.PbList<Datapoint>(); + @$core.pragma('dart2js:noInline') + static Datapoint getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Datapoint>(create); + static Datapoint? _defaultInstance; + + Datapoint_Value whichValue() => _Datapoint_ValueByTag[$_whichOneof(0)]!; + void clearValue() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $0.Timestamp get timestamp => $_getN(0); + @$pb.TagNumber(1) + set timestamp($0.Timestamp v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasTimestamp() => $_has(0); + @$pb.TagNumber(1) + void clearTimestamp() => clearField(1); + @$pb.TagNumber(1) + $0.Timestamp ensureTimestamp() => $_ensure(0); + + @$pb.TagNumber(11) + $core.String get string => $_getSZ(1); + @$pb.TagNumber(11) + set string($core.String v) { $_setString(1, v); } + @$pb.TagNumber(11) + $core.bool hasString() => $_has(1); + @$pb.TagNumber(11) + void clearString() => clearField(11); + + @$pb.TagNumber(12) + $core.bool get bool_12 => $_getBF(2); + @$pb.TagNumber(12) + set bool_12($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(12) + $core.bool hasBool_12() => $_has(2); + @$pb.TagNumber(12) + void clearBool_12() => clearField(12); + + @$pb.TagNumber(13) + $core.int get int32 => $_getIZ(3); + @$pb.TagNumber(13) + set int32($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(13) + $core.bool hasInt32() => $_has(3); + @$pb.TagNumber(13) + void clearInt32() => clearField(13); + + @$pb.TagNumber(14) + $fixnum.Int64 get int64 => $_getI64(4); + @$pb.TagNumber(14) + set int64($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(14) + $core.bool hasInt64() => $_has(4); + @$pb.TagNumber(14) + void clearInt64() => clearField(14); + + @$pb.TagNumber(15) + $core.int get uint32 => $_getIZ(5); + @$pb.TagNumber(15) + set uint32($core.int v) { $_setUnsignedInt32(5, v); } + @$pb.TagNumber(15) + $core.bool hasUint32() => $_has(5); + @$pb.TagNumber(15) + void clearUint32() => clearField(15); + + @$pb.TagNumber(16) + $fixnum.Int64 get uint64 => $_getI64(6); + @$pb.TagNumber(16) + set uint64($fixnum.Int64 v) { $_setInt64(6, v); } + @$pb.TagNumber(16) + $core.bool hasUint64() => $_has(6); + @$pb.TagNumber(16) + void clearUint64() => clearField(16); + + @$pb.TagNumber(17) + $core.double get float => $_getN(7); + @$pb.TagNumber(17) + set float($core.double v) { $_setFloat(7, v); } + @$pb.TagNumber(17) + $core.bool hasFloat() => $_has(7); + @$pb.TagNumber(17) + void clearFloat() => clearField(17); + + @$pb.TagNumber(18) + $core.double get double_18 => $_getN(8); + @$pb.TagNumber(18) + set double_18($core.double v) { $_setDouble(8, v); } + @$pb.TagNumber(18) + $core.bool hasDouble_18() => $_has(8); + @$pb.TagNumber(18) + void clearDouble_18() => clearField(18); + + @$pb.TagNumber(21) + StringArray get stringArray => $_getN(9); + @$pb.TagNumber(21) + set stringArray(StringArray v) { setField(21, v); } + @$pb.TagNumber(21) + $core.bool hasStringArray() => $_has(9); + @$pb.TagNumber(21) + void clearStringArray() => clearField(21); + @$pb.TagNumber(21) + StringArray ensureStringArray() => $_ensure(9); + + @$pb.TagNumber(22) + BoolArray get boolArray => $_getN(10); + @$pb.TagNumber(22) + set boolArray(BoolArray v) { setField(22, v); } + @$pb.TagNumber(22) + $core.bool hasBoolArray() => $_has(10); + @$pb.TagNumber(22) + void clearBoolArray() => clearField(22); + @$pb.TagNumber(22) + BoolArray ensureBoolArray() => $_ensure(10); + + @$pb.TagNumber(23) + Int32Array get int32Array => $_getN(11); + @$pb.TagNumber(23) + set int32Array(Int32Array v) { setField(23, v); } + @$pb.TagNumber(23) + $core.bool hasInt32Array() => $_has(11); + @$pb.TagNumber(23) + void clearInt32Array() => clearField(23); + @$pb.TagNumber(23) + Int32Array ensureInt32Array() => $_ensure(11); + + @$pb.TagNumber(24) + Int64Array get int64Array => $_getN(12); + @$pb.TagNumber(24) + set int64Array(Int64Array v) { setField(24, v); } + @$pb.TagNumber(24) + $core.bool hasInt64Array() => $_has(12); + @$pb.TagNumber(24) + void clearInt64Array() => clearField(24); + @$pb.TagNumber(24) + Int64Array ensureInt64Array() => $_ensure(12); + + @$pb.TagNumber(25) + Uint32Array get uint32Array => $_getN(13); + @$pb.TagNumber(25) + set uint32Array(Uint32Array v) { setField(25, v); } + @$pb.TagNumber(25) + $core.bool hasUint32Array() => $_has(13); + @$pb.TagNumber(25) + void clearUint32Array() => clearField(25); + @$pb.TagNumber(25) + Uint32Array ensureUint32Array() => $_ensure(13); + + @$pb.TagNumber(26) + Uint64Array get uint64Array => $_getN(14); + @$pb.TagNumber(26) + set uint64Array(Uint64Array v) { setField(26, v); } + @$pb.TagNumber(26) + $core.bool hasUint64Array() => $_has(14); + @$pb.TagNumber(26) + void clearUint64Array() => clearField(26); + @$pb.TagNumber(26) + Uint64Array ensureUint64Array() => $_ensure(14); + + @$pb.TagNumber(27) + FloatArray get floatArray => $_getN(15); + @$pb.TagNumber(27) + set floatArray(FloatArray v) { setField(27, v); } + @$pb.TagNumber(27) + $core.bool hasFloatArray() => $_has(15); + @$pb.TagNumber(27) + void clearFloatArray() => clearField(27); + @$pb.TagNumber(27) + FloatArray ensureFloatArray() => $_ensure(15); + + @$pb.TagNumber(28) + DoubleArray get doubleArray => $_getN(16); + @$pb.TagNumber(28) + set doubleArray(DoubleArray v) { setField(28, v); } + @$pb.TagNumber(28) + $core.bool hasDoubleArray() => $_has(16); + @$pb.TagNumber(28) + void clearDoubleArray() => clearField(28); + @$pb.TagNumber(28) + DoubleArray ensureDoubleArray() => $_ensure(16); +} + +enum Metadata_EntrySpecific { + actuator, + sensor, + attribute, + notSet +} + +class Metadata extends $pb.GeneratedMessage { + static const $core.Map<$core.int, Metadata_EntrySpecific> _Metadata_EntrySpecificByTag = { + 20 : Metadata_EntrySpecific.actuator, + 30 : Metadata_EntrySpecific.sensor, + 40 : Metadata_EntrySpecific.attribute, + 0 : Metadata_EntrySpecific.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Metadata', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..oo(0, [20, 30, 40]) + ..e<DataType>(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'dataType', $pb.PbFieldType.OE, defaultOrMaker: DataType.DATA_TYPE_UNSPECIFIED, valueOf: DataType.valueOf, enumValues: DataType.values) + ..e<EntryType>(12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'entryType', $pb.PbFieldType.OE, defaultOrMaker: EntryType.ENTRY_TYPE_UNSPECIFIED, valueOf: EntryType.valueOf, enumValues: EntryType.values) + ..aOS(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'description') + ..aOS(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'comment') + ..aOS(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'deprecation') + ..aOS(16, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unit') + ..aOM<ValueRestriction>(17, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'valueRestriction', subBuilder: ValueRestriction.create) + ..aOM<Actuator>(20, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'actuator', subBuilder: Actuator.create) + ..aOM<Sensor>(30, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sensor', subBuilder: Sensor.create) + ..aOM<Attribute>(40, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'attribute', subBuilder: Attribute.create) + ..hasRequiredFields = false + ; + + Metadata._() : super(); + factory Metadata({ + DataType? dataType, + EntryType? entryType, + $core.String? description, + $core.String? comment, + $core.String? deprecation, + $core.String? unit, + ValueRestriction? valueRestriction, + Actuator? actuator, + Sensor? sensor, + Attribute? attribute, + }) { + final _result = create(); + if (dataType != null) { + _result.dataType = dataType; + } + if (entryType != null) { + _result.entryType = entryType; + } + if (description != null) { + _result.description = description; + } + if (comment != null) { + _result.comment = comment; + } + if (deprecation != null) { + _result.deprecation = deprecation; + } + if (unit != null) { + _result.unit = unit; + } + if (valueRestriction != null) { + _result.valueRestriction = valueRestriction; + } + if (actuator != null) { + _result.actuator = actuator; + } + if (sensor != null) { + _result.sensor = sensor; + } + if (attribute != null) { + _result.attribute = attribute; + } + return _result; + } + factory Metadata.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Metadata.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Metadata clone() => Metadata()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Metadata copyWith(void Function(Metadata) updates) => super.copyWith((message) => updates(message as Metadata)) as Metadata; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Metadata create() => Metadata._(); + Metadata createEmptyInstance() => create(); + static $pb.PbList<Metadata> createRepeated() => $pb.PbList<Metadata>(); + @$core.pragma('dart2js:noInline') + static Metadata getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Metadata>(create); + static Metadata? _defaultInstance; + + Metadata_EntrySpecific whichEntrySpecific() => _Metadata_EntrySpecificByTag[$_whichOneof(0)]!; + void clearEntrySpecific() => clearField($_whichOneof(0)); + + @$pb.TagNumber(11) + DataType get dataType => $_getN(0); + @$pb.TagNumber(11) + set dataType(DataType v) { setField(11, v); } + @$pb.TagNumber(11) + $core.bool hasDataType() => $_has(0); + @$pb.TagNumber(11) + void clearDataType() => clearField(11); + + @$pb.TagNumber(12) + EntryType get entryType => $_getN(1); + @$pb.TagNumber(12) + set entryType(EntryType v) { setField(12, v); } + @$pb.TagNumber(12) + $core.bool hasEntryType() => $_has(1); + @$pb.TagNumber(12) + void clearEntryType() => clearField(12); + + @$pb.TagNumber(13) + $core.String get description => $_getSZ(2); + @$pb.TagNumber(13) + set description($core.String v) { $_setString(2, v); } + @$pb.TagNumber(13) + $core.bool hasDescription() => $_has(2); + @$pb.TagNumber(13) + void clearDescription() => clearField(13); + + @$pb.TagNumber(14) + $core.String get comment => $_getSZ(3); + @$pb.TagNumber(14) + set comment($core.String v) { $_setString(3, v); } + @$pb.TagNumber(14) + $core.bool hasComment() => $_has(3); + @$pb.TagNumber(14) + void clearComment() => clearField(14); + + @$pb.TagNumber(15) + $core.String get deprecation => $_getSZ(4); + @$pb.TagNumber(15) + set deprecation($core.String v) { $_setString(4, v); } + @$pb.TagNumber(15) + $core.bool hasDeprecation() => $_has(4); + @$pb.TagNumber(15) + void clearDeprecation() => clearField(15); + + @$pb.TagNumber(16) + $core.String get unit => $_getSZ(5); + @$pb.TagNumber(16) + set unit($core.String v) { $_setString(5, v); } + @$pb.TagNumber(16) + $core.bool hasUnit() => $_has(5); + @$pb.TagNumber(16) + void clearUnit() => clearField(16); + + @$pb.TagNumber(17) + ValueRestriction get valueRestriction => $_getN(6); + @$pb.TagNumber(17) + set valueRestriction(ValueRestriction v) { setField(17, v); } + @$pb.TagNumber(17) + $core.bool hasValueRestriction() => $_has(6); + @$pb.TagNumber(17) + void clearValueRestriction() => clearField(17); + @$pb.TagNumber(17) + ValueRestriction ensureValueRestriction() => $_ensure(6); + + @$pb.TagNumber(20) + Actuator get actuator => $_getN(7); + @$pb.TagNumber(20) + set actuator(Actuator v) { setField(20, v); } + @$pb.TagNumber(20) + $core.bool hasActuator() => $_has(7); + @$pb.TagNumber(20) + void clearActuator() => clearField(20); + @$pb.TagNumber(20) + Actuator ensureActuator() => $_ensure(7); + + @$pb.TagNumber(30) + Sensor get sensor => $_getN(8); + @$pb.TagNumber(30) + set sensor(Sensor v) { setField(30, v); } + @$pb.TagNumber(30) + $core.bool hasSensor() => $_has(8); + @$pb.TagNumber(30) + void clearSensor() => clearField(30); + @$pb.TagNumber(30) + Sensor ensureSensor() => $_ensure(8); + + @$pb.TagNumber(40) + Attribute get attribute => $_getN(9); + @$pb.TagNumber(40) + set attribute(Attribute v) { setField(40, v); } + @$pb.TagNumber(40) + $core.bool hasAttribute() => $_has(9); + @$pb.TagNumber(40) + void clearAttribute() => clearField(40); + @$pb.TagNumber(40) + Attribute ensureAttribute() => $_ensure(9); +} + +class Actuator extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Actuator', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + Actuator._() : super(); + factory Actuator() => create(); + factory Actuator.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Actuator.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Actuator clone() => Actuator()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Actuator copyWith(void Function(Actuator) updates) => super.copyWith((message) => updates(message as Actuator)) as Actuator; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Actuator create() => Actuator._(); + Actuator createEmptyInstance() => create(); + static $pb.PbList<Actuator> createRepeated() => $pb.PbList<Actuator>(); + @$core.pragma('dart2js:noInline') + static Actuator getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Actuator>(create); + static Actuator? _defaultInstance; +} + +class Sensor extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Sensor', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + Sensor._() : super(); + factory Sensor() => create(); + factory Sensor.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Sensor.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Sensor clone() => Sensor()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Sensor copyWith(void Function(Sensor) updates) => super.copyWith((message) => updates(message as Sensor)) as Sensor; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Sensor create() => Sensor._(); + Sensor createEmptyInstance() => create(); + static $pb.PbList<Sensor> createRepeated() => $pb.PbList<Sensor>(); + @$core.pragma('dart2js:noInline') + static Sensor getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Sensor>(create); + static Sensor? _defaultInstance; +} + +class Attribute extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Attribute', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + Attribute._() : super(); + factory Attribute() => create(); + factory Attribute.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Attribute.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Attribute clone() => Attribute()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Attribute copyWith(void Function(Attribute) updates) => super.copyWith((message) => updates(message as Attribute)) as Attribute; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Attribute create() => Attribute._(); + Attribute createEmptyInstance() => create(); + static $pb.PbList<Attribute> createRepeated() => $pb.PbList<Attribute>(); + @$core.pragma('dart2js:noInline') + static Attribute getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Attribute>(create); + static Attribute? _defaultInstance; +} + +enum ValueRestriction_Type { + string, + signed, + unsigned, + floatingPoint, + notSet +} + +class ValueRestriction extends $pb.GeneratedMessage { + static const $core.Map<$core.int, ValueRestriction_Type> _ValueRestriction_TypeByTag = { + 21 : ValueRestriction_Type.string, + 22 : ValueRestriction_Type.signed, + 23 : ValueRestriction_Type.unsigned, + 24 : ValueRestriction_Type.floatingPoint, + 0 : ValueRestriction_Type.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValueRestriction', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..oo(0, [21, 22, 23, 24]) + ..aOM<ValueRestrictionString>(21, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'string', subBuilder: ValueRestrictionString.create) + ..aOM<ValueRestrictionInt>(22, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signed', subBuilder: ValueRestrictionInt.create) + ..aOM<ValueRestrictionUint>(23, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unsigned', subBuilder: ValueRestrictionUint.create) + ..aOM<ValueRestrictionFloat>(24, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'floatingPoint', subBuilder: ValueRestrictionFloat.create) + ..hasRequiredFields = false + ; + + ValueRestriction._() : super(); + factory ValueRestriction({ + ValueRestrictionString? string, + ValueRestrictionInt? signed, + ValueRestrictionUint? unsigned, + ValueRestrictionFloat? floatingPoint, + }) { + final _result = create(); + if (string != null) { + _result.string = string; + } + if (signed != null) { + _result.signed = signed; + } + if (unsigned != null) { + _result.unsigned = unsigned; + } + if (floatingPoint != null) { + _result.floatingPoint = floatingPoint; + } + return _result; + } + factory ValueRestriction.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ValueRestriction.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ValueRestriction clone() => ValueRestriction()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ValueRestriction copyWith(void Function(ValueRestriction) updates) => super.copyWith((message) => updates(message as ValueRestriction)) as ValueRestriction; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ValueRestriction create() => ValueRestriction._(); + ValueRestriction createEmptyInstance() => create(); + static $pb.PbList<ValueRestriction> createRepeated() => $pb.PbList<ValueRestriction>(); + @$core.pragma('dart2js:noInline') + static ValueRestriction getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ValueRestriction>(create); + static ValueRestriction? _defaultInstance; + + ValueRestriction_Type whichType() => _ValueRestriction_TypeByTag[$_whichOneof(0)]!; + void clearType() => clearField($_whichOneof(0)); + + @$pb.TagNumber(21) + ValueRestrictionString get string => $_getN(0); + @$pb.TagNumber(21) + set string(ValueRestrictionString v) { setField(21, v); } + @$pb.TagNumber(21) + $core.bool hasString() => $_has(0); + @$pb.TagNumber(21) + void clearString() => clearField(21); + @$pb.TagNumber(21) + ValueRestrictionString ensureString() => $_ensure(0); + + @$pb.TagNumber(22) + ValueRestrictionInt get signed => $_getN(1); + @$pb.TagNumber(22) + set signed(ValueRestrictionInt v) { setField(22, v); } + @$pb.TagNumber(22) + $core.bool hasSigned() => $_has(1); + @$pb.TagNumber(22) + void clearSigned() => clearField(22); + @$pb.TagNumber(22) + ValueRestrictionInt ensureSigned() => $_ensure(1); + + @$pb.TagNumber(23) + ValueRestrictionUint get unsigned => $_getN(2); + @$pb.TagNumber(23) + set unsigned(ValueRestrictionUint v) { setField(23, v); } + @$pb.TagNumber(23) + $core.bool hasUnsigned() => $_has(2); + @$pb.TagNumber(23) + void clearUnsigned() => clearField(23); + @$pb.TagNumber(23) + ValueRestrictionUint ensureUnsigned() => $_ensure(2); + + @$pb.TagNumber(24) + ValueRestrictionFloat get floatingPoint => $_getN(3); + @$pb.TagNumber(24) + set floatingPoint(ValueRestrictionFloat v) { setField(24, v); } + @$pb.TagNumber(24) + $core.bool hasFloatingPoint() => $_has(3); + @$pb.TagNumber(24) + void clearFloatingPoint() => clearField(24); + @$pb.TagNumber(24) + ValueRestrictionFloat ensureFloatingPoint() => $_ensure(3); +} + +class ValueRestrictionInt extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValueRestrictionInt', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..a<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'min', $pb.PbFieldType.OS6, defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$fixnum.Int64>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'max', $pb.PbFieldType.OS6, defaultOrMaker: $fixnum.Int64.ZERO) + ..p<$fixnum.Int64>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'allowedValues', $pb.PbFieldType.KS6) + ..hasRequiredFields = false + ; + + ValueRestrictionInt._() : super(); + factory ValueRestrictionInt({ + $fixnum.Int64? min, + $fixnum.Int64? max, + $core.Iterable<$fixnum.Int64>? allowedValues, + }) { + final _result = create(); + if (min != null) { + _result.min = min; + } + if (max != null) { + _result.max = max; + } + if (allowedValues != null) { + _result.allowedValues.addAll(allowedValues); + } + return _result; + } + factory ValueRestrictionInt.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ValueRestrictionInt.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ValueRestrictionInt clone() => ValueRestrictionInt()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ValueRestrictionInt copyWith(void Function(ValueRestrictionInt) updates) => super.copyWith((message) => updates(message as ValueRestrictionInt)) as ValueRestrictionInt; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ValueRestrictionInt create() => ValueRestrictionInt._(); + ValueRestrictionInt createEmptyInstance() => create(); + static $pb.PbList<ValueRestrictionInt> createRepeated() => $pb.PbList<ValueRestrictionInt>(); + @$core.pragma('dart2js:noInline') + static ValueRestrictionInt getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ValueRestrictionInt>(create); + static ValueRestrictionInt? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get min => $_getI64(0); + @$pb.TagNumber(1) + set min($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasMin() => $_has(0); + @$pb.TagNumber(1) + void clearMin() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get max => $_getI64(1); + @$pb.TagNumber(2) + set max($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasMax() => $_has(1); + @$pb.TagNumber(2) + void clearMax() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$fixnum.Int64> get allowedValues => $_getList(2); +} + +class ValueRestrictionUint extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValueRestrictionUint', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..a<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'min', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$fixnum.Int64>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'max', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..p<$fixnum.Int64>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'allowedValues', $pb.PbFieldType.KU6) + ..hasRequiredFields = false + ; + + ValueRestrictionUint._() : super(); + factory ValueRestrictionUint({ + $fixnum.Int64? min, + $fixnum.Int64? max, + $core.Iterable<$fixnum.Int64>? allowedValues, + }) { + final _result = create(); + if (min != null) { + _result.min = min; + } + if (max != null) { + _result.max = max; + } + if (allowedValues != null) { + _result.allowedValues.addAll(allowedValues); + } + return _result; + } + factory ValueRestrictionUint.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ValueRestrictionUint.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ValueRestrictionUint clone() => ValueRestrictionUint()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ValueRestrictionUint copyWith(void Function(ValueRestrictionUint) updates) => super.copyWith((message) => updates(message as ValueRestrictionUint)) as ValueRestrictionUint; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ValueRestrictionUint create() => ValueRestrictionUint._(); + ValueRestrictionUint createEmptyInstance() => create(); + static $pb.PbList<ValueRestrictionUint> createRepeated() => $pb.PbList<ValueRestrictionUint>(); + @$core.pragma('dart2js:noInline') + static ValueRestrictionUint getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ValueRestrictionUint>(create); + static ValueRestrictionUint? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get min => $_getI64(0); + @$pb.TagNumber(1) + set min($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasMin() => $_has(0); + @$pb.TagNumber(1) + void clearMin() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get max => $_getI64(1); + @$pb.TagNumber(2) + set max($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasMax() => $_has(1); + @$pb.TagNumber(2) + void clearMax() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$fixnum.Int64> get allowedValues => $_getList(2); +} + +class ValueRestrictionFloat extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValueRestrictionFloat', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..a<$core.double>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'min', $pb.PbFieldType.OD) + ..a<$core.double>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'max', $pb.PbFieldType.OD) + ..p<$core.double>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'allowedValues', $pb.PbFieldType.KD) + ..hasRequiredFields = false + ; + + ValueRestrictionFloat._() : super(); + factory ValueRestrictionFloat({ + $core.double? min, + $core.double? max, + $core.Iterable<$core.double>? allowedValues, + }) { + final _result = create(); + if (min != null) { + _result.min = min; + } + if (max != null) { + _result.max = max; + } + if (allowedValues != null) { + _result.allowedValues.addAll(allowedValues); + } + return _result; + } + factory ValueRestrictionFloat.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ValueRestrictionFloat.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ValueRestrictionFloat clone() => ValueRestrictionFloat()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ValueRestrictionFloat copyWith(void Function(ValueRestrictionFloat) updates) => super.copyWith((message) => updates(message as ValueRestrictionFloat)) as ValueRestrictionFloat; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ValueRestrictionFloat create() => ValueRestrictionFloat._(); + ValueRestrictionFloat createEmptyInstance() => create(); + static $pb.PbList<ValueRestrictionFloat> createRepeated() => $pb.PbList<ValueRestrictionFloat>(); + @$core.pragma('dart2js:noInline') + static ValueRestrictionFloat getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ValueRestrictionFloat>(create); + static ValueRestrictionFloat? _defaultInstance; + + @$pb.TagNumber(1) + $core.double get min => $_getN(0); + @$pb.TagNumber(1) + set min($core.double v) { $_setDouble(0, v); } + @$pb.TagNumber(1) + $core.bool hasMin() => $_has(0); + @$pb.TagNumber(1) + void clearMin() => clearField(1); + + @$pb.TagNumber(2) + $core.double get max => $_getN(1); + @$pb.TagNumber(2) + set max($core.double v) { $_setDouble(1, v); } + @$pb.TagNumber(2) + $core.bool hasMax() => $_has(1); + @$pb.TagNumber(2) + void clearMax() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.double> get allowedValues => $_getList(2); +} + +class ValueRestrictionString extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValueRestrictionString', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..pPS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'allowedValues') + ..hasRequiredFields = false + ; + + ValueRestrictionString._() : super(); + factory ValueRestrictionString({ + $core.Iterable<$core.String>? allowedValues, + }) { + final _result = create(); + if (allowedValues != null) { + _result.allowedValues.addAll(allowedValues); + } + return _result; + } + factory ValueRestrictionString.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ValueRestrictionString.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ValueRestrictionString clone() => ValueRestrictionString()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ValueRestrictionString copyWith(void Function(ValueRestrictionString) updates) => super.copyWith((message) => updates(message as ValueRestrictionString)) as ValueRestrictionString; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ValueRestrictionString create() => ValueRestrictionString._(); + ValueRestrictionString createEmptyInstance() => create(); + static $pb.PbList<ValueRestrictionString> createRepeated() => $pb.PbList<ValueRestrictionString>(); + @$core.pragma('dart2js:noInline') + static ValueRestrictionString getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ValueRestrictionString>(create); + static ValueRestrictionString? _defaultInstance; + + @$pb.TagNumber(3) + $core.List<$core.String> get allowedValues => $_getList(0); +} + +class Error extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Error', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'code', $pb.PbFieldType.OU3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'reason') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') + ..hasRequiredFields = false + ; + + Error._() : super(); + factory Error({ + $core.int? code, + $core.String? reason, + $core.String? message, + }) { + final _result = create(); + if (code != null) { + _result.code = code; + } + if (reason != null) { + _result.reason = reason; + } + if (message != null) { + _result.message = message; + } + return _result; + } + factory Error.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Error.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Error clone() => Error()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Error copyWith(void Function(Error) updates) => super.copyWith((message) => updates(message as Error)) as Error; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Error create() => Error._(); + Error createEmptyInstance() => create(); + static $pb.PbList<Error> createRepeated() => $pb.PbList<Error>(); + @$core.pragma('dart2js:noInline') + static Error getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Error>(create); + static Error? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get code => $_getIZ(0); + @$pb.TagNumber(1) + set code($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasCode() => $_has(0); + @$pb.TagNumber(1) + void clearCode() => clearField(1); + + @$pb.TagNumber(2) + $core.String get reason => $_getSZ(1); + @$pb.TagNumber(2) + set reason($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasReason() => $_has(1); + @$pb.TagNumber(2) + void clearReason() => clearField(2); + + @$pb.TagNumber(3) + $core.String get message => $_getSZ(2); + @$pb.TagNumber(3) + set message($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasMessage() => $_has(2); + @$pb.TagNumber(3) + void clearMessage() => clearField(3); +} + +class DataEntryError extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DataEntryError', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'path') + ..aOM<Error>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'error', subBuilder: Error.create) + ..hasRequiredFields = false + ; + + DataEntryError._() : super(); + factory DataEntryError({ + $core.String? path, + Error? error, + }) { + final _result = create(); + if (path != null) { + _result.path = path; + } + if (error != null) { + _result.error = error; + } + return _result; + } + factory DataEntryError.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DataEntryError.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DataEntryError clone() => DataEntryError()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DataEntryError copyWith(void Function(DataEntryError) updates) => super.copyWith((message) => updates(message as DataEntryError)) as DataEntryError; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static DataEntryError create() => DataEntryError._(); + DataEntryError createEmptyInstance() => create(); + static $pb.PbList<DataEntryError> createRepeated() => $pb.PbList<DataEntryError>(); + @$core.pragma('dart2js:noInline') + static DataEntryError getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DataEntryError>(create); + static DataEntryError? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get path => $_getSZ(0); + @$pb.TagNumber(1) + set path($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPath() => $_has(0); + @$pb.TagNumber(1) + void clearPath() => clearField(1); + + @$pb.TagNumber(2) + Error get error => $_getN(1); + @$pb.TagNumber(2) + set error(Error v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasError() => $_has(1); + @$pb.TagNumber(2) + void clearError() => clearField(2); + @$pb.TagNumber(2) + Error ensureError() => $_ensure(1); +} + +class StringArray extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'StringArray', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values') + ..hasRequiredFields = false + ; + + StringArray._() : super(); + factory StringArray({ + $core.Iterable<$core.String>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory StringArray.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory StringArray.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + StringArray clone() => StringArray()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + StringArray copyWith(void Function(StringArray) updates) => super.copyWith((message) => updates(message as StringArray)) as StringArray; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static StringArray create() => StringArray._(); + StringArray createEmptyInstance() => create(); + static $pb.PbList<StringArray> createRepeated() => $pb.PbList<StringArray>(); + @$core.pragma('dart2js:noInline') + static StringArray getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<StringArray>(create); + static StringArray? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.String> get values => $_getList(0); +} + +class BoolArray extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BoolArray', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..p<$core.bool>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values', $pb.PbFieldType.KB) + ..hasRequiredFields = false + ; + + BoolArray._() : super(); + factory BoolArray({ + $core.Iterable<$core.bool>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory BoolArray.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BoolArray.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BoolArray clone() => BoolArray()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BoolArray copyWith(void Function(BoolArray) updates) => super.copyWith((message) => updates(message as BoolArray)) as BoolArray; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static BoolArray create() => BoolArray._(); + BoolArray createEmptyInstance() => create(); + static $pb.PbList<BoolArray> createRepeated() => $pb.PbList<BoolArray>(); + @$core.pragma('dart2js:noInline') + static BoolArray getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BoolArray>(create); + static BoolArray? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.bool> get values => $_getList(0); +} + +class Int32Array extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Int32Array', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..p<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values', $pb.PbFieldType.KS3) + ..hasRequiredFields = false + ; + + Int32Array._() : super(); + factory Int32Array({ + $core.Iterable<$core.int>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory Int32Array.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Int32Array.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Int32Array clone() => Int32Array()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Int32Array copyWith(void Function(Int32Array) updates) => super.copyWith((message) => updates(message as Int32Array)) as Int32Array; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Int32Array create() => Int32Array._(); + Int32Array createEmptyInstance() => create(); + static $pb.PbList<Int32Array> createRepeated() => $pb.PbList<Int32Array>(); + @$core.pragma('dart2js:noInline') + static Int32Array getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Int32Array>(create); + static Int32Array? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get values => $_getList(0); +} + +class Int64Array extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Int64Array', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..p<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values', $pb.PbFieldType.KS6) + ..hasRequiredFields = false + ; + + Int64Array._() : super(); + factory Int64Array({ + $core.Iterable<$fixnum.Int64>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory Int64Array.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Int64Array.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Int64Array clone() => Int64Array()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Int64Array copyWith(void Function(Int64Array) updates) => super.copyWith((message) => updates(message as Int64Array)) as Int64Array; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Int64Array create() => Int64Array._(); + Int64Array createEmptyInstance() => create(); + static $pb.PbList<Int64Array> createRepeated() => $pb.PbList<Int64Array>(); + @$core.pragma('dart2js:noInline') + static Int64Array getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Int64Array>(create); + static Int64Array? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$fixnum.Int64> get values => $_getList(0); +} + +class Uint32Array extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Uint32Array', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..p<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values', $pb.PbFieldType.KU3) + ..hasRequiredFields = false + ; + + Uint32Array._() : super(); + factory Uint32Array({ + $core.Iterable<$core.int>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory Uint32Array.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Uint32Array.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Uint32Array clone() => Uint32Array()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Uint32Array copyWith(void Function(Uint32Array) updates) => super.copyWith((message) => updates(message as Uint32Array)) as Uint32Array; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Uint32Array create() => Uint32Array._(); + Uint32Array createEmptyInstance() => create(); + static $pb.PbList<Uint32Array> createRepeated() => $pb.PbList<Uint32Array>(); + @$core.pragma('dart2js:noInline') + static Uint32Array getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Uint32Array>(create); + static Uint32Array? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get values => $_getList(0); +} + +class Uint64Array extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Uint64Array', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..p<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values', $pb.PbFieldType.KU6) + ..hasRequiredFields = false + ; + + Uint64Array._() : super(); + factory Uint64Array({ + $core.Iterable<$fixnum.Int64>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory Uint64Array.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Uint64Array.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Uint64Array clone() => Uint64Array()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Uint64Array copyWith(void Function(Uint64Array) updates) => super.copyWith((message) => updates(message as Uint64Array)) as Uint64Array; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Uint64Array create() => Uint64Array._(); + Uint64Array createEmptyInstance() => create(); + static $pb.PbList<Uint64Array> createRepeated() => $pb.PbList<Uint64Array>(); + @$core.pragma('dart2js:noInline') + static Uint64Array getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Uint64Array>(create); + static Uint64Array? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$fixnum.Int64> get values => $_getList(0); +} + +class FloatArray extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'FloatArray', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..p<$core.double>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values', $pb.PbFieldType.KF) + ..hasRequiredFields = false + ; + + FloatArray._() : super(); + factory FloatArray({ + $core.Iterable<$core.double>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory FloatArray.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory FloatArray.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + FloatArray clone() => FloatArray()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + FloatArray copyWith(void Function(FloatArray) updates) => super.copyWith((message) => updates(message as FloatArray)) as FloatArray; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static FloatArray create() => FloatArray._(); + FloatArray createEmptyInstance() => create(); + static $pb.PbList<FloatArray> createRepeated() => $pb.PbList<FloatArray>(); + @$core.pragma('dart2js:noInline') + static FloatArray getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<FloatArray>(create); + static FloatArray? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.double> get values => $_getList(0); +} + +class DoubleArray extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DoubleArray', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..p<$core.double>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'values', $pb.PbFieldType.KD) + ..hasRequiredFields = false + ; + + DoubleArray._() : super(); + factory DoubleArray({ + $core.Iterable<$core.double>? values, + }) { + final _result = create(); + if (values != null) { + _result.values.addAll(values); + } + return _result; + } + factory DoubleArray.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory DoubleArray.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + DoubleArray clone() => DoubleArray()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + DoubleArray copyWith(void Function(DoubleArray) updates) => super.copyWith((message) => updates(message as DoubleArray)) as DoubleArray; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static DoubleArray create() => DoubleArray._(); + DoubleArray createEmptyInstance() => create(); + static $pb.PbList<DoubleArray> createRepeated() => $pb.PbList<DoubleArray>(); + @$core.pragma('dart2js:noInline') + static DoubleArray getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DoubleArray>(create); + static DoubleArray? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.double> get values => $_getList(0); +} + diff --git a/lib/generated/kuksa/val/v1/types.pbenum.dart b/lib/generated/kuksa/val/v1/types.pbenum.dart new file mode 100644 index 0000000..745d50a --- /dev/null +++ b/lib/generated/kuksa/val/v1/types.pbenum.dart @@ -0,0 +1,159 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/types.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: UNDEFINED_SHOWN_NAME +import 'dart:core' as $core; +import 'package:protobuf/protobuf.dart' as $pb; + +class DataType extends $pb.ProtobufEnum { + static const DataType DATA_TYPE_UNSPECIFIED = DataType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UNSPECIFIED'); + static const DataType DATA_TYPE_STRING = DataType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_STRING'); + static const DataType DATA_TYPE_BOOLEAN = DataType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_BOOLEAN'); + static const DataType DATA_TYPE_INT8 = DataType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT8'); + static const DataType DATA_TYPE_INT16 = DataType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT16'); + static const DataType DATA_TYPE_INT32 = DataType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT32'); + static const DataType DATA_TYPE_INT64 = DataType._(6, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT64'); + static const DataType DATA_TYPE_UINT8 = DataType._(7, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT8'); + static const DataType DATA_TYPE_UINT16 = DataType._(8, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT16'); + static const DataType DATA_TYPE_UINT32 = DataType._(9, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT32'); + static const DataType DATA_TYPE_UINT64 = DataType._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT64'); + static const DataType DATA_TYPE_FLOAT = DataType._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_FLOAT'); + static const DataType DATA_TYPE_DOUBLE = DataType._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_DOUBLE'); + static const DataType DATA_TYPE_TIMESTAMP = DataType._(13, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_TIMESTAMP'); + static const DataType DATA_TYPE_STRING_ARRAY = DataType._(20, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_STRING_ARRAY'); + static const DataType DATA_TYPE_BOOLEAN_ARRAY = DataType._(21, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_BOOLEAN_ARRAY'); + static const DataType DATA_TYPE_INT8_ARRAY = DataType._(22, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT8_ARRAY'); + static const DataType DATA_TYPE_INT16_ARRAY = DataType._(23, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT16_ARRAY'); + static const DataType DATA_TYPE_INT32_ARRAY = DataType._(24, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT32_ARRAY'); + static const DataType DATA_TYPE_INT64_ARRAY = DataType._(25, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_INT64_ARRAY'); + static const DataType DATA_TYPE_UINT8_ARRAY = DataType._(26, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT8_ARRAY'); + static const DataType DATA_TYPE_UINT16_ARRAY = DataType._(27, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT16_ARRAY'); + static const DataType DATA_TYPE_UINT32_ARRAY = DataType._(28, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT32_ARRAY'); + static const DataType DATA_TYPE_UINT64_ARRAY = DataType._(29, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_UINT64_ARRAY'); + static const DataType DATA_TYPE_FLOAT_ARRAY = DataType._(30, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_FLOAT_ARRAY'); + static const DataType DATA_TYPE_DOUBLE_ARRAY = DataType._(31, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_DOUBLE_ARRAY'); + static const DataType DATA_TYPE_TIMESTAMP_ARRAY = DataType._(32, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DATA_TYPE_TIMESTAMP_ARRAY'); + + static const $core.List<DataType> values = <DataType> [ + DATA_TYPE_UNSPECIFIED, + DATA_TYPE_STRING, + DATA_TYPE_BOOLEAN, + DATA_TYPE_INT8, + DATA_TYPE_INT16, + DATA_TYPE_INT32, + DATA_TYPE_INT64, + DATA_TYPE_UINT8, + DATA_TYPE_UINT16, + DATA_TYPE_UINT32, + DATA_TYPE_UINT64, + DATA_TYPE_FLOAT, + DATA_TYPE_DOUBLE, + DATA_TYPE_TIMESTAMP, + DATA_TYPE_STRING_ARRAY, + DATA_TYPE_BOOLEAN_ARRAY, + DATA_TYPE_INT8_ARRAY, + DATA_TYPE_INT16_ARRAY, + DATA_TYPE_INT32_ARRAY, + DATA_TYPE_INT64_ARRAY, + DATA_TYPE_UINT8_ARRAY, + DATA_TYPE_UINT16_ARRAY, + DATA_TYPE_UINT32_ARRAY, + DATA_TYPE_UINT64_ARRAY, + DATA_TYPE_FLOAT_ARRAY, + DATA_TYPE_DOUBLE_ARRAY, + DATA_TYPE_TIMESTAMP_ARRAY, + ]; + + static final $core.Map<$core.int, DataType> _byValue = $pb.ProtobufEnum.initByValue(values); + static DataType? valueOf($core.int value) => _byValue[value]; + + const DataType._($core.int v, $core.String n) : super(v, n); +} + +class EntryType extends $pb.ProtobufEnum { + static const EntryType ENTRY_TYPE_UNSPECIFIED = EntryType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ENTRY_TYPE_UNSPECIFIED'); + static const EntryType ENTRY_TYPE_ATTRIBUTE = EntryType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ENTRY_TYPE_ATTRIBUTE'); + static const EntryType ENTRY_TYPE_SENSOR = EntryType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ENTRY_TYPE_SENSOR'); + static const EntryType ENTRY_TYPE_ACTUATOR = EntryType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ENTRY_TYPE_ACTUATOR'); + + static const $core.List<EntryType> values = <EntryType> [ + ENTRY_TYPE_UNSPECIFIED, + ENTRY_TYPE_ATTRIBUTE, + ENTRY_TYPE_SENSOR, + ENTRY_TYPE_ACTUATOR, + ]; + + static final $core.Map<$core.int, EntryType> _byValue = $pb.ProtobufEnum.initByValue(values); + static EntryType? valueOf($core.int value) => _byValue[value]; + + const EntryType._($core.int v, $core.String n) : super(v, n); +} + +class View extends $pb.ProtobufEnum { + static const View VIEW_UNSPECIFIED = View._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIEW_UNSPECIFIED'); + static const View VIEW_CURRENT_VALUE = View._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIEW_CURRENT_VALUE'); + static const View VIEW_TARGET_VALUE = View._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIEW_TARGET_VALUE'); + static const View VIEW_METADATA = View._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIEW_METADATA'); + static const View VIEW_FIELDS = View._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIEW_FIELDS'); + static const View VIEW_ALL = View._(20, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VIEW_ALL'); + + static const $core.List<View> values = <View> [ + VIEW_UNSPECIFIED, + VIEW_CURRENT_VALUE, + VIEW_TARGET_VALUE, + VIEW_METADATA, + VIEW_FIELDS, + VIEW_ALL, + ]; + + static final $core.Map<$core.int, View> _byValue = $pb.ProtobufEnum.initByValue(values); + static View? valueOf($core.int value) => _byValue[value]; + + const View._($core.int v, $core.String n) : super(v, n); +} + +class Field extends $pb.ProtobufEnum { + static const Field FIELD_UNSPECIFIED = Field._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_UNSPECIFIED'); + static const Field FIELD_PATH = Field._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_PATH'); + static const Field FIELD_VALUE = Field._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_VALUE'); + static const Field FIELD_ACTUATOR_TARGET = Field._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_ACTUATOR_TARGET'); + static const Field FIELD_METADATA = Field._(10, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA'); + static const Field FIELD_METADATA_DATA_TYPE = Field._(11, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_DATA_TYPE'); + static const Field FIELD_METADATA_DESCRIPTION = Field._(12, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_DESCRIPTION'); + static const Field FIELD_METADATA_ENTRY_TYPE = Field._(13, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_ENTRY_TYPE'); + static const Field FIELD_METADATA_COMMENT = Field._(14, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_COMMENT'); + static const Field FIELD_METADATA_DEPRECATION = Field._(15, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_DEPRECATION'); + static const Field FIELD_METADATA_UNIT = Field._(16, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_UNIT'); + static const Field FIELD_METADATA_VALUE_RESTRICTION = Field._(17, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_VALUE_RESTRICTION'); + static const Field FIELD_METADATA_ACTUATOR = Field._(20, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_ACTUATOR'); + static const Field FIELD_METADATA_SENSOR = Field._(30, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_SENSOR'); + static const Field FIELD_METADATA_ATTRIBUTE = Field._(40, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FIELD_METADATA_ATTRIBUTE'); + + static const $core.List<Field> values = <Field> [ + FIELD_UNSPECIFIED, + FIELD_PATH, + FIELD_VALUE, + FIELD_ACTUATOR_TARGET, + FIELD_METADATA, + FIELD_METADATA_DATA_TYPE, + FIELD_METADATA_DESCRIPTION, + FIELD_METADATA_ENTRY_TYPE, + FIELD_METADATA_COMMENT, + FIELD_METADATA_DEPRECATION, + FIELD_METADATA_UNIT, + FIELD_METADATA_VALUE_RESTRICTION, + FIELD_METADATA_ACTUATOR, + FIELD_METADATA_SENSOR, + FIELD_METADATA_ATTRIBUTE, + ]; + + static final $core.Map<$core.int, Field> _byValue = $pb.ProtobufEnum.initByValue(values); + static Field? valueOf($core.int value) => _byValue[value]; + + const Field._($core.int v, $core.String n) : super(v, n); +} + diff --git a/lib/generated/kuksa/val/v1/types.pbjson.dart b/lib/generated/kuksa/val/v1/types.pbjson.dart new file mode 100644 index 0000000..063631a --- /dev/null +++ b/lib/generated/kuksa/val/v1/types.pbjson.dart @@ -0,0 +1,364 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/types.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use dataTypeDescriptor instead') +const DataType$json = const { + '1': 'DataType', + '2': const [ + const {'1': 'DATA_TYPE_UNSPECIFIED', '2': 0}, + const {'1': 'DATA_TYPE_STRING', '2': 1}, + const {'1': 'DATA_TYPE_BOOLEAN', '2': 2}, + const {'1': 'DATA_TYPE_INT8', '2': 3}, + const {'1': 'DATA_TYPE_INT16', '2': 4}, + const {'1': 'DATA_TYPE_INT32', '2': 5}, + const {'1': 'DATA_TYPE_INT64', '2': 6}, + const {'1': 'DATA_TYPE_UINT8', '2': 7}, + const {'1': 'DATA_TYPE_UINT16', '2': 8}, + const {'1': 'DATA_TYPE_UINT32', '2': 9}, + const {'1': 'DATA_TYPE_UINT64', '2': 10}, + const {'1': 'DATA_TYPE_FLOAT', '2': 11}, + const {'1': 'DATA_TYPE_DOUBLE', '2': 12}, + const {'1': 'DATA_TYPE_TIMESTAMP', '2': 13}, + const {'1': 'DATA_TYPE_STRING_ARRAY', '2': 20}, + const {'1': 'DATA_TYPE_BOOLEAN_ARRAY', '2': 21}, + const {'1': 'DATA_TYPE_INT8_ARRAY', '2': 22}, + const {'1': 'DATA_TYPE_INT16_ARRAY', '2': 23}, + const {'1': 'DATA_TYPE_INT32_ARRAY', '2': 24}, + const {'1': 'DATA_TYPE_INT64_ARRAY', '2': 25}, + const {'1': 'DATA_TYPE_UINT8_ARRAY', '2': 26}, + const {'1': 'DATA_TYPE_UINT16_ARRAY', '2': 27}, + const {'1': 'DATA_TYPE_UINT32_ARRAY', '2': 28}, + const {'1': 'DATA_TYPE_UINT64_ARRAY', '2': 29}, + const {'1': 'DATA_TYPE_FLOAT_ARRAY', '2': 30}, + const {'1': 'DATA_TYPE_DOUBLE_ARRAY', '2': 31}, + const {'1': 'DATA_TYPE_TIMESTAMP_ARRAY', '2': 32}, + ], +}; + +/// Descriptor for `DataType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List dataTypeDescriptor = $convert.base64Decode('CghEYXRhVHlwZRIZChVEQVRBX1RZUEVfVU5TUEVDSUZJRUQQABIUChBEQVRBX1RZUEVfU1RSSU5HEAESFQoRREFUQV9UWVBFX0JPT0xFQU4QAhISCg5EQVRBX1RZUEVfSU5UOBADEhMKD0RBVEFfVFlQRV9JTlQxNhAEEhMKD0RBVEFfVFlQRV9JTlQzMhAFEhMKD0RBVEFfVFlQRV9JTlQ2NBAGEhMKD0RBVEFfVFlQRV9VSU5UOBAHEhQKEERBVEFfVFlQRV9VSU5UMTYQCBIUChBEQVRBX1RZUEVfVUlOVDMyEAkSFAoQREFUQV9UWVBFX1VJTlQ2NBAKEhMKD0RBVEFfVFlQRV9GTE9BVBALEhQKEERBVEFfVFlQRV9ET1VCTEUQDBIXChNEQVRBX1RZUEVfVElNRVNUQU1QEA0SGgoWREFUQV9UWVBFX1NUUklOR19BUlJBWRAUEhsKF0RBVEFfVFlQRV9CT09MRUFOX0FSUkFZEBUSGAoUREFUQV9UWVBFX0lOVDhfQVJSQVkQFhIZChVEQVRBX1RZUEVfSU5UMTZfQVJSQVkQFxIZChVEQVRBX1RZUEVfSU5UMzJfQVJSQVkQGBIZChVEQVRBX1RZUEVfSU5UNjRfQVJSQVkQGRIZChVEQVRBX1RZUEVfVUlOVDhfQVJSQVkQGhIaChZEQVRBX1RZUEVfVUlOVDE2X0FSUkFZEBsSGgoWREFUQV9UWVBFX1VJTlQzMl9BUlJBWRAcEhoKFkRBVEFfVFlQRV9VSU5UNjRfQVJSQVkQHRIZChVEQVRBX1RZUEVfRkxPQVRfQVJSQVkQHhIaChZEQVRBX1RZUEVfRE9VQkxFX0FSUkFZEB8SHQoZREFUQV9UWVBFX1RJTUVTVEFNUF9BUlJBWRAg'); +@$core.Deprecated('Use entryTypeDescriptor instead') +const EntryType$json = const { + '1': 'EntryType', + '2': const [ + const {'1': 'ENTRY_TYPE_UNSPECIFIED', '2': 0}, + const {'1': 'ENTRY_TYPE_ATTRIBUTE', '2': 1}, + const {'1': 'ENTRY_TYPE_SENSOR', '2': 2}, + const {'1': 'ENTRY_TYPE_ACTUATOR', '2': 3}, + ], +}; + +/// Descriptor for `EntryType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List entryTypeDescriptor = $convert.base64Decode('CglFbnRyeVR5cGUSGgoWRU5UUllfVFlQRV9VTlNQRUNJRklFRBAAEhgKFEVOVFJZX1RZUEVfQVRUUklCVVRFEAESFQoRRU5UUllfVFlQRV9TRU5TT1IQAhIXChNFTlRSWV9UWVBFX0FDVFVBVE9SEAM='); +@$core.Deprecated('Use viewDescriptor instead') +const View$json = const { + '1': 'View', + '2': const [ + const {'1': 'VIEW_UNSPECIFIED', '2': 0}, + const {'1': 'VIEW_CURRENT_VALUE', '2': 1}, + const {'1': 'VIEW_TARGET_VALUE', '2': 2}, + const {'1': 'VIEW_METADATA', '2': 3}, + const {'1': 'VIEW_FIELDS', '2': 10}, + const {'1': 'VIEW_ALL', '2': 20}, + ], +}; + +/// Descriptor for `View`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List viewDescriptor = $convert.base64Decode('CgRWaWV3EhQKEFZJRVdfVU5TUEVDSUZJRUQQABIWChJWSUVXX0NVUlJFTlRfVkFMVUUQARIVChFWSUVXX1RBUkdFVF9WQUxVRRACEhEKDVZJRVdfTUVUQURBVEEQAxIPCgtWSUVXX0ZJRUxEUxAKEgwKCFZJRVdfQUxMEBQ='); +@$core.Deprecated('Use fieldDescriptor instead') +const Field$json = const { + '1': 'Field', + '2': const [ + const {'1': 'FIELD_UNSPECIFIED', '2': 0}, + const {'1': 'FIELD_PATH', '2': 1}, + const {'1': 'FIELD_VALUE', '2': 2}, + const {'1': 'FIELD_ACTUATOR_TARGET', '2': 3}, + const {'1': 'FIELD_METADATA', '2': 10}, + const {'1': 'FIELD_METADATA_DATA_TYPE', '2': 11}, + const {'1': 'FIELD_METADATA_DESCRIPTION', '2': 12}, + const {'1': 'FIELD_METADATA_ENTRY_TYPE', '2': 13}, + const {'1': 'FIELD_METADATA_COMMENT', '2': 14}, + const {'1': 'FIELD_METADATA_DEPRECATION', '2': 15}, + const {'1': 'FIELD_METADATA_UNIT', '2': 16}, + const {'1': 'FIELD_METADATA_VALUE_RESTRICTION', '2': 17}, + const {'1': 'FIELD_METADATA_ACTUATOR', '2': 20}, + const {'1': 'FIELD_METADATA_SENSOR', '2': 30}, + const {'1': 'FIELD_METADATA_ATTRIBUTE', '2': 40}, + ], +}; + +/// Descriptor for `Field`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List fieldDescriptor = $convert.base64Decode('CgVGaWVsZBIVChFGSUVMRF9VTlNQRUNJRklFRBAAEg4KCkZJRUxEX1BBVEgQARIPCgtGSUVMRF9WQUxVRRACEhkKFUZJRUxEX0FDVFVBVE9SX1RBUkdFVBADEhIKDkZJRUxEX01FVEFEQVRBEAoSHAoYRklFTERfTUVUQURBVEFfREFUQV9UWVBFEAsSHgoaRklFTERfTUVUQURBVEFfREVTQ1JJUFRJT04QDBIdChlGSUVMRF9NRVRBREFUQV9FTlRSWV9UWVBFEA0SGgoWRklFTERfTUVUQURBVEFfQ09NTUVOVBAOEh4KGkZJRUxEX01FVEFEQVRBX0RFUFJFQ0FUSU9OEA8SFwoTRklFTERfTUVUQURBVEFfVU5JVBAQEiQKIEZJRUxEX01FVEFEQVRBX1ZBTFVFX1JFU1RSSUNUSU9OEBESGwoXRklFTERfTUVUQURBVEFfQUNUVUFUT1IQFBIZChVGSUVMRF9NRVRBREFUQV9TRU5TT1IQHhIcChhGSUVMRF9NRVRBREFUQV9BVFRSSUJVVEUQKA=='); +@$core.Deprecated('Use dataEntryDescriptor instead') +const DataEntry$json = const { + '1': 'DataEntry', + '2': const [ + const {'1': 'path', '3': 1, '4': 1, '5': 9, '10': 'path'}, + const {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.kuksa.val.v1.Datapoint', '10': 'value'}, + const {'1': 'actuator_target', '3': 3, '4': 1, '5': 11, '6': '.kuksa.val.v1.Datapoint', '10': 'actuatorTarget'}, + const {'1': 'metadata', '3': 10, '4': 1, '5': 11, '6': '.kuksa.val.v1.Metadata', '10': 'metadata'}, + ], +}; + +/// Descriptor for `DataEntry`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List dataEntryDescriptor = $convert.base64Decode('CglEYXRhRW50cnkSEgoEcGF0aBgBIAEoCVIEcGF0aBItCgV2YWx1ZRgCIAEoCzIXLmt1a3NhLnZhbC52MS5EYXRhcG9pbnRSBXZhbHVlEkAKD2FjdHVhdG9yX3RhcmdldBgDIAEoCzIXLmt1a3NhLnZhbC52MS5EYXRhcG9pbnRSDmFjdHVhdG9yVGFyZ2V0EjIKCG1ldGFkYXRhGAogASgLMhYua3Vrc2EudmFsLnYxLk1ldGFkYXRhUghtZXRhZGF0YQ=='); +@$core.Deprecated('Use datapointDescriptor instead') +const Datapoint$json = const { + '1': 'Datapoint', + '2': const [ + const {'1': 'timestamp', '3': 1, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'timestamp'}, + const {'1': 'string', '3': 11, '4': 1, '5': 9, '9': 0, '10': 'string'}, + const {'1': 'bool', '3': 12, '4': 1, '5': 8, '9': 0, '10': 'bool'}, + const {'1': 'int32', '3': 13, '4': 1, '5': 17, '9': 0, '10': 'int32'}, + const {'1': 'int64', '3': 14, '4': 1, '5': 18, '9': 0, '10': 'int64'}, + const {'1': 'uint32', '3': 15, '4': 1, '5': 13, '9': 0, '10': 'uint32'}, + const {'1': 'uint64', '3': 16, '4': 1, '5': 4, '9': 0, '10': 'uint64'}, + const {'1': 'float', '3': 17, '4': 1, '5': 2, '9': 0, '10': 'float'}, + const {'1': 'double', '3': 18, '4': 1, '5': 1, '9': 0, '10': 'double'}, + const {'1': 'string_array', '3': 21, '4': 1, '5': 11, '6': '.kuksa.val.v1.StringArray', '9': 0, '10': 'stringArray'}, + const {'1': 'bool_array', '3': 22, '4': 1, '5': 11, '6': '.kuksa.val.v1.BoolArray', '9': 0, '10': 'boolArray'}, + const {'1': 'int32_array', '3': 23, '4': 1, '5': 11, '6': '.kuksa.val.v1.Int32Array', '9': 0, '10': 'int32Array'}, + const {'1': 'int64_array', '3': 24, '4': 1, '5': 11, '6': '.kuksa.val.v1.Int64Array', '9': 0, '10': 'int64Array'}, + const {'1': 'uint32_array', '3': 25, '4': 1, '5': 11, '6': '.kuksa.val.v1.Uint32Array', '9': 0, '10': 'uint32Array'}, + const {'1': 'uint64_array', '3': 26, '4': 1, '5': 11, '6': '.kuksa.val.v1.Uint64Array', '9': 0, '10': 'uint64Array'}, + const {'1': 'float_array', '3': 27, '4': 1, '5': 11, '6': '.kuksa.val.v1.FloatArray', '9': 0, '10': 'floatArray'}, + const {'1': 'double_array', '3': 28, '4': 1, '5': 11, '6': '.kuksa.val.v1.DoubleArray', '9': 0, '10': 'doubleArray'}, + ], + '8': const [ + const {'1': 'value'}, + ], +}; + +/// Descriptor for `Datapoint`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List datapointDescriptor = $convert.base64Decode('CglEYXRhcG9pbnQSOAoJdGltZXN0YW1wGAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcFIJdGltZXN0YW1wEhgKBnN0cmluZxgLIAEoCUgAUgZzdHJpbmcSFAoEYm9vbBgMIAEoCEgAUgRib29sEhYKBWludDMyGA0gASgRSABSBWludDMyEhYKBWludDY0GA4gASgSSABSBWludDY0EhgKBnVpbnQzMhgPIAEoDUgAUgZ1aW50MzISGAoGdWludDY0GBAgASgESABSBnVpbnQ2NBIWCgVmbG9hdBgRIAEoAkgAUgVmbG9hdBIYCgZkb3VibGUYEiABKAFIAFIGZG91YmxlEj4KDHN0cmluZ19hcnJheRgVIAEoCzIZLmt1a3NhLnZhbC52MS5TdHJpbmdBcnJheUgAUgtzdHJpbmdBcnJheRI4Cgpib29sX2FycmF5GBYgASgLMhcua3Vrc2EudmFsLnYxLkJvb2xBcnJheUgAUglib29sQXJyYXkSOwoLaW50MzJfYXJyYXkYFyABKAsyGC5rdWtzYS52YWwudjEuSW50MzJBcnJheUgAUgppbnQzMkFycmF5EjsKC2ludDY0X2FycmF5GBggASgLMhgua3Vrc2EudmFsLnYxLkludDY0QXJyYXlIAFIKaW50NjRBcnJheRI+Cgx1aW50MzJfYXJyYXkYGSABKAsyGS5rdWtzYS52YWwudjEuVWludDMyQXJyYXlIAFILdWludDMyQXJyYXkSPgoMdWludDY0X2FycmF5GBogASgLMhkua3Vrc2EudmFsLnYxLlVpbnQ2NEFycmF5SABSC3VpbnQ2NEFycmF5EjsKC2Zsb2F0X2FycmF5GBsgASgLMhgua3Vrc2EudmFsLnYxLkZsb2F0QXJyYXlIAFIKZmxvYXRBcnJheRI+Cgxkb3VibGVfYXJyYXkYHCABKAsyGS5rdWtzYS52YWwudjEuRG91YmxlQXJyYXlIAFILZG91YmxlQXJyYXlCBwoFdmFsdWU='); +@$core.Deprecated('Use metadataDescriptor instead') +const Metadata$json = const { + '1': 'Metadata', + '2': const [ + const {'1': 'data_type', '3': 11, '4': 1, '5': 14, '6': '.kuksa.val.v1.DataType', '10': 'dataType'}, + const {'1': 'entry_type', '3': 12, '4': 1, '5': 14, '6': '.kuksa.val.v1.EntryType', '10': 'entryType'}, + const {'1': 'description', '3': 13, '4': 1, '5': 9, '9': 1, '10': 'description', '17': true}, + const {'1': 'comment', '3': 14, '4': 1, '5': 9, '9': 2, '10': 'comment', '17': true}, + const {'1': 'deprecation', '3': 15, '4': 1, '5': 9, '9': 3, '10': 'deprecation', '17': true}, + const {'1': 'unit', '3': 16, '4': 1, '5': 9, '9': 4, '10': 'unit', '17': true}, + const {'1': 'value_restriction', '3': 17, '4': 1, '5': 11, '6': '.kuksa.val.v1.ValueRestriction', '10': 'valueRestriction'}, + const {'1': 'actuator', '3': 20, '4': 1, '5': 11, '6': '.kuksa.val.v1.Actuator', '9': 0, '10': 'actuator'}, + const {'1': 'sensor', '3': 30, '4': 1, '5': 11, '6': '.kuksa.val.v1.Sensor', '9': 0, '10': 'sensor'}, + const {'1': 'attribute', '3': 40, '4': 1, '5': 11, '6': '.kuksa.val.v1.Attribute', '9': 0, '10': 'attribute'}, + ], + '8': const [ + const {'1': 'entry_specific'}, + const {'1': '_description'}, + const {'1': '_comment'}, + const {'1': '_deprecation'}, + const {'1': '_unit'}, + ], +}; + +/// Descriptor for `Metadata`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List metadataDescriptor = $convert.base64Decode('CghNZXRhZGF0YRIzCglkYXRhX3R5cGUYCyABKA4yFi5rdWtzYS52YWwudjEuRGF0YVR5cGVSCGRhdGFUeXBlEjYKCmVudHJ5X3R5cGUYDCABKA4yFy5rdWtzYS52YWwudjEuRW50cnlUeXBlUgllbnRyeVR5cGUSJQoLZGVzY3JpcHRpb24YDSABKAlIAVILZGVzY3JpcHRpb26IAQESHQoHY29tbWVudBgOIAEoCUgCUgdjb21tZW50iAEBEiUKC2RlcHJlY2F0aW9uGA8gASgJSANSC2RlcHJlY2F0aW9uiAEBEhcKBHVuaXQYECABKAlIBFIEdW5pdIgBARJLChF2YWx1ZV9yZXN0cmljdGlvbhgRIAEoCzIeLmt1a3NhLnZhbC52MS5WYWx1ZVJlc3RyaWN0aW9uUhB2YWx1ZVJlc3RyaWN0aW9uEjQKCGFjdHVhdG9yGBQgASgLMhYua3Vrc2EudmFsLnYxLkFjdHVhdG9ySABSCGFjdHVhdG9yEi4KBnNlbnNvchgeIAEoCzIULmt1a3NhLnZhbC52MS5TZW5zb3JIAFIGc2Vuc29yEjcKCWF0dHJpYnV0ZRgoIAEoCzIXLmt1a3NhLnZhbC52MS5BdHRyaWJ1dGVIAFIJYXR0cmlidXRlQhAKDmVudHJ5X3NwZWNpZmljQg4KDF9kZXNjcmlwdGlvbkIKCghfY29tbWVudEIOCgxfZGVwcmVjYXRpb25CBwoFX3VuaXQ='); +@$core.Deprecated('Use actuatorDescriptor instead') +const Actuator$json = const { + '1': 'Actuator', +}; + +/// Descriptor for `Actuator`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List actuatorDescriptor = $convert.base64Decode('CghBY3R1YXRvcg=='); +@$core.Deprecated('Use sensorDescriptor instead') +const Sensor$json = const { + '1': 'Sensor', +}; + +/// Descriptor for `Sensor`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List sensorDescriptor = $convert.base64Decode('CgZTZW5zb3I='); +@$core.Deprecated('Use attributeDescriptor instead') +const Attribute$json = const { + '1': 'Attribute', +}; + +/// Descriptor for `Attribute`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List attributeDescriptor = $convert.base64Decode('CglBdHRyaWJ1dGU='); +@$core.Deprecated('Use valueRestrictionDescriptor instead') +const ValueRestriction$json = const { + '1': 'ValueRestriction', + '2': const [ + const {'1': 'string', '3': 21, '4': 1, '5': 11, '6': '.kuksa.val.v1.ValueRestrictionString', '9': 0, '10': 'string'}, + const {'1': 'signed', '3': 22, '4': 1, '5': 11, '6': '.kuksa.val.v1.ValueRestrictionInt', '9': 0, '10': 'signed'}, + const {'1': 'unsigned', '3': 23, '4': 1, '5': 11, '6': '.kuksa.val.v1.ValueRestrictionUint', '9': 0, '10': 'unsigned'}, + const {'1': 'floating_point', '3': 24, '4': 1, '5': 11, '6': '.kuksa.val.v1.ValueRestrictionFloat', '9': 0, '10': 'floatingPoint'}, + ], + '8': const [ + const {'1': 'type'}, + ], +}; + +/// Descriptor for `ValueRestriction`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List valueRestrictionDescriptor = $convert.base64Decode('ChBWYWx1ZVJlc3RyaWN0aW9uEj4KBnN0cmluZxgVIAEoCzIkLmt1a3NhLnZhbC52MS5WYWx1ZVJlc3RyaWN0aW9uU3RyaW5nSABSBnN0cmluZxI7CgZzaWduZWQYFiABKAsyIS5rdWtzYS52YWwudjEuVmFsdWVSZXN0cmljdGlvbkludEgAUgZzaWduZWQSQAoIdW5zaWduZWQYFyABKAsyIi5rdWtzYS52YWwudjEuVmFsdWVSZXN0cmljdGlvblVpbnRIAFIIdW5zaWduZWQSTAoOZmxvYXRpbmdfcG9pbnQYGCABKAsyIy5rdWtzYS52YWwudjEuVmFsdWVSZXN0cmljdGlvbkZsb2F0SABSDWZsb2F0aW5nUG9pbnRCBgoEdHlwZQ=='); +@$core.Deprecated('Use valueRestrictionIntDescriptor instead') +const ValueRestrictionInt$json = const { + '1': 'ValueRestrictionInt', + '2': const [ + const {'1': 'min', '3': 1, '4': 1, '5': 18, '9': 0, '10': 'min', '17': true}, + const {'1': 'max', '3': 2, '4': 1, '5': 18, '9': 1, '10': 'max', '17': true}, + const {'1': 'allowed_values', '3': 3, '4': 3, '5': 18, '10': 'allowedValues'}, + ], + '8': const [ + const {'1': '_min'}, + const {'1': '_max'}, + ], +}; + +/// Descriptor for `ValueRestrictionInt`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List valueRestrictionIntDescriptor = $convert.base64Decode('ChNWYWx1ZVJlc3RyaWN0aW9uSW50EhUKA21pbhgBIAEoEkgAUgNtaW6IAQESFQoDbWF4GAIgASgSSAFSA21heIgBARIlCg5hbGxvd2VkX3ZhbHVlcxgDIAMoElINYWxsb3dlZFZhbHVlc0IGCgRfbWluQgYKBF9tYXg='); +@$core.Deprecated('Use valueRestrictionUintDescriptor instead') +const ValueRestrictionUint$json = const { + '1': 'ValueRestrictionUint', + '2': const [ + const {'1': 'min', '3': 1, '4': 1, '5': 4, '9': 0, '10': 'min', '17': true}, + const {'1': 'max', '3': 2, '4': 1, '5': 4, '9': 1, '10': 'max', '17': true}, + const {'1': 'allowed_values', '3': 3, '4': 3, '5': 4, '10': 'allowedValues'}, + ], + '8': const [ + const {'1': '_min'}, + const {'1': '_max'}, + ], +}; + +/// Descriptor for `ValueRestrictionUint`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List valueRestrictionUintDescriptor = $convert.base64Decode('ChRWYWx1ZVJlc3RyaWN0aW9uVWludBIVCgNtaW4YASABKARIAFIDbWluiAEBEhUKA21heBgCIAEoBEgBUgNtYXiIAQESJQoOYWxsb3dlZF92YWx1ZXMYAyADKARSDWFsbG93ZWRWYWx1ZXNCBgoEX21pbkIGCgRfbWF4'); +@$core.Deprecated('Use valueRestrictionFloatDescriptor instead') +const ValueRestrictionFloat$json = const { + '1': 'ValueRestrictionFloat', + '2': const [ + const {'1': 'min', '3': 1, '4': 1, '5': 1, '9': 0, '10': 'min', '17': true}, + const {'1': 'max', '3': 2, '4': 1, '5': 1, '9': 1, '10': 'max', '17': true}, + const {'1': 'allowed_values', '3': 3, '4': 3, '5': 1, '10': 'allowedValues'}, + ], + '8': const [ + const {'1': '_min'}, + const {'1': '_max'}, + ], +}; + +/// Descriptor for `ValueRestrictionFloat`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List valueRestrictionFloatDescriptor = $convert.base64Decode('ChVWYWx1ZVJlc3RyaWN0aW9uRmxvYXQSFQoDbWluGAEgASgBSABSA21pbogBARIVCgNtYXgYAiABKAFIAVIDbWF4iAEBEiUKDmFsbG93ZWRfdmFsdWVzGAMgAygBUg1hbGxvd2VkVmFsdWVzQgYKBF9taW5CBgoEX21heA=='); +@$core.Deprecated('Use valueRestrictionStringDescriptor instead') +const ValueRestrictionString$json = const { + '1': 'ValueRestrictionString', + '2': const [ + const {'1': 'allowed_values', '3': 3, '4': 3, '5': 9, '10': 'allowedValues'}, + ], +}; + +/// Descriptor for `ValueRestrictionString`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List valueRestrictionStringDescriptor = $convert.base64Decode('ChZWYWx1ZVJlc3RyaWN0aW9uU3RyaW5nEiUKDmFsbG93ZWRfdmFsdWVzGAMgAygJUg1hbGxvd2VkVmFsdWVz'); +@$core.Deprecated('Use errorDescriptor instead') +const Error$json = const { + '1': 'Error', + '2': const [ + const {'1': 'code', '3': 1, '4': 1, '5': 13, '10': 'code'}, + const {'1': 'reason', '3': 2, '4': 1, '5': 9, '10': 'reason'}, + const {'1': 'message', '3': 3, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `Error`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List errorDescriptor = $convert.base64Decode('CgVFcnJvchISCgRjb2RlGAEgASgNUgRjb2RlEhYKBnJlYXNvbhgCIAEoCVIGcmVhc29uEhgKB21lc3NhZ2UYAyABKAlSB21lc3NhZ2U='); +@$core.Deprecated('Use dataEntryErrorDescriptor instead') +const DataEntryError$json = const { + '1': 'DataEntryError', + '2': const [ + const {'1': 'path', '3': 1, '4': 1, '5': 9, '10': 'path'}, + const {'1': 'error', '3': 2, '4': 1, '5': 11, '6': '.kuksa.val.v1.Error', '10': 'error'}, + ], +}; + +/// Descriptor for `DataEntryError`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List dataEntryErrorDescriptor = $convert.base64Decode('Cg5EYXRhRW50cnlFcnJvchISCgRwYXRoGAEgASgJUgRwYXRoEikKBWVycm9yGAIgASgLMhMua3Vrc2EudmFsLnYxLkVycm9yUgVlcnJvcg=='); +@$core.Deprecated('Use stringArrayDescriptor instead') +const StringArray$json = const { + '1': 'StringArray', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 9, '10': 'values'}, + ], +}; + +/// Descriptor for `StringArray`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List stringArrayDescriptor = $convert.base64Decode('CgtTdHJpbmdBcnJheRIWCgZ2YWx1ZXMYASADKAlSBnZhbHVlcw=='); +@$core.Deprecated('Use boolArrayDescriptor instead') +const BoolArray$json = const { + '1': 'BoolArray', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 8, '10': 'values'}, + ], +}; + +/// Descriptor for `BoolArray`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List boolArrayDescriptor = $convert.base64Decode('CglCb29sQXJyYXkSFgoGdmFsdWVzGAEgAygIUgZ2YWx1ZXM='); +@$core.Deprecated('Use int32ArrayDescriptor instead') +const Int32Array$json = const { + '1': 'Int32Array', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 17, '10': 'values'}, + ], +}; + +/// Descriptor for `Int32Array`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List int32ArrayDescriptor = $convert.base64Decode('CgpJbnQzMkFycmF5EhYKBnZhbHVlcxgBIAMoEVIGdmFsdWVz'); +@$core.Deprecated('Use int64ArrayDescriptor instead') +const Int64Array$json = const { + '1': 'Int64Array', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 18, '10': 'values'}, + ], +}; + +/// Descriptor for `Int64Array`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List int64ArrayDescriptor = $convert.base64Decode('CgpJbnQ2NEFycmF5EhYKBnZhbHVlcxgBIAMoElIGdmFsdWVz'); +@$core.Deprecated('Use uint32ArrayDescriptor instead') +const Uint32Array$json = const { + '1': 'Uint32Array', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 13, '10': 'values'}, + ], +}; + +/// Descriptor for `Uint32Array`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List uint32ArrayDescriptor = $convert.base64Decode('CgtVaW50MzJBcnJheRIWCgZ2YWx1ZXMYASADKA1SBnZhbHVlcw=='); +@$core.Deprecated('Use uint64ArrayDescriptor instead') +const Uint64Array$json = const { + '1': 'Uint64Array', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 4, '10': 'values'}, + ], +}; + +/// Descriptor for `Uint64Array`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List uint64ArrayDescriptor = $convert.base64Decode('CgtVaW50NjRBcnJheRIWCgZ2YWx1ZXMYASADKARSBnZhbHVlcw=='); +@$core.Deprecated('Use floatArrayDescriptor instead') +const FloatArray$json = const { + '1': 'FloatArray', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 2, '10': 'values'}, + ], +}; + +/// Descriptor for `FloatArray`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List floatArrayDescriptor = $convert.base64Decode('CgpGbG9hdEFycmF5EhYKBnZhbHVlcxgBIAMoAlIGdmFsdWVz'); +@$core.Deprecated('Use doubleArrayDescriptor instead') +const DoubleArray$json = const { + '1': 'DoubleArray', + '2': const [ + const {'1': 'values', '3': 1, '4': 3, '5': 1, '10': 'values'}, + ], +}; + +/// Descriptor for `DoubleArray`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List doubleArrayDescriptor = $convert.base64Decode('CgtEb3VibGVBcnJheRIWCgZ2YWx1ZXMYASADKAFSBnZhbHVlcw=='); diff --git a/lib/generated/kuksa/val/v1/val.pb.dart b/lib/generated/kuksa/val/v1/val.pb.dart new file mode 100644 index 0000000..761fba0 --- /dev/null +++ b/lib/generated/kuksa/val/v1/val.pb.dart @@ -0,0 +1,586 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/val.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'types.pb.dart' as $1; + +import 'types.pbenum.dart' as $1; + +class EntryRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'EntryRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'path') + ..e<$1.View>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'view', $pb.PbFieldType.OE, defaultOrMaker: $1.View.VIEW_UNSPECIFIED, valueOf: $1.View.valueOf, enumValues: $1.View.values) + ..pc<$1.Field>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fields', $pb.PbFieldType.KE, valueOf: $1.Field.valueOf, enumValues: $1.Field.values, defaultEnumValue: $1.Field.FIELD_UNSPECIFIED) + ..hasRequiredFields = false + ; + + EntryRequest._() : super(); + factory EntryRequest({ + $core.String? path, + $1.View? view, + $core.Iterable<$1.Field>? fields, + }) { + final _result = create(); + if (path != null) { + _result.path = path; + } + if (view != null) { + _result.view = view; + } + if (fields != null) { + _result.fields.addAll(fields); + } + return _result; + } + factory EntryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EntryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EntryRequest clone() => EntryRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EntryRequest copyWith(void Function(EntryRequest) updates) => super.copyWith((message) => updates(message as EntryRequest)) as EntryRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static EntryRequest create() => EntryRequest._(); + EntryRequest createEmptyInstance() => create(); + static $pb.PbList<EntryRequest> createRepeated() => $pb.PbList<EntryRequest>(); + @$core.pragma('dart2js:noInline') + static EntryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<EntryRequest>(create); + static EntryRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get path => $_getSZ(0); + @$pb.TagNumber(1) + set path($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPath() => $_has(0); + @$pb.TagNumber(1) + void clearPath() => clearField(1); + + @$pb.TagNumber(2) + $1.View get view => $_getN(1); + @$pb.TagNumber(2) + set view($1.View v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasView() => $_has(1); + @$pb.TagNumber(2) + void clearView() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$1.Field> get fields => $_getList(2); +} + +class GetRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..pc<EntryRequest>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'entries', $pb.PbFieldType.PM, subBuilder: EntryRequest.create) + ..hasRequiredFields = false + ; + + GetRequest._() : super(); + factory GetRequest({ + $core.Iterable<EntryRequest>? entries, + }) { + final _result = create(); + if (entries != null) { + _result.entries.addAll(entries); + } + return _result; + } + factory GetRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRequest clone() => GetRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRequest copyWith(void Function(GetRequest) updates) => super.copyWith((message) => updates(message as GetRequest)) as GetRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRequest create() => GetRequest._(); + GetRequest createEmptyInstance() => create(); + static $pb.PbList<GetRequest> createRepeated() => $pb.PbList<GetRequest>(); + @$core.pragma('dart2js:noInline') + static GetRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetRequest>(create); + static GetRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<EntryRequest> get entries => $_getList(0); +} + +class GetResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..pc<$1.DataEntry>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'entries', $pb.PbFieldType.PM, subBuilder: $1.DataEntry.create) + ..pc<$1.DataEntryError>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'errors', $pb.PbFieldType.PM, subBuilder: $1.DataEntryError.create) + ..aOM<$1.Error>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'error', subBuilder: $1.Error.create) + ..hasRequiredFields = false + ; + + GetResponse._() : super(); + factory GetResponse({ + $core.Iterable<$1.DataEntry>? entries, + $core.Iterable<$1.DataEntryError>? errors, + $1.Error? error, + }) { + final _result = create(); + if (entries != null) { + _result.entries.addAll(entries); + } + if (errors != null) { + _result.errors.addAll(errors); + } + if (error != null) { + _result.error = error; + } + return _result; + } + factory GetResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetResponse clone() => GetResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetResponse copyWith(void Function(GetResponse) updates) => super.copyWith((message) => updates(message as GetResponse)) as GetResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetResponse create() => GetResponse._(); + GetResponse createEmptyInstance() => create(); + static $pb.PbList<GetResponse> createRepeated() => $pb.PbList<GetResponse>(); + @$core.pragma('dart2js:noInline') + static GetResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetResponse>(create); + static GetResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$1.DataEntry> get entries => $_getList(0); + + @$pb.TagNumber(2) + $core.List<$1.DataEntryError> get errors => $_getList(1); + + @$pb.TagNumber(3) + $1.Error get error => $_getN(2); + @$pb.TagNumber(3) + set error($1.Error v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasError() => $_has(2); + @$pb.TagNumber(3) + void clearError() => clearField(3); + @$pb.TagNumber(3) + $1.Error ensureError() => $_ensure(2); +} + +class EntryUpdate extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'EntryUpdate', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..aOM<$1.DataEntry>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'entry', subBuilder: $1.DataEntry.create) + ..pc<$1.Field>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fields', $pb.PbFieldType.KE, valueOf: $1.Field.valueOf, enumValues: $1.Field.values, defaultEnumValue: $1.Field.FIELD_UNSPECIFIED) + ..hasRequiredFields = false + ; + + EntryUpdate._() : super(); + factory EntryUpdate({ + $1.DataEntry? entry, + $core.Iterable<$1.Field>? fields, + }) { + final _result = create(); + if (entry != null) { + _result.entry = entry; + } + if (fields != null) { + _result.fields.addAll(fields); + } + return _result; + } + factory EntryUpdate.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EntryUpdate.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EntryUpdate clone() => EntryUpdate()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EntryUpdate copyWith(void Function(EntryUpdate) updates) => super.copyWith((message) => updates(message as EntryUpdate)) as EntryUpdate; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static EntryUpdate create() => EntryUpdate._(); + EntryUpdate createEmptyInstance() => create(); + static $pb.PbList<EntryUpdate> createRepeated() => $pb.PbList<EntryUpdate>(); + @$core.pragma('dart2js:noInline') + static EntryUpdate getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<EntryUpdate>(create); + static EntryUpdate? _defaultInstance; + + @$pb.TagNumber(1) + $1.DataEntry get entry => $_getN(0); + @$pb.TagNumber(1) + set entry($1.DataEntry v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasEntry() => $_has(0); + @$pb.TagNumber(1) + void clearEntry() => clearField(1); + @$pb.TagNumber(1) + $1.DataEntry ensureEntry() => $_ensure(0); + + @$pb.TagNumber(2) + $core.List<$1.Field> get fields => $_getList(1); +} + +class SetRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SetRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..pc<EntryUpdate>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'updates', $pb.PbFieldType.PM, subBuilder: EntryUpdate.create) + ..hasRequiredFields = false + ; + + SetRequest._() : super(); + factory SetRequest({ + $core.Iterable<EntryUpdate>? updates, + }) { + final _result = create(); + if (updates != null) { + _result.updates.addAll(updates); + } + return _result; + } + factory SetRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SetRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SetRequest clone() => SetRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SetRequest copyWith(void Function(SetRequest) updates) => super.copyWith((message) => updates(message as SetRequest)) as SetRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SetRequest create() => SetRequest._(); + SetRequest createEmptyInstance() => create(); + static $pb.PbList<SetRequest> createRepeated() => $pb.PbList<SetRequest>(); + @$core.pragma('dart2js:noInline') + static SetRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SetRequest>(create); + static SetRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<EntryUpdate> get updates => $_getList(0); +} + +class SetResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SetResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..aOM<$1.Error>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'error', subBuilder: $1.Error.create) + ..pc<$1.DataEntryError>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'errors', $pb.PbFieldType.PM, subBuilder: $1.DataEntryError.create) + ..hasRequiredFields = false + ; + + SetResponse._() : super(); + factory SetResponse({ + $1.Error? error, + $core.Iterable<$1.DataEntryError>? errors, + }) { + final _result = create(); + if (error != null) { + _result.error = error; + } + if (errors != null) { + _result.errors.addAll(errors); + } + return _result; + } + factory SetResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SetResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SetResponse clone() => SetResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SetResponse copyWith(void Function(SetResponse) updates) => super.copyWith((message) => updates(message as SetResponse)) as SetResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SetResponse create() => SetResponse._(); + SetResponse createEmptyInstance() => create(); + static $pb.PbList<SetResponse> createRepeated() => $pb.PbList<SetResponse>(); + @$core.pragma('dart2js:noInline') + static SetResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SetResponse>(create); + static SetResponse? _defaultInstance; + + @$pb.TagNumber(1) + $1.Error get error => $_getN(0); + @$pb.TagNumber(1) + set error($1.Error v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasError() => $_has(0); + @$pb.TagNumber(1) + void clearError() => clearField(1); + @$pb.TagNumber(1) + $1.Error ensureError() => $_ensure(0); + + @$pb.TagNumber(2) + $core.List<$1.DataEntryError> get errors => $_getList(1); +} + +class SubscribeEntry extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SubscribeEntry', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'path') + ..e<$1.View>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'view', $pb.PbFieldType.OE, defaultOrMaker: $1.View.VIEW_UNSPECIFIED, valueOf: $1.View.valueOf, enumValues: $1.View.values) + ..pc<$1.Field>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fields', $pb.PbFieldType.KE, valueOf: $1.Field.valueOf, enumValues: $1.Field.values, defaultEnumValue: $1.Field.FIELD_UNSPECIFIED) + ..hasRequiredFields = false + ; + + SubscribeEntry._() : super(); + factory SubscribeEntry({ + $core.String? path, + $1.View? view, + $core.Iterable<$1.Field>? fields, + }) { + final _result = create(); + if (path != null) { + _result.path = path; + } + if (view != null) { + _result.view = view; + } + if (fields != null) { + _result.fields.addAll(fields); + } + return _result; + } + factory SubscribeEntry.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SubscribeEntry.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SubscribeEntry clone() => SubscribeEntry()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SubscribeEntry copyWith(void Function(SubscribeEntry) updates) => super.copyWith((message) => updates(message as SubscribeEntry)) as SubscribeEntry; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SubscribeEntry create() => SubscribeEntry._(); + SubscribeEntry createEmptyInstance() => create(); + static $pb.PbList<SubscribeEntry> createRepeated() => $pb.PbList<SubscribeEntry>(); + @$core.pragma('dart2js:noInline') + static SubscribeEntry getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SubscribeEntry>(create); + static SubscribeEntry? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get path => $_getSZ(0); + @$pb.TagNumber(1) + set path($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPath() => $_has(0); + @$pb.TagNumber(1) + void clearPath() => clearField(1); + + @$pb.TagNumber(2) + $1.View get view => $_getN(1); + @$pb.TagNumber(2) + set view($1.View v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasView() => $_has(1); + @$pb.TagNumber(2) + void clearView() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$1.Field> get fields => $_getList(2); +} + +class SubscribeRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SubscribeRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..pc<SubscribeEntry>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'entries', $pb.PbFieldType.PM, subBuilder: SubscribeEntry.create) + ..hasRequiredFields = false + ; + + SubscribeRequest._() : super(); + factory SubscribeRequest({ + $core.Iterable<SubscribeEntry>? entries, + }) { + final _result = create(); + if (entries != null) { + _result.entries.addAll(entries); + } + return _result; + } + factory SubscribeRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SubscribeRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SubscribeRequest clone() => SubscribeRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SubscribeRequest copyWith(void Function(SubscribeRequest) updates) => super.copyWith((message) => updates(message as SubscribeRequest)) as SubscribeRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SubscribeRequest create() => SubscribeRequest._(); + SubscribeRequest createEmptyInstance() => create(); + static $pb.PbList<SubscribeRequest> createRepeated() => $pb.PbList<SubscribeRequest>(); + @$core.pragma('dart2js:noInline') + static SubscribeRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SubscribeRequest>(create); + static SubscribeRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<SubscribeEntry> get entries => $_getList(0); +} + +class SubscribeResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SubscribeResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..pc<EntryUpdate>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'updates', $pb.PbFieldType.PM, subBuilder: EntryUpdate.create) + ..hasRequiredFields = false + ; + + SubscribeResponse._() : super(); + factory SubscribeResponse({ + $core.Iterable<EntryUpdate>? updates, + }) { + final _result = create(); + if (updates != null) { + _result.updates.addAll(updates); + } + return _result; + } + factory SubscribeResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SubscribeResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SubscribeResponse clone() => SubscribeResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SubscribeResponse copyWith(void Function(SubscribeResponse) updates) => super.copyWith((message) => updates(message as SubscribeResponse)) as SubscribeResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SubscribeResponse create() => SubscribeResponse._(); + SubscribeResponse createEmptyInstance() => create(); + static $pb.PbList<SubscribeResponse> createRepeated() => $pb.PbList<SubscribeResponse>(); + @$core.pragma('dart2js:noInline') + static SubscribeResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SubscribeResponse>(create); + static SubscribeResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<EntryUpdate> get updates => $_getList(0); +} + +class GetServerInfoRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetServerInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + GetServerInfoRequest._() : super(); + factory GetServerInfoRequest() => create(); + factory GetServerInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetServerInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetServerInfoRequest clone() => GetServerInfoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetServerInfoRequest copyWith(void Function(GetServerInfoRequest) updates) => super.copyWith((message) => updates(message as GetServerInfoRequest)) as GetServerInfoRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetServerInfoRequest create() => GetServerInfoRequest._(); + GetServerInfoRequest createEmptyInstance() => create(); + static $pb.PbList<GetServerInfoRequest> createRepeated() => $pb.PbList<GetServerInfoRequest>(); + @$core.pragma('dart2js:noInline') + static GetServerInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetServerInfoRequest>(create); + static GetServerInfoRequest? _defaultInstance; +} + +class GetServerInfoResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetServerInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'kuksa.val.v1'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version') + ..hasRequiredFields = false + ; + + GetServerInfoResponse._() : super(); + factory GetServerInfoResponse({ + $core.String? name, + $core.String? version, + }) { + final _result = create(); + if (name != null) { + _result.name = name; + } + if (version != null) { + _result.version = version; + } + return _result; + } + factory GetServerInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetServerInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetServerInfoResponse clone() => GetServerInfoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetServerInfoResponse copyWith(void Function(GetServerInfoResponse) updates) => super.copyWith((message) => updates(message as GetServerInfoResponse)) as GetServerInfoResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetServerInfoResponse create() => GetServerInfoResponse._(); + GetServerInfoResponse createEmptyInstance() => create(); + static $pb.PbList<GetServerInfoResponse> createRepeated() => $pb.PbList<GetServerInfoResponse>(); + @$core.pragma('dart2js:noInline') + static GetServerInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GetServerInfoResponse>(create); + static GetServerInfoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get version => $_getSZ(1); + @$pb.TagNumber(2) + set version($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasVersion() => $_has(1); + @$pb.TagNumber(2) + void clearVersion() => clearField(2); +} + diff --git a/lib/generated/kuksa/val/v1/val.pbenum.dart b/lib/generated/kuksa/val/v1/val.pbenum.dart new file mode 100644 index 0000000..0500def --- /dev/null +++ b/lib/generated/kuksa/val/v1/val.pbenum.dart @@ -0,0 +1,7 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/val.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + diff --git a/lib/generated/kuksa/val/v1/val.pbgrpc.dart b/lib/generated/kuksa/val/v1/val.pbgrpc.dart new file mode 100644 index 0000000..3a9a3c8 --- /dev/null +++ b/lib/generated/kuksa/val/v1/val.pbgrpc.dart @@ -0,0 +1,133 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/val.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'val.pb.dart' as $0; +export 'val.pb.dart'; + +class VALClient extends $grpc.Client { + static final _$get = $grpc.ClientMethod<$0.GetRequest, $0.GetResponse>( + '/kuksa.val.v1.VAL/Get', + ($0.GetRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.GetResponse.fromBuffer(value)); + static final _$set = $grpc.ClientMethod<$0.SetRequest, $0.SetResponse>( + '/kuksa.val.v1.VAL/Set', + ($0.SetRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.SetResponse.fromBuffer(value)); + static final _$subscribe = + $grpc.ClientMethod<$0.SubscribeRequest, $0.SubscribeResponse>( + '/kuksa.val.v1.VAL/Subscribe', + ($0.SubscribeRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.SubscribeResponse.fromBuffer(value)); + static final _$getServerInfo = + $grpc.ClientMethod<$0.GetServerInfoRequest, $0.GetServerInfoResponse>( + '/kuksa.val.v1.VAL/GetServerInfo', + ($0.GetServerInfoRequest value) => value.writeToBuffer(), + ($core.List<$core.int> value) => + $0.GetServerInfoResponse.fromBuffer(value)); + + VALClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, interceptors: interceptors); + + $grpc.ResponseFuture<$0.GetResponse> get($0.GetRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$get, request, options: options); + } + + $grpc.ResponseFuture<$0.SetResponse> set($0.SetRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$set, request, options: options); + } + + $grpc.ResponseStream<$0.SubscribeResponse> subscribe( + $0.SubscribeRequest request, + {$grpc.CallOptions? options}) { + return $createStreamingCall( + _$subscribe, $async.Stream.fromIterable([request]), + options: options); + } + + $grpc.ResponseFuture<$0.GetServerInfoResponse> getServerInfo( + $0.GetServerInfoRequest request, + {$grpc.CallOptions? options}) { + return $createUnaryCall(_$getServerInfo, request, options: options); + } +} + +abstract class VALServiceBase extends $grpc.Service { + $core.String get $name => 'kuksa.val.v1.VAL'; + + VALServiceBase() { + $addMethod($grpc.ServiceMethod<$0.GetRequest, $0.GetResponse>( + 'Get', + get_Pre, + false, + false, + ($core.List<$core.int> value) => $0.GetRequest.fromBuffer(value), + ($0.GetResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SetRequest, $0.SetResponse>( + 'Set', + set_Pre, + false, + false, + ($core.List<$core.int> value) => $0.SetRequest.fromBuffer(value), + ($0.SetResponse value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.SubscribeRequest, $0.SubscribeResponse>( + 'Subscribe', + subscribe_Pre, + false, + true, + ($core.List<$core.int> value) => $0.SubscribeRequest.fromBuffer(value), + ($0.SubscribeResponse value) => value.writeToBuffer())); + $addMethod( + $grpc.ServiceMethod<$0.GetServerInfoRequest, $0.GetServerInfoResponse>( + 'GetServerInfo', + getServerInfo_Pre, + false, + false, + ($core.List<$core.int> value) => + $0.GetServerInfoRequest.fromBuffer(value), + ($0.GetServerInfoResponse value) => value.writeToBuffer())); + } + + $async.Future<$0.GetResponse> get_Pre( + $grpc.ServiceCall call, $async.Future<$0.GetRequest> request) async { + return get(call, await request); + } + + $async.Future<$0.SetResponse> set_Pre( + $grpc.ServiceCall call, $async.Future<$0.SetRequest> request) async { + return set(call, await request); + } + + $async.Stream<$0.SubscribeResponse> subscribe_Pre($grpc.ServiceCall call, + $async.Future<$0.SubscribeRequest> request) async* { + yield* subscribe(call, await request); + } + + $async.Future<$0.GetServerInfoResponse> getServerInfo_Pre( + $grpc.ServiceCall call, + $async.Future<$0.GetServerInfoRequest> request) async { + return getServerInfo(call, await request); + } + + $async.Future<$0.GetResponse> get( + $grpc.ServiceCall call, $0.GetRequest request); + $async.Future<$0.SetResponse> set( + $grpc.ServiceCall call, $0.SetRequest request); + $async.Stream<$0.SubscribeResponse> subscribe( + $grpc.ServiceCall call, $0.SubscribeRequest request); + $async.Future<$0.GetServerInfoResponse> getServerInfo( + $grpc.ServiceCall call, $0.GetServerInfoRequest request); +} diff --git a/lib/generated/kuksa/val/v1/val.pbjson.dart b/lib/generated/kuksa/val/v1/val.pbjson.dart new file mode 100644 index 0000000..e6c035c --- /dev/null +++ b/lib/generated/kuksa/val/v1/val.pbjson.dart @@ -0,0 +1,126 @@ +/// +// Generated code. Do not modify. +// source: kuksa/val/v1/val.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use entryRequestDescriptor instead') +const EntryRequest$json = const { + '1': 'EntryRequest', + '2': const [ + const {'1': 'path', '3': 1, '4': 1, '5': 9, '10': 'path'}, + const {'1': 'view', '3': 2, '4': 1, '5': 14, '6': '.kuksa.val.v1.View', '10': 'view'}, + const {'1': 'fields', '3': 3, '4': 3, '5': 14, '6': '.kuksa.val.v1.Field', '10': 'fields'}, + ], +}; + +/// Descriptor for `EntryRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List entryRequestDescriptor = $convert.base64Decode('CgxFbnRyeVJlcXVlc3QSEgoEcGF0aBgBIAEoCVIEcGF0aBImCgR2aWV3GAIgASgOMhIua3Vrc2EudmFsLnYxLlZpZXdSBHZpZXcSKwoGZmllbGRzGAMgAygOMhMua3Vrc2EudmFsLnYxLkZpZWxkUgZmaWVsZHM='); +@$core.Deprecated('Use getRequestDescriptor instead') +const GetRequest$json = const { + '1': 'GetRequest', + '2': const [ + const {'1': 'entries', '3': 1, '4': 3, '5': 11, '6': '.kuksa.val.v1.EntryRequest', '10': 'entries'}, + ], +}; + +/// Descriptor for `GetRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRequestDescriptor = $convert.base64Decode('CgpHZXRSZXF1ZXN0EjQKB2VudHJpZXMYASADKAsyGi5rdWtzYS52YWwudjEuRW50cnlSZXF1ZXN0UgdlbnRyaWVz'); +@$core.Deprecated('Use getResponseDescriptor instead') +const GetResponse$json = const { + '1': 'GetResponse', + '2': const [ + const {'1': 'entries', '3': 1, '4': 3, '5': 11, '6': '.kuksa.val.v1.DataEntry', '10': 'entries'}, + const {'1': 'errors', '3': 2, '4': 3, '5': 11, '6': '.kuksa.val.v1.DataEntryError', '10': 'errors'}, + const {'1': 'error', '3': 3, '4': 1, '5': 11, '6': '.kuksa.val.v1.Error', '10': 'error'}, + ], +}; + +/// Descriptor for `GetResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getResponseDescriptor = $convert.base64Decode('CgtHZXRSZXNwb25zZRIxCgdlbnRyaWVzGAEgAygLMhcua3Vrc2EudmFsLnYxLkRhdGFFbnRyeVIHZW50cmllcxI0CgZlcnJvcnMYAiADKAsyHC5rdWtzYS52YWwudjEuRGF0YUVudHJ5RXJyb3JSBmVycm9ycxIpCgVlcnJvchgDIAEoCzITLmt1a3NhLnZhbC52MS5FcnJvclIFZXJyb3I='); +@$core.Deprecated('Use entryUpdateDescriptor instead') +const EntryUpdate$json = const { + '1': 'EntryUpdate', + '2': const [ + const {'1': 'entry', '3': 1, '4': 1, '5': 11, '6': '.kuksa.val.v1.DataEntry', '10': 'entry'}, + const {'1': 'fields', '3': 2, '4': 3, '5': 14, '6': '.kuksa.val.v1.Field', '10': 'fields'}, + ], +}; + +/// Descriptor for `EntryUpdate`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List entryUpdateDescriptor = $convert.base64Decode('CgtFbnRyeVVwZGF0ZRItCgVlbnRyeRgBIAEoCzIXLmt1a3NhLnZhbC52MS5EYXRhRW50cnlSBWVudHJ5EisKBmZpZWxkcxgCIAMoDjITLmt1a3NhLnZhbC52MS5GaWVsZFIGZmllbGRz'); +@$core.Deprecated('Use setRequestDescriptor instead') +const SetRequest$json = const { + '1': 'SetRequest', + '2': const [ + const {'1': 'updates', '3': 1, '4': 3, '5': 11, '6': '.kuksa.val.v1.EntryUpdate', '10': 'updates'}, + ], +}; + +/// Descriptor for `SetRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setRequestDescriptor = $convert.base64Decode('CgpTZXRSZXF1ZXN0EjMKB3VwZGF0ZXMYASADKAsyGS5rdWtzYS52YWwudjEuRW50cnlVcGRhdGVSB3VwZGF0ZXM='); +@$core.Deprecated('Use setResponseDescriptor instead') +const SetResponse$json = const { + '1': 'SetResponse', + '2': const [ + const {'1': 'error', '3': 1, '4': 1, '5': 11, '6': '.kuksa.val.v1.Error', '10': 'error'}, + const {'1': 'errors', '3': 2, '4': 3, '5': 11, '6': '.kuksa.val.v1.DataEntryError', '10': 'errors'}, + ], +}; + +/// Descriptor for `SetResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List setResponseDescriptor = $convert.base64Decode('CgtTZXRSZXNwb25zZRIpCgVlcnJvchgBIAEoCzITLmt1a3NhLnZhbC52MS5FcnJvclIFZXJyb3ISNAoGZXJyb3JzGAIgAygLMhwua3Vrc2EudmFsLnYxLkRhdGFFbnRyeUVycm9yUgZlcnJvcnM='); +@$core.Deprecated('Use subscribeEntryDescriptor instead') +const SubscribeEntry$json = const { + '1': 'SubscribeEntry', + '2': const [ + const {'1': 'path', '3': 1, '4': 1, '5': 9, '10': 'path'}, + const {'1': 'view', '3': 2, '4': 1, '5': 14, '6': '.kuksa.val.v1.View', '10': 'view'}, + const {'1': 'fields', '3': 3, '4': 3, '5': 14, '6': '.kuksa.val.v1.Field', '10': 'fields'}, + ], +}; + +/// Descriptor for `SubscribeEntry`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List subscribeEntryDescriptor = $convert.base64Decode('Cg5TdWJzY3JpYmVFbnRyeRISCgRwYXRoGAEgASgJUgRwYXRoEiYKBHZpZXcYAiABKA4yEi5rdWtzYS52YWwudjEuVmlld1IEdmlldxIrCgZmaWVsZHMYAyADKA4yEy5rdWtzYS52YWwudjEuRmllbGRSBmZpZWxkcw=='); +@$core.Deprecated('Use subscribeRequestDescriptor instead') +const SubscribeRequest$json = const { + '1': 'SubscribeRequest', + '2': const [ + const {'1': 'entries', '3': 1, '4': 3, '5': 11, '6': '.kuksa.val.v1.SubscribeEntry', '10': 'entries'}, + ], +}; + +/// Descriptor for `SubscribeRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List subscribeRequestDescriptor = $convert.base64Decode('ChBTdWJzY3JpYmVSZXF1ZXN0EjYKB2VudHJpZXMYASADKAsyHC5rdWtzYS52YWwudjEuU3Vic2NyaWJlRW50cnlSB2VudHJpZXM='); +@$core.Deprecated('Use subscribeResponseDescriptor instead') +const SubscribeResponse$json = const { + '1': 'SubscribeResponse', + '2': const [ + const {'1': 'updates', '3': 1, '4': 3, '5': 11, '6': '.kuksa.val.v1.EntryUpdate', '10': 'updates'}, + ], +}; + +/// Descriptor for `SubscribeResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List subscribeResponseDescriptor = $convert.base64Decode('ChFTdWJzY3JpYmVSZXNwb25zZRIzCgd1cGRhdGVzGAEgAygLMhkua3Vrc2EudmFsLnYxLkVudHJ5VXBkYXRlUgd1cGRhdGVz'); +@$core.Deprecated('Use getServerInfoRequestDescriptor instead') +const GetServerInfoRequest$json = const { + '1': 'GetServerInfoRequest', +}; + +/// Descriptor for `GetServerInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getServerInfoRequestDescriptor = $convert.base64Decode('ChRHZXRTZXJ2ZXJJbmZvUmVxdWVzdA=='); +@$core.Deprecated('Use getServerInfoResponseDescriptor instead') +const GetServerInfoResponse$json = const { + '1': 'GetServerInfoResponse', + '2': const [ + const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'version', '3': 2, '4': 1, '5': 9, '10': 'version'}, + ], +}; + +/// Descriptor for `GetServerInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getServerInfoResponseDescriptor = $convert.base64Decode('ChVHZXRTZXJ2ZXJJbmZvUmVzcG9uc2USEgoEbmFtZRgBIAEoCVIEbmFtZRIYCgd2ZXJzaW9uGAIgASgJUgd2ZXJzaW9u'); diff --git a/lib/home_page.dart b/lib/home_page.dart index 7b91129..e07a507 100644 --- a/lib/home_page.dart +++ b/lib/home_page.dart @@ -3,6 +3,9 @@ import 'dart:io'; import 'package:flutter/material.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_client.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; import 'package:flutter_hvac/Buttons/fresh_air.dart'; import 'package:flutter_svg_provider/flutter_svg_provider.dart'; import 'package:flutter_hvac/Buttons/AC.dart'; @@ -16,9 +19,22 @@ import 'widgets/left_climate.dart'; import 'widgets/right_climate.dart'; import 'widgets/slider.dart'; -class HomePage extends StatelessWidget { - final WebSocket socket; - HomePage({Key? key, required this.socket}) : super(key: key); +class HomePage extends ConsumerStatefulWidget { + const HomePage({Key? key}) : super(key: key); + + @override + _HomePageState createState() => _HomePageState(); +} + +class _HomePageState extends ConsumerState<HomePage> { + late VssClient vss; + + initState() { + vss = ref.read(vssClientProvider); + vss.run(); + + super.initState(); + } @override Widget build(BuildContext context) { @@ -52,10 +68,10 @@ class HomePage extends StatelessWidget { ), ), SizedBox( - height: SizeConfig.screenHeight / 10, - width: SizeConfig.screenWidth / 10, - child: Image.asset('images/left_climate.PNG')), - LeftClimateScrollWidget(socket: socket), + height: SizeConfig.screenHeight / 10, + width: SizeConfig.screenWidth / 10, + child: Image.asset('images/left_climate.PNG')), + LeftClimateScrollWidget(), ], ), Column( @@ -69,10 +85,10 @@ class HomePage extends StatelessWidget { ), ), SizedBox( - height: SizeConfig.screenHeight / 10, - width: SizeConfig.screenWidth / 10, - child: Image.asset('images/right_climate.PNG')), - RightClimateScrollWidget(socket: socket), + height: SizeConfig.screenHeight / 10, + width: SizeConfig.screenWidth / 10, + child: Image.asset('images/right_climate.PNG')), + RightClimateScrollWidget(), ], ), ], @@ -91,9 +107,7 @@ class HomePage extends StatelessWidget { image: Svg('images/fan.svg'), color: Colors.lightBlueAccent, fit: BoxFit.fitWidth)), - SliderControl( - socket: socket, - ), + SliderControl(), ], )), Flexible( @@ -103,64 +117,43 @@ class HomePage extends StatelessWidget { children: [ Column( children: [ - AC( - socket: socket, - serverPath: - 'Vehicle.Cabin.HVAC.IsAirConditioningActive'), + AC(), SizedBox( height: SizeConfig.safeBlockVertical, ), - AcOnFoot( - img: 'images/ac_on_foot.svg', - socket: socket, - ), + AcOnFoot(img: 'images/ac_on_foot.svg'), SizedBox( height: SizeConfig.safeBlockVertical, ), - AcOnFace( - img: 'images/ac_on_face.svg', - socket: socket, - ), + AcOnFace(img: 'images/ac_on_face.svg'), ], ), Row( children: [ - Auto(serverPath: '', socket: socket), + Auto(), SizedBox( width: SizeConfig.safeBlockHorizontal, ), - FreshAir( - serverPath: '', - socket: socket, - img: 'images/wind_in.svg'), + FreshAir(img: 'images/wind_in.svg'), ], ), Column( children: [ CustomButton( - serverPath: - 'Vehicle.Cabin.HVAC.IsRecirculationActive', - socket: socket, - img: 'images/in_out.svg', - type: 'Recirculation'), + img: 'images/in_out.svg', + type: 'Recirculation'), SizedBox( height: SizeConfig.safeBlockVertical, ), CustomButton( - serverPath: - 'Vehicle.Cabin.HVAC.IsRearDefrosterActive', - socket: socket, - img: 'images/rear_ws.svg', - type: 'Rear_defrost'), + img: 'images/rear_ws.svg', + type: 'Rear_defrost'), SizedBox( height: SizeConfig.safeBlockVertical, ), CustomButton( - serverPath: - 'Vehicle.Cabin.HVAC.IsFrontDefrosterActive', - socket: socket, - img: 'images/wind_shield.svg', - type: 'Front_defrost'), + img: 'images/wind_shield.svg', + type: 'Front_defrost'), ], ), ], diff --git a/lib/kuksa-server/intial_connection.dart b/lib/kuksa-server/intial_connection.dart deleted file mode 100644 index 0ba4e9f..0000000 --- a/lib/kuksa-server/intial_connection.dart +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle_config.dart'; - -import 'on_boarding_page.dart'; - -class InitialScreen extends ConsumerWidget { - InitialScreen({Key? key, required this.client}) : super(key: key); - final HttpClient client; - late WebSocket socket; - - @override - Widget build(BuildContext context, ref) { - final sockConnect = ref.watch(sockConnectprovider(client)); - - return sockConnect.when( - data: (socket) { - this.socket = socket; - this.socket.pingInterval = const Duration(seconds: 2); - return OnBoardingPage(client: client, socket: this.socket); - }, - error: (e, stk) { - print(e); - ref.refresh(sockConnectprovider(client)); - return const Scaffold( - backgroundColor: Colors.black, - body: Center( - child: Text( - 'error', - style: TextStyle(color: Colors.white), - )), - ); - }, - loading: () => const Scaffold( - backgroundColor: Colors.black, - body: Center( - child: Text('loading', style: TextStyle(color: Colors.white))), - ), - ); - } -} diff --git a/lib/kuksa-server/on_boarding_page.dart b/lib/kuksa-server/on_boarding_page.dart deleted file mode 100644 index 1bd3a79..0000000 --- a/lib/kuksa-server/on_boarding_page.dart +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle_config.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle_methods.dart'; - -import '../home_page.dart'; - -class OnBoardingPage extends ConsumerStatefulWidget { - const OnBoardingPage({Key? key, required this.client, required this.socket}) - : super(key: key); - final WebSocket socket; - final HttpClient client; - - @override - ConsumerState<OnBoardingPage> createState() => _OnBoardingPageState(); -} - -class _OnBoardingPageState extends ConsumerState<OnBoardingPage> { - late Timer _timer; - late WebSocket _socket; - - @override - void initState() { - super.initState(); - _socket = widget.socket; - VISS.init(widget.socket, ref); - _timer = Timer.periodic(const Duration(seconds: 2), (timer) { - if (widget.socket.readyState == 3) { - ref.refresh(sockConnectprovider(widget.client)); - } - }); - WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - widget.socket.listen( - (data) {}, - onError: (e, stk) { - print(e.toString()); - ref.refresh(sockConnectprovider(widget.client)); - }, - ); - }); - } - - @override - void dispose() { - super.dispose(); - _timer.cancel(); - widget.socket.close(786887, "Connection lost with server!"); - } - - @override - Widget build(BuildContext context) { - return HomePage( - socket: _socket, - ); - } -} diff --git a/lib/kuksa-server/vehicle-provider.dart b/lib/kuksa-server/vehicle-provider.dart deleted file mode 100644 index f070a53..0000000 --- a/lib/kuksa-server/vehicle-provider.dart +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle-class.dart'; - -final vehicleProvider = StateNotifierProvider<VehicleSignal, vehicle>( - (ref) => VehicleSignal(), -); - -class VehicleSignal extends StateNotifier<vehicle> { - static vehicle intial_value = vehicle( - isAcActive: false, - isAcDirectionDown: false, - isAcDirectionMiddle: false, - isAcDirectionUp: false, - isFrontDefrosterActive: false, - isRearDefrosterActive: false, - isRecirculationActive: false, - isAutoActive: false, - isFreshAirCirculateActive : false, - ); - VehicleSignal() : super(intial_value); - - void update({ - bool? isAcActive, - bool? isAcDirectionDown, - bool? isAcDirectionUp, - bool? isAcDirectionMiddle, - bool? isFrontDefrosterActive, - bool? isRearDefrosterActive, - bool? isRecirculationActive, - bool? isAutoActive, - bool? isFreshAirCirculateActive, - }) { - state = state.copywith( - isAcActive: isAcActive, - isAcDirectionDown: isAcDirectionDown, - isAcDirectionMiddle: isAcDirectionMiddle, - isAcDirectionUp: isAcDirectionUp, - isFrontDefrosterActive: isFrontDefrosterActive, - isRearDefrosterActive: isRearDefrosterActive, - isRecirculationActive: isRecirculationActive, - isAutoActive : isAutoActive, - isFreshAirCirculateActive : isFreshAirCirculateActive, - ); - } -} diff --git a/lib/kuksa-server/vehicle_config.dart b/lib/kuksa-server/vehicle_config.dart deleted file mode 100644 index 6eff800..0000000 --- a/lib/kuksa-server/vehicle_config.dart +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - - -import 'dart:io'; -import 'package:flutter_hvac/config.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:http/http.dart' as http; - - - -final sockConnectprovider = FutureProvider.family<WebSocket, HttpClient>( - (ref, client) => connect(client,ref)); - - - -// load certificates and set context and returns http client -Future<HttpClient> initializeClient() async { - - - SecurityContext ctx = SecurityContext.defaultContext; - - HttpClient client = HttpClient(context: ctx) - ..findProxy = null - ..badCertificateCallback = (cert, host, port) { - return true; - }; - return client; -} - - - -Future<WebSocket> connect(HttpClient client, ref) async { - final config = ref.read(ConfigStateprovider); - WebSocket socket = await WebSocket.connect( - "wss://${config.hostname}:${config.port}", - customClient: client); - return socket; -} - diff --git a/lib/kuksa-server/vehicle_methods.dart b/lib/kuksa-server/vehicle_methods.dart deleted file mode 100644 index 387c02a..0000000 --- a/lib/kuksa-server/vehicle_methods.dart +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -import 'dart:convert'; -import 'dart:io'; - -import 'package:flutter_hvac/config.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/kuksa-server/vehicle_server_path.dart'; - -class VISS { - static const requestId = "test-id"; - static void init(WebSocket socket, WidgetRef ref) { - authorize(socket, ref); - - subscribe(socket, ref, VSPath.vehicleInsideTemperature); - subscribe(socket, ref, VSPath.vehicleAmbientAirTemperature); - } - - static void update(WebSocket socket, WidgetRef ref) { - get(socket, ref, VSPath.vehicleInsideTemperature); - get(socket, ref, VSPath.vehicleAmbientAirTemperature); - } - - static void authorize(WebSocket socket, WidgetRef ref) { - final config = ref.read(ConfigStateprovider); - Map<String, dynamic> map = { - "action": "authorize", - "tokens": config.kuksaAuthToken, - "requestId": requestId - }; - socket.add(jsonEncode(map)); - } - - static void get(WebSocket socket, WidgetRef ref, String path) { - final config = ref.read(ConfigStateprovider); - - Map<String, dynamic> map = { - "action": "get", - "tokens": config.kuksaAuthToken, - "path": path, - "requestId": requestId - }; - socket.add(jsonEncode(map)); - } - - static void set( - WebSocket socket, - WidgetRef ref, - String path, - String value, - ) { - final config = ref.read(ConfigStateprovider); - - Map<String, dynamic> map = { - "action": "set", - "tokens": config.kuksaAuthToken, - "path": path, - "requestId": requestId, - "value": value - }; - socket.add(jsonEncode(map)); - } - - static void subscribe(WebSocket socket, WidgetRef ref, String path) { - final config = ref.read(ConfigStateprovider); - - Map<String, dynamic> map = { - "action": "subscribe", - "tokens": config.kuksaAuthToken, - "path": path, - "requestId": requestId - }; - socket.add(jsonEncode(map)); - } -} diff --git a/lib/kuksa-server/vehicle_server_path.dart b/lib/kuksa-server/vehicle_server_path.dart deleted file mode 100644 index e422aff..0000000 --- a/lib/kuksa-server/vehicle_server_path.dart +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - - -class VSPath { - - - static const String vehicleTrunkLocked = "Vehicle.Body.Trunk.IsLocked"; - static const String vehicleTrunkOpen = "Vehicle.Body.Trunk.IsOpen"; - - - static const String vehicleAmbientAirTemperature = - "Vehicle.AmbientAirTemperature"; - - static const String vehicleFrontLeftTire = - "Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure"; - static const String vehicleFrontRightTire = - "Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure"; - static const String vehicleRearLeftTire = - "Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure"; - - static const String vehicleRearRightTire = - "Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure"; - static const String vehicleIsChildLockActiveLeft = - "Vehicle.Cabin.Door.Row2.Left.IsChildLockActive"; - static const String vehicleIsChildLockActiveRight = - "Vehicle.Cabin.Door.Row2.Right.IsChildLockActive"; - static const String vehicleCurrentLongitude = - "Vehicle.CurrentLocation.Longitude"; - static const String vehicleCurrentLatitude = - "Vehicle.CurrentLocation.Latitude"; - - static const String vehicleInsideTemperature = - "Vehicle.Cabin.HVAC.AmbientAirTemperature"; - static const String vehicleFrontLeftAc = - "Vehicle.Cabin.HVAC.Station.Row1.Left.AirDistribution"; -} diff --git a/lib/main.dart b/lib/main.dart index 32203fa..beff055 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,9 +4,8 @@ import 'dart:io'; import 'dart:ui'; import 'package:flutter/material.dart'; -import 'package:flutter_hvac/config.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'kuksa-server/vehicle_config.dart'; +import 'package:flutter_hvac/home_page.dart'; class MyCustomScrollBehavior extends MaterialScrollBehavior { // Override behavior methods and getters like dragDevices @@ -17,13 +16,12 @@ class MyCustomScrollBehavior extends MaterialScrollBehavior { Future<void> main() async { WidgetsFlutterBinding.ensureInitialized(); - HttpClient client = await initializeClient(); runApp( ProviderScope( child: MaterialApp( scrollBehavior: MyCustomScrollBehavior(), - home: GetConfig(client: client), + home: HomePage(), ), ), ); diff --git a/lib/kuksa-server/vehicle-class.dart b/lib/vehicle-signals/vehicle_ac_status_provider.dart index a04ad90..ce6e470 100644 --- a/lib/kuksa-server/vehicle-class.dart +++ b/lib/vehicle-signals/vehicle_ac_status_provider.dart @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 -class vehicle { +import 'package:flutter_riverpod/flutter_riverpod.dart'; + +class VehicleAcStatus { late bool isAcActive; late bool isFrontDefrosterActive; late bool isRearDefrosterActive; @@ -11,7 +13,7 @@ class vehicle { late bool isAutoActive; late bool isFreshAirCirculateActive; - vehicle({ + VehicleAcStatus({ required this.isAcActive, required this.isAcDirectionDown, required this.isAcDirectionMiddle, @@ -23,7 +25,7 @@ class vehicle { required this.isFreshAirCirculateActive, }); - vehicle copywith({ + VehicleAcStatus copywith({ bool? isAcActive, bool? isAcDirectionDown, bool? isAcDirectionMiddle, @@ -34,7 +36,7 @@ class vehicle { bool? isAutoActive, bool? isFreshAirCirculateActive, }) { - return vehicle( + return VehicleAcStatus( isAcActive: isAcActive ?? this.isAcActive, isAcDirectionDown: isAcDirectionDown ?? this.isAcDirectionDown, isAcDirectionMiddle: isAcDirectionMiddle ?? this.isAcDirectionMiddle, @@ -51,3 +53,46 @@ class vehicle { ); } } + +class VehicleAcStatusNotifier extends StateNotifier<VehicleAcStatus> { + static VehicleAcStatus intial_value = VehicleAcStatus( + isAcActive: false, + isAcDirectionDown: false, + isAcDirectionMiddle: false, + isAcDirectionUp: false, + isFrontDefrosterActive: false, + isRearDefrosterActive: false, + isRecirculationActive: false, + isAutoActive: false, + isFreshAirCirculateActive : false, + ); + VehicleAcStatusNotifier() : super(intial_value); + + void update({ + bool? isAcActive, + bool? isAcDirectionDown, + bool? isAcDirectionUp, + bool? isAcDirectionMiddle, + bool? isFrontDefrosterActive, + bool? isRearDefrosterActive, + bool? isRecirculationActive, + bool? isAutoActive, + bool? isFreshAirCirculateActive, + }) { + state = state.copywith( + isAcActive: isAcActive, + isAcDirectionDown: isAcDirectionDown, + isAcDirectionMiddle: isAcDirectionMiddle, + isAcDirectionUp: isAcDirectionUp, + isFrontDefrosterActive: isFrontDefrosterActive, + isRearDefrosterActive: isRearDefrosterActive, + isRecirculationActive: isRecirculationActive, + isAutoActive : isAutoActive, + isFreshAirCirculateActive : isFreshAirCirculateActive, + ); + } +} + +final vehicleAcStatusProvider = StateNotifierProvider<VehicleAcStatusNotifier, VehicleAcStatus>( + (ref) => VehicleAcStatusNotifier(), +); diff --git a/lib/vehicle-signals/vss_client.dart b/lib/vehicle-signals/vss_client.dart new file mode 100644 index 0000000..b9769e1 --- /dev/null +++ b/lib/vehicle-signals/vss_client.dart @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: Apache-2.0 +import 'dart:io'; +import 'package:meta/meta.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:grpc/grpc.dart'; +import 'package:flutter_hvac/generated/kuksa/val/v1/val.pbgrpc.dart'; +import 'package:flutter_hvac/generated/kuksa/val/v1/types.pb.dart'; +import 'package:flutter_hvac/config.dart'; + +abstract class VssClient { + final KuksaConfig config; + final ClientChannel channel; + final VALClient stub; + final Ref ref; + + // Extenders will likely override this + final List<String> signals = []; + + VssClient({required this.config, required this.channel, required this.stub, required this.ref}); + + // Abstract method extenders must implement + void handleSignalUpdates(EntryUpdate update); + + void run() async { + if (signals.isEmpty) + return; + + var request = SubscribeRequest(); + for (var i = 0; i < signals.length; i++) { + var entry = SubscribeEntry(); + entry.path = signals[i]; + entry.fields.add(Field.FIELD_PATH); + entry.fields.add(Field.FIELD_VALUE); + request.entries.add(entry); + } + + try { + Map<String, String> metadata = {}; + if (config.authorization.isNotEmpty) { + metadata = {'authorization': "Bearer ${config.authorization}" }; + } + var responseStream = stub.subscribe(request, options: CallOptions(metadata: metadata)); + await for (var response in responseStream) { + for (var update in response.updates) { + if (!(update.hasEntry() && update.entry.hasPath())) + continue; + handleSignalUpdates(update); + } + } + } catch (e) { + print(e); + } + } + + void setUint32(String path, int value, [bool actuator = true]) async { + var dp = Datapoint() + ..uint32 = value; + set(path, dp, actuator); + } + + void setInt32(String path, int value, [bool actuator = true]) async { + var dp = Datapoint() + ..int32 = value; + set(path, dp, actuator); + } + + void setBool(String path, bool value, [bool actuator = true]) async { + var dp = Datapoint() + ..bool_12 = value; + set(path, dp, actuator); + } + + void setString(String path, String value, [bool actuator = true]) async { + var dp = Datapoint() + ..string = value; + set(path, dp, actuator); + } + + void setFloat(String path, double value, [bool actuator = true]) async { + var dp = Datapoint() + ..float = value; + set(path, dp, actuator); + } + + void setDouble(String path, double value, [bool actuator = true]) async { + var dp = Datapoint() + ..double_18 = value; + set(path, dp, actuator); + } + + void set(String path, Datapoint dp, bool actuator) async { + var entry = DataEntry() + ..path = path; + var update = EntryUpdate(); + if (actuator) { + entry.actuatorTarget = dp; + update.fields.add(Field.FIELD_ACTUATOR_TARGET); + } else { + entry.value = dp; + update.fields.add(Field.FIELD_VALUE); + } + update.entry = entry; + var request = SetRequest(); + request.updates.add(update); + Map<String, String> metadata = {}; + if (config.authorization.isNotEmpty) { + metadata = {'authorization': "Bearer ${config.authorization}" }; + } + await stub.set(request, options: CallOptions(metadata: metadata)); + } + +} diff --git a/lib/vehicle-signals/vss_path.dart b/lib/vehicle-signals/vss_path.dart new file mode 100644 index 0000000..df90a48 --- /dev/null +++ b/lib/vehicle-signals/vss_path.dart @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: Apache-2.0 + + +class VSSPath { + + static const String vehicleOutsideTemperature = + "Vehicle.AmbientAirTemperature"; + + static const String vehicleInsideTemperature = + "Vehicle.Cabin.HVAC.AmbientAirTemperature"; + + static const String vehicleIsAirConditioningActive = + "Vehicle.Cabin.HVAC.IsAirConditioningActive"; + + static const String vehicleIsFrontDefrosterActive = + "Vehicle.Cabin.HVAC.IsFrontDefrosterActive"; + + static const String vehicleIsRearDefrosterActive = + "Vehicle.Cabin.HVAC.IsRearDefrosterActive"; + + static const String vehicleIsRecirculationActive = + "Vehicle.Cabin.HVAC.IsRecirculationActive"; + + static const String vehicleFrontLeftAirDistribution = + "Vehicle.Cabin.HVAC.Station.Row1.Left.AirDistribution"; + + static const String vehicleFrontLeftFanSpeed = + "Vehicle.Cabin.HVAC.Station.Row1.Left.FanSpeed"; + + static const String vehicleFrontLeftTemp = + "Vehicle.Cabin.HVAC.Station.Row1.Left.Temperature"; + + static const String vehicleFrontRightAirDistribution = + "Vehicle.Cabin.HVAC.Station.Row1.Right.AirDistribution"; + + static const String vehicleFrontRightFanSpeed = + "Vehicle.Cabin.HVAC.Station.Row1.Right.FanSpeed"; + + static const String vehicleFrontRightTemp = + "Vehicle.Cabin.HVAC.Station.Row1.Right.Temperature"; + + static const String vehicleRearLeftAirDistribution = + "Vehicle.Cabin.HVAC.Station.Row2.Left.AirDistribution"; + + static const String vehicleRearLeftFanSpeed = + "Vehicle.Cabin.HVAC.Station.Row2.Left.FanSpeed"; + + static const String vehicleRearLeftTemp = + "Vehicle.Cabin.HVAC.Station.Row2.Left.Temperature"; + + static const String vehicleRearRightAirDistribution = + "Vehicle.Cabin.HVAC.Station.Row2.Right.AirDistribution"; + + static const String vehicleRearRightFanSpeed = + "Vehicle.Cabin.HVAC.Station.Row2.Right.FanSpeed"; + + static const String vehicleRearRightTemp = + "Vehicle.Cabin.HVAC.Station.Row2.Right.Temperature"; + +} diff --git a/lib/vehicle-signals/vss_provider.dart b/lib/vehicle-signals/vss_provider.dart new file mode 100644 index 0000000..09ce5a1 --- /dev/null +++ b/lib/vehicle-signals/vss_provider.dart @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: Apache-2.0 +import 'dart:io'; +import 'package:meta/meta.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:grpc/grpc.dart'; +import 'package:flutter_hvac/generated/kuksa/val/v1/val.pbgrpc.dart'; +import 'package:flutter_hvac/generated/kuksa/val/v1/types.pb.dart'; +import 'package:flutter_hvac/config.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_client.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_signal_providers.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; + +class HvacVssClient extends VssClient { + @override + final List<String> signals = [ + VSSPath.vehicleFrontLeftTemp, + VSSPath.vehicleFrontRightTemp, + VSSPath.vehicleFrontLeftFanSpeed + ]; + + HvacVssClient({required super.config, required super.channel, required super.stub, required super.ref}); + + @override + void handleSignalUpdates(EntryUpdate update) { + switch (update.entry.path) { + case VSSPath.vehicleFrontLeftTemp: + if (update.entry.value.hasInt32()) { + ref + .read(LeftClimateTempProvider.notifier) + .update(update.entry.value.int32); + } + break; + case VSSPath.vehicleFrontRightTemp: + if (update.entry.value.hasInt32()) { + ref + .read(RightClimateTempProvider.notifier) + .update(update.entry.value.int32); + } + break; + case VSSPath.vehicleFrontLeftFanSpeed: + if (update.entry.value.hasInt32()) { + ref + .read(fanSpeedProvider.notifier) + .update(update.entry.value.int32); + } + break; + default: + print("ERROR: Unexpected path ${update.entry.path}"); + break; + } + } +} + +final vssClientProvider = Provider((ref) { + var config = ref.read(kuksaConfigProvider); + debugPrint("Using ${config.hostname}:${config.port}"); + ChannelCredentials creds; + if (config.use_tls && config.ca_certificate.isNotEmpty) { + print("Using TLS"); + if (config.tls_server_name.isNotEmpty) + creds = ChannelCredentials.secure(certificates: config.ca_certificate, authority: config.tls_server_name); + else + creds = ChannelCredentials.secure(certificates: config.ca_certificate); + } else { + creds = ChannelCredentials.insecure(); + } + final channel = ClientChannel(config.hostname, + port: config.port, + options: ChannelOptions(credentials: creds)); + + final stub = VALClient(channel); + + return HvacVssClient(config: config, channel: channel, stub: stub, ref: ref); +}); diff --git a/lib/provider.dart b/lib/vehicle-signals/vss_signal_providers.dart index 16d65af..51b8b6c 100644 --- a/lib/provider.dart +++ b/lib/vehicle-signals/vss_signal_providers.dart @@ -1,7 +1,10 @@ // SPDX-License-Identifier: Apache-2.0 +import 'package:meta/meta.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +// Left Temperature + final LeftClimateTempProvider = StateNotifierProvider<LeftClimateTemp, int>( (ref) => LeftClimateTemp(), ); @@ -14,6 +17,8 @@ class LeftClimateTemp extends StateNotifier<int> { } } +// Right Temperature + final RightClimateTempProvider = StateNotifierProvider<RightClimateTemp, int>( (ref) => RightClimateTemp(), ); @@ -26,6 +31,8 @@ class RightClimateTemp extends StateNotifier<int> { } } +// Fan Speed + final fanSpeedProvider = StateNotifierProvider<fanslider, int>((ref) => fanslider()); diff --git a/lib/widgets/left_climate.dart b/lib/widgets/left_climate.dart index b45eb0b..6e9d275 100644 --- a/lib/widgets/left_climate.dart +++ b/lib/widgets/left_climate.dart @@ -3,16 +3,15 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_signal_providers.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; import 'package:numberpicker/numberpicker.dart'; -import '../kuksa-server/vehicle_methods.dart'; import '../size.dart'; class LeftClimateScrollWidget extends ConsumerWidget { - LeftClimateScrollWidget({Key? key, required this.socket}) : super(key: key); - - WebSocket socket; + LeftClimateScrollWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context, ref) { @@ -41,16 +40,11 @@ class LeftClimateScrollWidget extends ConsumerWidget { }, onChanged: (value) { ref.read(LeftClimateTempProvider.notifier).update(value); - VISS.set( - socket, - ref, - 'Vehicle.Cabin.HVAC.Station.Row1.Left.Temperature', - value.toString()); - VISS.set( - socket, - ref, - 'Vehicle.Cabin.HVAC.Station.Row2.Left.Temperature', - value.toString()); + var vss = ref.read(vssClientProvider); + if (vss != null) { + vss.setInt32(VSSPath.vehicleFrontLeftTemp, value); + vss.setInt32(VSSPath.vehicleRearLeftTemp, value); + } }, selectedTextStyle: TextStyle( color: Colors.lightBlueAccent, diff --git a/lib/widgets/right_climate.dart b/lib/widgets/right_climate.dart index 590b511..9b2cc39 100644 --- a/lib/widgets/right_climate.dart +++ b/lib/widgets/right_climate.dart @@ -3,16 +3,15 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_signal_providers.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; import 'package:numberpicker/numberpicker.dart'; -import '../kuksa-server/vehicle_methods.dart'; import '../size.dart'; class RightClimateScrollWidget extends ConsumerWidget { - RightClimateScrollWidget({Key? key, required this.socket}) : super(key: key); - - WebSocket socket; + RightClimateScrollWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context, ref) { @@ -40,16 +39,11 @@ class RightClimateScrollWidget extends ConsumerWidget { }, onChanged: (value) { ref.read(RightClimateTempProvider.notifier).update(value); - VISS.set( - socket, - ref, - 'Vehicle.Cabin.HVAC.Station.Row1.Right.Temperature', - value.toString()); - VISS.set( - socket, - ref, - 'Vehicle.Cabin.HVAC.Station.Row2.Right.Temperature', - value.toString()); + var vss = ref.read(vssClientProvider); + if (vss != null) { + vss.setInt32(VSSPath.vehicleFrontRightTemp, value); + vss.setInt32(VSSPath.vehicleRearRightTemp, value); + } }, selectedTextStyle: TextStyle( color: Colors.lightBlueAccent, diff --git a/lib/widgets/slider.dart b/lib/widgets/slider.dart index f8bd459..7ca5461 100644 --- a/lib/widgets/slider.dart +++ b/lib/widgets/slider.dart @@ -4,14 +4,14 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:flutter_hvac/provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_provider.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_signal_providers.dart'; +import 'package:flutter_hvac/vehicle-signals/vss_path.dart'; -import '../kuksa-server/vehicle_methods.dart'; import '../size.dart'; class SliderControl extends ConsumerWidget { - WebSocket socket; - SliderControl({Key? key, required this.socket}) : super(key: key); + SliderControl({Key? key}) : super(key: key); @override Widget build(BuildContext context, ref) { @@ -22,20 +22,13 @@ class SliderControl extends ConsumerWidget { value: ref.watch(fanSpeedProvider).toDouble(), onChanged: (value) { ref.read(fanSpeedProvider.notifier).update(value.toInt()); - VISS.set(socket, ref, 'Vehicle.Cabin.HVAC.Station.Row1.Left.FanSpeed', - value.toInt().toString()); - VISS.set( - socket, - ref, - 'Vehicle.Cabin.HVAC.Station.Row1.Right.FanSpeed', - value.toInt().toString()); - VISS.set(socket, ref, 'Vehicle.Cabin.HVAC.Station.Row2.Left.FanSpeed', - value.toInt().toString()); - VISS.set( - socket, - ref, - 'Vehicle.Cabin.HVAC.Station.Row2.Right.FanSpeed', - value.toInt().toString()); + var vss = ref.read(vssClientProvider); + if (vss != null) { + vss.setUint32(VSSPath.vehicleFrontLeftFanSpeed, value.toInt()); + vss.setUint32(VSSPath.vehicleFrontRightFanSpeed, value.toInt()); + vss.setUint32(VSSPath.vehicleRearLeftFanSpeed, value.toInt()); + vss.setUint32(VSSPath.vehicleRearRightFanSpeed, value.toInt()); + } }, min: 0, max: 100, |