diff --git a/apps/apps/client/android/app/build.gradle.kts b/apps/apps/client/android/app/build.gradle.kts index 1df6dbf9..04b25374 100644 --- a/apps/apps/client/android/app/build.gradle.kts +++ b/apps/apps/client/android/app/build.gradle.kts @@ -3,6 +3,7 @@ plugins { id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") + id("com.google.gms.google-services") } android { diff --git a/apps/apps/client/android/app/google-services.json b/apps/apps/client/android/app/google-services.json new file mode 100644 index 00000000..7533ddc2 --- /dev/null +++ b/apps/apps/client/android/app/google-services.json @@ -0,0 +1,190 @@ +{ + "project_info": { + "project_number": "933560802882", + "project_id": "krow-workforce-dev", + "storage_bucket": "krow-workforce-dev.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:933560802882:android:87d41566f8dda41d7757db", + "android_client_info": { + "package_name": "com.example.krow_workforce" + } + }, + "oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.krow.app.staff.dev" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:933560802882:android:edcddb83ea4bbb517757db", + "android_client_info": { + "package_name": "com.krow.app.business.dev" + } + }, + "oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.krow.app.staff.dev" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:933560802882:android:d49b8c0f4d19e95e7757db", + "android_client_info": { + "package_name": "com.krow.app.staff.dev" + } + }, + "oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.krow.app.staff.dev" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:933560802882:android:da13569105659ead7757db", + "android_client_info": { + "package_name": "com.krowwithus.client" + } + }, + "oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.krow.app.staff.dev" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:933560802882:android:d26bde4ee337b0b17757db", + "android_client_info": { + "package_name": "com.krowwithus.krow_workforce.dev" + } + }, + "oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDBYhflhK6DThKnS7RM-9raKdvyKzLUjY4" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "933560802882-grp98a1v7amflnnup68vh01tj06eaem1.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "933560802882-dppsapp5i3lsfrlm1mhob2s21peofg1t.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "com.krow.app.staff.dev" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/apps/apps/client/android/settings.gradle.kts b/apps/apps/client/android/settings.gradle.kts index ca7fe065..e4e86fb6 100644 --- a/apps/apps/client/android/settings.gradle.kts +++ b/apps/apps/client/android/settings.gradle.kts @@ -21,6 +21,7 @@ plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "8.11.1" apply false id("org.jetbrains.kotlin.android") version "2.2.20" apply false + id("com.google.gms.google-services") version "4.4.2" apply false } include(":app") diff --git a/apps/apps/client/lib/main.dart b/apps/apps/client/lib/main.dart index 03e1142b..5f323380 100644 --- a/apps/apps/client/lib/main.dart +++ b/apps/apps/client/lib/main.dart @@ -7,11 +7,11 @@ import 'package:flutter_modular/flutter_modular.dart'; import 'package:client_authentication/client_authentication.dart' as client_authentication; import 'package:client_home/client_home.dart' as client_home; -import 'package:client_settings/client_settings.dart' as client_settings; -import 'package:client_hubs/client_hubs.dart' as client_hubs; +import 'package:firebase_core/firebase_core.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); runApp(ModularApp(module: AppModule(), child: const AppWidget())); } @@ -27,13 +27,6 @@ class AppModule extends Module { // Client home route r.module('/client-home', module: client_home.ClientHomeModule()); - - // Client settings route - r.module( - '/client-settings', - module: client_settings.ClientSettingsModule(), - ); - r.module('/client/hubs', module: client_hubs.ClientHubsModule()); } } diff --git a/apps/apps/client/macos/Flutter/GeneratedPluginRegistrant.swift b/apps/apps/client/macos/Flutter/GeneratedPluginRegistrant.swift index 724bb2ac..8bd29968 100644 --- a/apps/apps/client/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/apps/apps/client/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,8 +5,14 @@ import FlutterMacOS import Foundation +import firebase_app_check +import firebase_auth +import firebase_core import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FLTFirebaseAppCheckPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAppCheckPlugin")) + FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) + FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/apps/apps/client/windows/flutter/generated_plugin_registrant.cc b/apps/apps/client/windows/flutter/generated_plugin_registrant.cc index 8b6d4680..d141b74f 100644 --- a/apps/apps/client/windows/flutter/generated_plugin_registrant.cc +++ b/apps/apps/client/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,12 @@ #include "generated_plugin_registrant.h" +#include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FirebaseAuthPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); + FirebaseCorePluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); } diff --git a/apps/apps/client/windows/flutter/generated_plugins.cmake b/apps/apps/client/windows/flutter/generated_plugins.cmake index b93c4c30..29944d5b 100644 --- a/apps/apps/client/windows/flutter/generated_plugins.cmake +++ b/apps/apps/client/windows/flutter/generated_plugins.cmake @@ -3,6 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + firebase_auth + firebase_core ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/apps/apps/staff/macos/Flutter/GeneratedPluginRegistrant.swift b/apps/apps/staff/macos/Flutter/GeneratedPluginRegistrant.swift index 724bb2ac..8bd29968 100644 --- a/apps/apps/staff/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/apps/apps/staff/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,8 +5,14 @@ import FlutterMacOS import Foundation +import firebase_app_check +import firebase_auth +import firebase_core import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FLTFirebaseAppCheckPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAppCheckPlugin")) + FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) + FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/apps/apps/staff/windows/flutter/generated_plugin_registrant.cc b/apps/apps/staff/windows/flutter/generated_plugin_registrant.cc index 8b6d4680..d141b74f 100644 --- a/apps/apps/staff/windows/flutter/generated_plugin_registrant.cc +++ b/apps/apps/staff/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,12 @@ #include "generated_plugin_registrant.h" +#include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FirebaseAuthPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); + FirebaseCorePluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); } diff --git a/apps/apps/staff/windows/flutter/generated_plugins.cmake b/apps/apps/staff/windows/flutter/generated_plugins.cmake index b93c4c30..29944d5b 100644 --- a/apps/apps/staff/windows/flutter/generated_plugins.cmake +++ b/apps/apps/staff/windows/flutter/generated_plugins.cmake @@ -3,6 +3,8 @@ # list(APPEND FLUTTER_PLUGIN_LIST + firebase_auth + firebase_core ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/apps/packages/data_connect/lib/krow_data_connect.dart b/apps/packages/data_connect/lib/krow_data_connect.dart index 3a42b836..783b61df 100644 --- a/apps/packages/data_connect/lib/krow_data_connect.dart +++ b/apps/packages/data_connect/lib/krow_data_connect.dart @@ -6,9 +6,8 @@ /// TODO: These mocks currently do not implement any specific interfaces. /// They will implement interfaces defined in feature packages once those are created. -export 'src/mocks/auth_repository_mock.dart'; +// export 'src/mocks/auth_repository_mock.dart'; // Comentado, usaremos la implementación real export 'src/mocks/staff_repository_mock.dart'; -export 'src/mocks/business_repository_mock.dart'; export 'src/mocks/event_repository_mock.dart'; export 'src/mocks/skill_repository_mock.dart'; export 'src/mocks/financial_repository_mock.dart'; @@ -16,3 +15,6 @@ export 'src/mocks/rating_repository_mock.dart'; export 'src/mocks/support_repository_mock.dart'; export 'src/mocks/home_repository_mock.dart'; export 'src/data_connect_module.dart'; + +// Export the generated Data Connect SDK +export 'src/dataconnect_generated/generated.dart'; \ No newline at end of file diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/config.json b/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/config.json new file mode 100644 index 00000000..e37ed06f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/config.json @@ -0,0 +1,9 @@ +{ + "description": "A set of guides for interacting with the generated firebase dataconnect sdk", + "mcpServers": { + "firebase": { + "command": "npx", + "args": ["-y", "firebase-tools@latest", "experimental:mcp"] + } + } +} diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/setup.md b/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/setup.md new file mode 100644 index 00000000..4a3737fe --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/setup.md @@ -0,0 +1,15 @@ +# Setup + +This guide will walk you through setting up your environment to use the Firebase Data Connect SDK. Mostly using +documentation listed [here](https://firebase.google.com/docs/flutter/setup?platform=ios#install-cli-tools). + +1. Make sure you have the latest Firebase CLI tools installed. Follow the instructions [here](https://firebase.google.com/docs/cli#setup_update_cli) to install. +2. Log into your Firebase account: +```sh +firebase login +``` +3. Install the FlutterFire CLI by running the following command from any directory: +```sh +dart pub global activate flutterfire_cli +``` +4. Make sure the user has initialized Firebase already based on the instructions [here](https://firebase.google.com/docs/flutter/setup?platform=ios#initialize-firebase). diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/usage.md b/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/usage.md new file mode 100644 index 00000000..0cc3f883 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/.guides/usage.md @@ -0,0 +1,32 @@ +# Basic Usage + +```dart +ExampleConnector.instance.createDocument(createDocumentVariables).execute(); +ExampleConnector.instance.updateDocument(updateDocumentVariables).execute(); +ExampleConnector.instance.deleteDocument(deleteDocumentVariables).execute(); +ExampleConnector.instance.createConversation(createConversationVariables).execute(); +ExampleConnector.instance.updateConversation(updateConversationVariables).execute(); +ExampleConnector.instance.updateConversationLastMessage(updateConversationLastMessageVariables).execute(); +ExampleConnector.instance.deleteConversation(deleteConversationVariables).execute(); +ExampleConnector.instance.listHubs().execute(); +ExampleConnector.instance.getHubById(getHubByIdVariables).execute(); +ExampleConnector.instance.getHubsByOwnerId(getHubsByOwnerIdVariables).execute(); + +``` + +## Optional Fields + +Some operations may have optional fields. In these cases, the Flutter SDK exposes a builder method, and will have to be set separately. + +Optional fields can be discovered based on classes that have `Optional` object types. + +This is an example of a mutation with an optional field: + +```dart +await ExampleConnector.instance.filterVendorBenefitPlans({ ... }) +.vendorId(...) +.execute(); +``` + +Note: the above example is a mutation, but the same logic applies to query operations as well. Additionally, `createMovie` is an example, and may not be available to the user. + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/README.md b/apps/packages/data_connect/lib/src/dataconnect_generated/README.md new file mode 100644 index 00000000..e7cfd881 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/README.md @@ -0,0 +1,23741 @@ +# dataconnect_generated SDK + +## Installation +```sh +flutter pub get firebase_data_connect +flutterfire configure +``` +For more information, see [Flutter for Firebase installation documentation](https://firebase.google.com/docs/data-connect/flutter-sdk#use-core). + +## Data Connect instance +Each connector creates a static class, with an instance of the `DataConnect` class that can be used to connect to your Data Connect backend and call operations. + +### Connecting to the emulator + +```dart +String host = 'localhost'; // or your host name +int port = 9399; // or your port number +ExampleConnector.instance.dataConnect.useDataConnectEmulator(host, port); +``` + +You can also call queries and mutations by using the connector class. +## Queries + +### listHubs +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listHubs().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listHubs(); +listHubsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listHubs().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getHubById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getHubById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getHubById( + id: id, +); +getHubByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getHubById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getHubsByOwnerId +#### Required Arguments +```dart +String ownerId = ...; +ExampleConnector.instance.getHubsByOwnerId( + ownerId: ownerId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getHubsByOwnerId( + ownerId: ownerId, +); +getHubsByOwnerIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ownerId = ...; + +final ref = ExampleConnector.instance.getHubsByOwnerId( + ownerId: ownerId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterHubs +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterHubs().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterHubs, we created `filterHubsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterHubsVariablesBuilder { + ... + + FilterHubsVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + FilterHubsVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + FilterHubsVariablesBuilder nfcTagId(String? t) { + _nfcTagId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterHubs() +.ownerId(ownerId) +.name(name) +.nfcTagId(nfcTagId) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterHubs(); +filterHubsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterHubs().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listCategories +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listCategories().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listCategories(); +listCategoriesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listCategories().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getCategoryById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getCategoryById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getCategoryById( + id: id, +); +getCategoryByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getCategoryById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterCategories +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterCategories().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterCategories, we created `filterCategoriesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterCategoriesVariablesBuilder { + ... + + FilterCategoriesVariablesBuilder categoryId(String? t) { + _categoryId.value = t; + return this; + } + FilterCategoriesVariablesBuilder label(String? t) { + _label.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterCategories() +.categoryId(categoryId) +.label(label) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterCategories(); +filterCategoriesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterCategories().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTeamHubs +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listTeamHubs().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTeamHubs(); +listTeamHubsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listTeamHubs().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTeamHubById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getTeamHubById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTeamHubById( + id: id, +); +getTeamHubByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getTeamHubById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTeamHubsByTeamId +#### Required Arguments +```dart +String teamId = ...; +ExampleConnector.instance.getTeamHubsByTeamId( + teamId: teamId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTeamHubsByTeamId( + teamId: teamId, +); +getTeamHubsByTeamIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamId = ...; + +final ref = ExampleConnector.instance.getTeamHubsByTeamId( + teamId: teamId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTeamHubsByOwnerId +#### Required Arguments +```dart +String ownerId = ...; +ExampleConnector.instance.listTeamHubsByOwnerId( + ownerId: ownerId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTeamHubsByOwnerId( + ownerId: ownerId, +); +listTeamHubsByOwnerIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ownerId = ...; + +final ref = ExampleConnector.instance.listTeamHubsByOwnerId( + ownerId: ownerId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listActivityLogs +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listActivityLogs().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listActivityLogs, we created `listActivityLogsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListActivityLogsVariablesBuilder { + ... + + ListActivityLogsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListActivityLogsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listActivityLogs() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listActivityLogs(); +listActivityLogsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listActivityLogs().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getActivityLogById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getActivityLogById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getActivityLogById( + id: id, +); +getActivityLogByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getActivityLogById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listActivityLogsByUserId +#### Required Arguments +```dart +String userId = ...; +ExampleConnector.instance.listActivityLogsByUserId( + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listActivityLogsByUserId, we created `listActivityLogsByUserIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListActivityLogsByUserIdVariablesBuilder { + ... + ListActivityLogsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListActivityLogsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listActivityLogsByUserId( + userId: userId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listActivityLogsByUserId( + userId: userId, +); +listActivityLogsByUserIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; + +final ref = ExampleConnector.instance.listActivityLogsByUserId( + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listUnreadActivityLogsByUserId +#### Required Arguments +```dart +String userId = ...; +ExampleConnector.instance.listUnreadActivityLogsByUserId( + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listUnreadActivityLogsByUserId, we created `listUnreadActivityLogsByUserIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListUnreadActivityLogsByUserIdVariablesBuilder { + ... + ListUnreadActivityLogsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUnreadActivityLogsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listUnreadActivityLogsByUserId( + userId: userId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listUnreadActivityLogsByUserId( + userId: userId, +); +listUnreadActivityLogsByUserIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; + +final ref = ExampleConnector.instance.listUnreadActivityLogsByUserId( + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterActivityLogs +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterActivityLogs().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterActivityLogs, we created `filterActivityLogsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterActivityLogsVariablesBuilder { + ... + + FilterActivityLogsVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + FilterActivityLogsVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + FilterActivityLogsVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + FilterActivityLogsVariablesBuilder isRead(bool? t) { + _isRead.value = t; + return this; + } + FilterActivityLogsVariablesBuilder activityType(ActivityType? t) { + _activityType.value = t; + return this; + } + FilterActivityLogsVariablesBuilder iconType(ActivityIconType? t) { + _iconType.value = t; + return this; + } + FilterActivityLogsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterActivityLogsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterActivityLogs() +.userId(userId) +.dateFrom(dateFrom) +.dateTo(dateTo) +.isRead(isRead) +.activityType(activityType) +.iconType(iconType) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterActivityLogs(); +filterActivityLogsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterActivityLogs().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listLevels +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listLevels().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listLevels(); +listLevelsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listLevels().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getLevelById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getLevelById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getLevelById( + id: id, +); +getLevelByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getLevelById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterLevels +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterLevels().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterLevels, we created `filterLevelsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterLevelsVariablesBuilder { + ... + + FilterLevelsVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + FilterLevelsVariablesBuilder xpRequired(int? t) { + _xpRequired.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterLevels() +.name(name) +.xpRequired(xpRequired) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterLevels(); +filterLevelsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterLevels().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getShiftRoleById +#### Required Arguments +```dart +String shiftId = ...; +String roleId = ...; +ExampleConnector.instance.getShiftRoleById( + shiftId: shiftId, + roleId: roleId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getShiftRoleById( + shiftId: shiftId, + roleId: roleId, +); +getShiftRoleByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.getShiftRoleById( + shiftId: shiftId, + roleId: roleId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftRolesByShiftId +#### Required Arguments +```dart +String shiftId = ...; +ExampleConnector.instance.listShiftRolesByShiftId( + shiftId: shiftId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listShiftRolesByShiftId, we created `listShiftRolesByShiftIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListShiftRolesByShiftIdVariablesBuilder { + ... + ListShiftRolesByShiftIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByShiftIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listShiftRolesByShiftId( + shiftId: shiftId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftRolesByShiftId( + shiftId: shiftId, +); +listShiftRolesByShiftIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; + +final ref = ExampleConnector.instance.listShiftRolesByShiftId( + shiftId: shiftId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftRolesByRoleId +#### Required Arguments +```dart +String roleId = ...; +ExampleConnector.instance.listShiftRolesByRoleId( + roleId: roleId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listShiftRolesByRoleId, we created `listShiftRolesByRoleIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListShiftRolesByRoleIdVariablesBuilder { + ... + ListShiftRolesByRoleIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByRoleIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listShiftRolesByRoleId( + roleId: roleId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftRolesByRoleId( + roleId: roleId, +); +listShiftRolesByRoleIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String roleId = ...; + +final ref = ExampleConnector.instance.listShiftRolesByRoleId( + roleId: roleId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftRolesByShiftIdAndTimeRange +#### Required Arguments +```dart +String shiftId = ...; +Timestamp start = ...; +Timestamp end = ...; +ExampleConnector.instance.listShiftRolesByShiftIdAndTimeRange( + shiftId: shiftId, + start: start, + end: end, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listShiftRolesByShiftIdAndTimeRange, we created `listShiftRolesByShiftIdAndTimeRangeBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder { + ... + ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listShiftRolesByShiftIdAndTimeRange( + shiftId: shiftId, + start: start, + end: end, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftRolesByShiftIdAndTimeRange( + shiftId: shiftId, + start: start, + end: end, +); +listShiftRolesByShiftIdAndTimeRangeData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +Timestamp start = ...; +Timestamp end = ...; + +final ref = ExampleConnector.instance.listShiftRolesByShiftIdAndTimeRange( + shiftId: shiftId, + start: start, + end: end, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftRolesByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listShiftRolesByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listShiftRolesByVendorId, we created `listShiftRolesByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListShiftRolesByVendorIdVariablesBuilder { + ... + ListShiftRolesByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listShiftRolesByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftRolesByVendorId( + vendorId: vendorId, +); +listShiftRolesByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listShiftRolesByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getVendorById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getVendorById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getVendorById( + id: id, +); +getVendorByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getVendorById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getVendorByUserId +#### Required Arguments +```dart +String userId = ...; +ExampleConnector.instance.getVendorByUserId( + userId: userId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getVendorByUserId( + userId: userId, +); +getVendorByUserIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; + +final ref = ExampleConnector.instance.getVendorByUserId( + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listVendors +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listVendors().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listVendors(); +listVendorsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listVendors().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShifts +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listShifts().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listShifts, we created `listShiftsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListShiftsVariablesBuilder { + ... + + ListShiftsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listShifts() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShifts(); +listShiftsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listShifts().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getShiftById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getShiftById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getShiftById( + id: id, +); +getShiftByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getShiftById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterShifts +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterShifts().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterShifts, we created `filterShiftsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterShiftsVariablesBuilder { + ... + + FilterShiftsVariablesBuilder status(ShiftStatus? t) { + _status.value = t; + return this; + } + FilterShiftsVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + FilterShiftsVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + FilterShiftsVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + FilterShiftsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterShiftsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterShifts() +.status(status) +.orderId(orderId) +.dateFrom(dateFrom) +.dateTo(dateTo) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterShifts(); +filterShiftsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterShifts().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getShiftsByBusinessId +#### Required Arguments +```dart +String businessId = ...; +ExampleConnector.instance.getShiftsByBusinessId( + businessId: businessId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getShiftsByBusinessId, we created `getShiftsByBusinessIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetShiftsByBusinessIdVariablesBuilder { + ... + GetShiftsByBusinessIdVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + GetShiftsByBusinessIdVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + GetShiftsByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetShiftsByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getShiftsByBusinessId( + businessId: businessId, +) +.dateFrom(dateFrom) +.dateTo(dateTo) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getShiftsByBusinessId( + businessId: businessId, +); +getShiftsByBusinessIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; + +final ref = ExampleConnector.instance.getShiftsByBusinessId( + businessId: businessId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getShiftsByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.getShiftsByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getShiftsByVendorId, we created `getShiftsByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetShiftsByVendorIdVariablesBuilder { + ... + GetShiftsByVendorIdVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + GetShiftsByVendorIdVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + GetShiftsByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetShiftsByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getShiftsByVendorId( + vendorId: vendorId, +) +.dateFrom(dateFrom) +.dateTo(dateTo) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getShiftsByVendorId( + vendorId: vendorId, +); +getShiftsByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.getShiftsByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listCourses +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listCourses().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listCourses(); +listCoursesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listCourses().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getCourseById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getCourseById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getCourseById( + id: id, +); +getCourseByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getCourseById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterCourses +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterCourses().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterCourses, we created `filterCoursesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterCoursesVariablesBuilder { + ... + + FilterCoursesVariablesBuilder categoryId(String? t) { + _categoryId.value = t; + return this; + } + FilterCoursesVariablesBuilder isCertification(bool? t) { + _isCertification.value = t; + return this; + } + FilterCoursesVariablesBuilder levelRequired(String? t) { + _levelRequired.value = t; + return this; + } + FilterCoursesVariablesBuilder completed(bool? t) { + _completed.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterCourses() +.categoryId(categoryId) +.isCertification(isCertification) +.levelRequired(levelRequired) +.completed(completed) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterCourses(); +filterCoursesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterCourses().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listDocuments +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listDocuments().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listDocuments(); +listDocumentsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listDocuments().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getDocumentById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getDocumentById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getDocumentById( + id: id, +); +getDocumentByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getDocumentById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterDocuments +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterDocuments().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterDocuments, we created `filterDocumentsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterDocumentsVariablesBuilder { + ... + + FilterDocumentsVariablesBuilder documentType(DocumentType? t) { + _documentType.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterDocuments() +.documentType(documentType) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterDocuments(); +filterDocumentsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterDocuments().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listConversations +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listConversations().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listConversations, we created `listConversationsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListConversationsVariablesBuilder { + ... + + ListConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listConversations() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listConversations(); +listConversationsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listConversations().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getConversationById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getConversationById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getConversationById( + id: id, +); +getConversationByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getConversationById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listConversationsByType +#### Required Arguments +```dart +ConversationType conversationType = ...; +ExampleConnector.instance.listConversationsByType( + conversationType: conversationType, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listConversationsByType, we created `listConversationsByTypeBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListConversationsByTypeVariablesBuilder { + ... + ListConversationsByTypeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListConversationsByTypeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listConversationsByType( + conversationType: conversationType, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listConversationsByType( + conversationType: conversationType, +); +listConversationsByTypeData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +ConversationType conversationType = ...; + +final ref = ExampleConnector.instance.listConversationsByType( + conversationType: conversationType, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listConversationsByStatus +#### Required Arguments +```dart +ConversationStatus status = ...; +ExampleConnector.instance.listConversationsByStatus( + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listConversationsByStatus, we created `listConversationsByStatusBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListConversationsByStatusVariablesBuilder { + ... + ListConversationsByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListConversationsByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listConversationsByStatus( + status: status, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listConversationsByStatus( + status: status, +); +listConversationsByStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +ConversationStatus status = ...; + +final ref = ExampleConnector.instance.listConversationsByStatus( + status: status, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterConversations +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterConversations().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterConversations, we created `filterConversationsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterConversationsVariablesBuilder { + ... + + FilterConversationsVariablesBuilder status(ConversationStatus? t) { + _status.value = t; + return this; + } + FilterConversationsVariablesBuilder conversationType(ConversationType? t) { + _conversationType.value = t; + return this; + } + FilterConversationsVariablesBuilder isGroup(bool? t) { + _isGroup.value = t; + return this; + } + FilterConversationsVariablesBuilder lastMessageAfter(Timestamp? t) { + _lastMessageAfter.value = t; + return this; + } + FilterConversationsVariablesBuilder lastMessageBefore(Timestamp? t) { + _lastMessageBefore.value = t; + return this; + } + FilterConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterConversations() +.status(status) +.conversationType(conversationType) +.isGroup(isGroup) +.lastMessageAfter(lastMessageAfter) +.lastMessageBefore(lastMessageBefore) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterConversations(); +filterConversationsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterConversations().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listAttireOptions +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listAttireOptions().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listAttireOptions(); +listAttireOptionsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listAttireOptions().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getAttireOptionById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getAttireOptionById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getAttireOptionById( + id: id, +); +getAttireOptionByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getAttireOptionById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterAttireOptions +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterAttireOptions().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterAttireOptions, we created `filterAttireOptionsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterAttireOptionsVariablesBuilder { + ... + + FilterAttireOptionsVariablesBuilder itemId(String? t) { + _itemId.value = t; + return this; + } + FilterAttireOptionsVariablesBuilder isMandatory(bool? t) { + _isMandatory.value = t; + return this; + } + FilterAttireOptionsVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterAttireOptions() +.itemId(itemId) +.isMandatory(isMandatory) +.vendorId(vendorId) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterAttireOptions(); +filterAttireOptionsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterAttireOptions().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTaxForms +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listTaxForms().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTaxForms(); +listTaxFormsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listTaxForms().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTaxFormById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getTaxFormById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTaxFormById( + id: id, +); +getTaxFormByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getTaxFormById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTaxFormsBystaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.getTaxFormsBystaffId( + staffId: staffId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTaxFormsBystaffId( + staffId: staffId, +); +getTaxFormsBystaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.getTaxFormsBystaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterTaxForms +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterTaxForms().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterTaxForms, we created `filterTaxFormsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterTaxFormsVariablesBuilder { + ... + + FilterTaxFormsVariablesBuilder formType(TaxFormType? t) { + _formType.value = t; + return this; + } + FilterTaxFormsVariablesBuilder status(TaxFormStatus? t) { + _status.value = t; + return this; + } + FilterTaxFormsVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterTaxForms() +.formType(formType) +.status(status) +.staffId(staffId) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterTaxForms(); +filterTaxFormsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterTaxForms().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTeams +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listTeams().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTeams(); +listTeamsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listTeams().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTeamById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getTeamById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTeamById( + id: id, +); +getTeamByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getTeamById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTeamsByOwnerId +#### Required Arguments +```dart +String ownerId = ...; +ExampleConnector.instance.getTeamsByOwnerId( + ownerId: ownerId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTeamsByOwnerId( + ownerId: ownerId, +); +getTeamsByOwnerIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ownerId = ...; + +final ref = ExampleConnector.instance.getTeamsByOwnerId( + ownerId: ownerId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTeamHudDepartments +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listTeamHudDepartments().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listTeamHudDepartments, we created `listTeamHudDepartmentsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListTeamHudDepartmentsVariablesBuilder { + ... + + ListTeamHudDepartmentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListTeamHudDepartmentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listTeamHudDepartments() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTeamHudDepartments(); +listTeamHudDepartmentsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listTeamHudDepartments().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTeamHudDepartmentById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getTeamHudDepartmentById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTeamHudDepartmentById( + id: id, +); +getTeamHudDepartmentByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getTeamHudDepartmentById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTeamHudDepartmentsByTeamHubId +#### Required Arguments +```dart +String teamHubId = ...; +ExampleConnector.instance.listTeamHudDepartmentsByTeamHubId( + teamHubId: teamHubId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listTeamHudDepartmentsByTeamHubId, we created `listTeamHudDepartmentsByTeamHubIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListTeamHudDepartmentsByTeamHubIdVariablesBuilder { + ... + ListTeamHudDepartmentsByTeamHubIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListTeamHudDepartmentsByTeamHubIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listTeamHudDepartmentsByTeamHubId( + teamHubId: teamHubId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTeamHudDepartmentsByTeamHubId( + teamHubId: teamHubId, +); +listTeamHudDepartmentsByTeamHubIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamHubId = ...; + +final ref = ExampleConnector.instance.listTeamHudDepartmentsByTeamHubId( + teamHubId: teamHubId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listCustomRateCards +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listCustomRateCards().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listCustomRateCards(); +listCustomRateCardsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listCustomRateCards().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getCustomRateCardById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getCustomRateCardById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getCustomRateCardById( + id: id, +); +getCustomRateCardByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getCustomRateCardById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listMessages +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listMessages().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listMessages(); +listMessagesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listMessages().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getMessageById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getMessageById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getMessageById( + id: id, +); +getMessageByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getMessageById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getMessagesByConversationId +#### Required Arguments +```dart +String conversationId = ...; +ExampleConnector.instance.getMessagesByConversationId( + conversationId: conversationId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getMessagesByConversationId( + conversationId: conversationId, +); +getMessagesByConversationIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; + +final ref = ExampleConnector.instance.getMessagesByConversationId( + conversationId: conversationId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffDocumentByKey +#### Required Arguments +```dart +String staffId = ...; +String documentId = ...; +ExampleConnector.instance.getStaffDocumentByKey( + staffId: staffId, + documentId: documentId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffDocumentByKey( + staffId: staffId, + documentId: documentId, +); +getStaffDocumentByKeyData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String documentId = ...; + +final ref = ExampleConnector.instance.getStaffDocumentByKey( + staffId: staffId, + documentId: documentId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffDocumentsByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listStaffDocumentsByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffDocumentsByStaffId, we created `listStaffDocumentsByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffDocumentsByStaffIdVariablesBuilder { + ... + ListStaffDocumentsByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffDocumentsByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffDocumentsByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffDocumentsByStaffId( + staffId: staffId, +); +listStaffDocumentsByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listStaffDocumentsByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffDocumentsByDocumentType +#### Required Arguments +```dart +DocumentType documentType = ...; +ExampleConnector.instance.listStaffDocumentsByDocumentType( + documentType: documentType, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffDocumentsByDocumentType, we created `listStaffDocumentsByDocumentTypeBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffDocumentsByDocumentTypeVariablesBuilder { + ... + ListStaffDocumentsByDocumentTypeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffDocumentsByDocumentTypeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffDocumentsByDocumentType( + documentType: documentType, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffDocumentsByDocumentType( + documentType: documentType, +); +listStaffDocumentsByDocumentTypeData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +DocumentType documentType = ...; + +final ref = ExampleConnector.instance.listStaffDocumentsByDocumentType( + documentType: documentType, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffDocumentsByStatus +#### Required Arguments +```dart +DocumentStatus status = ...; +ExampleConnector.instance.listStaffDocumentsByStatus( + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffDocumentsByStatus, we created `listStaffDocumentsByStatusBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffDocumentsByStatusVariablesBuilder { + ... + ListStaffDocumentsByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffDocumentsByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffDocumentsByStatus( + status: status, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffDocumentsByStatus( + status: status, +); +listStaffDocumentsByStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +DocumentStatus status = ...; + +final ref = ExampleConnector.instance.listStaffDocumentsByStatus( + status: status, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getWorkforceById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getWorkforceById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getWorkforceById( + id: id, +); +getWorkforceByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getWorkforceById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getWorkforceByVendorAndStaff +#### Required Arguments +```dart +String vendorId = ...; +String staffId = ...; +ExampleConnector.instance.getWorkforceByVendorAndStaff( + vendorId: vendorId, + staffId: staffId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getWorkforceByVendorAndStaff( + vendorId: vendorId, + staffId: staffId, +); +getWorkforceByVendorAndStaffData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +String staffId = ...; + +final ref = ExampleConnector.instance.getWorkforceByVendorAndStaff( + vendorId: vendorId, + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listWorkforceByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listWorkforceByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listWorkforceByVendorId, we created `listWorkforceByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListWorkforceByVendorIdVariablesBuilder { + ... + ListWorkforceByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListWorkforceByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listWorkforceByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listWorkforceByVendorId( + vendorId: vendorId, +); +listWorkforceByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listWorkforceByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listWorkforceByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listWorkforceByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listWorkforceByStaffId, we created `listWorkforceByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListWorkforceByStaffIdVariablesBuilder { + ... + ListWorkforceByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListWorkforceByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listWorkforceByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listWorkforceByStaffId( + staffId: staffId, +); +listWorkforceByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listWorkforceByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getWorkforceByVendorAndNumber +#### Required Arguments +```dart +String vendorId = ...; +String workforceNumber = ...; +ExampleConnector.instance.getWorkforceByVendorAndNumber( + vendorId: vendorId, + workforceNumber: workforceNumber, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getWorkforceByVendorAndNumber( + vendorId: vendorId, + workforceNumber: workforceNumber, +); +getWorkforceByVendorAndNumberData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +String workforceNumber = ...; + +final ref = ExampleConnector.instance.getWorkforceByVendorAndNumber( + vendorId: vendorId, + workforceNumber: workforceNumber, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listEmergencyContacts +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listEmergencyContacts().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listEmergencyContacts(); +listEmergencyContactsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listEmergencyContacts().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getEmergencyContactById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getEmergencyContactById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getEmergencyContactById( + id: id, +); +getEmergencyContactByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getEmergencyContactById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getEmergencyContactsByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.getEmergencyContactsByStaffId( + staffId: staffId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getEmergencyContactsByStaffId( + staffId: staffId, +); +getEmergencyContactsByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.getEmergencyContactsByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listFaqDatas +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listFaqDatas().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listFaqDatas(); +listFaqDatasData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listFaqDatas().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getFaqDataById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getFaqDataById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getFaqDataById( + id: id, +); +getFaqDataByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getFaqDataById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterFaqDatas +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterFaqDatas().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterFaqDatas, we created `filterFaqDatasBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterFaqDatasVariablesBuilder { + ... + + FilterFaqDatasVariablesBuilder category(String? t) { + _category.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterFaqDatas() +.category(category) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterFaqDatas(); +filterFaqDatasData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterFaqDatas().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffAvailabilityStats +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listStaffAvailabilityStats().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffAvailabilityStats, we created `listStaffAvailabilityStatsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffAvailabilityStatsVariablesBuilder { + ... + + ListStaffAvailabilityStatsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilityStatsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffAvailabilityStats() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffAvailabilityStats(); +listStaffAvailabilityStatsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listStaffAvailabilityStats().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffAvailabilityStatsByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.getStaffAvailabilityStatsByStaffId( + staffId: staffId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffAvailabilityStatsByStaffId( + staffId: staffId, +); +getStaffAvailabilityStatsByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.getStaffAvailabilityStatsByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterStaffAvailabilityStats +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterStaffAvailabilityStats().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterStaffAvailabilityStats, we created `filterStaffAvailabilityStatsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterStaffAvailabilityStatsVariablesBuilder { + ... + + FilterStaffAvailabilityStatsVariablesBuilder needWorkIndexMin(int? t) { + _needWorkIndexMin.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder needWorkIndexMax(int? t) { + _needWorkIndexMax.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder utilizationMin(int? t) { + _utilizationMin.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder utilizationMax(int? t) { + _utilizationMax.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder acceptanceRateMin(int? t) { + _acceptanceRateMin.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder acceptanceRateMax(int? t) { + _acceptanceRateMax.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder lastShiftAfter(Timestamp? t) { + _lastShiftAfter.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder lastShiftBefore(Timestamp? t) { + _lastShiftBefore.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterStaffAvailabilityStats() +.needWorkIndexMin(needWorkIndexMin) +.needWorkIndexMax(needWorkIndexMax) +.utilizationMin(utilizationMin) +.utilizationMax(utilizationMax) +.acceptanceRateMin(acceptanceRateMin) +.acceptanceRateMax(acceptanceRateMax) +.lastShiftAfter(lastShiftAfter) +.lastShiftBefore(lastShiftBefore) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterStaffAvailabilityStats(); +filterStaffAvailabilityStatsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterStaffAvailabilityStats().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listBusinesses +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listBusinesses().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listBusinesses(); +listBusinessesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listBusinesses().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getBusinessesByUserId +#### Required Arguments +```dart +String userId = ...; +ExampleConnector.instance.getBusinessesByUserId( + userId: userId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getBusinessesByUserId( + userId: userId, +); +getBusinessesByUserIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; + +final ref = ExampleConnector.instance.getBusinessesByUserId( + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getBusinessById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getBusinessById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getBusinessById( + id: id, +); +getBusinessByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getBusinessById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffCourseById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getStaffCourseById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffCourseById( + id: id, +); +getStaffCourseByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getStaffCourseById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffCoursesByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listStaffCoursesByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffCoursesByStaffId, we created `listStaffCoursesByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffCoursesByStaffIdVariablesBuilder { + ... + ListStaffCoursesByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffCoursesByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffCoursesByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffCoursesByStaffId( + staffId: staffId, +); +listStaffCoursesByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listStaffCoursesByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffCoursesByCourseId +#### Required Arguments +```dart +String courseId = ...; +ExampleConnector.instance.listStaffCoursesByCourseId( + courseId: courseId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffCoursesByCourseId, we created `listStaffCoursesByCourseIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffCoursesByCourseIdVariablesBuilder { + ... + ListStaffCoursesByCourseIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffCoursesByCourseIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffCoursesByCourseId( + courseId: courseId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffCoursesByCourseId( + courseId: courseId, +); +listStaffCoursesByCourseIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String courseId = ...; + +final ref = ExampleConnector.instance.listStaffCoursesByCourseId( + courseId: courseId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffCourseByStaffAndCourse +#### Required Arguments +```dart +String staffId = ...; +String courseId = ...; +ExampleConnector.instance.getStaffCourseByStaffAndCourse( + staffId: staffId, + courseId: courseId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffCourseByStaffAndCourse( + staffId: staffId, + courseId: courseId, +); +getStaffCourseByStaffAndCourseData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String courseId = ...; + +final ref = ExampleConnector.instance.getStaffCourseByStaffAndCourse( + staffId: staffId, + courseId: courseId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTasks +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listTasks().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTasks(); +listTasksData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listTasks().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTaskById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getTaskById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTaskById( + id: id, +); +getTaskByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getTaskById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTasksByOwnerId +#### Required Arguments +```dart +String ownerId = ...; +ExampleConnector.instance.getTasksByOwnerId( + ownerId: ownerId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTasksByOwnerId( + ownerId: ownerId, +); +getTasksByOwnerIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ownerId = ...; + +final ref = ExampleConnector.instance.getTasksByOwnerId( + ownerId: ownerId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterTasks +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterTasks().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterTasks, we created `filterTasksBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterTasksVariablesBuilder { + ... + + FilterTasksVariablesBuilder status(TaskStatus? t) { + _status.value = t; + return this; + } + FilterTasksVariablesBuilder priority(TaskPriority? t) { + _priority.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterTasks() +.status(status) +.priority(priority) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterTasks(); +filterTasksData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterTasks().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listAssignments +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listAssignments().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listAssignments, we created `listAssignmentsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListAssignmentsVariablesBuilder { + ... + + ListAssignmentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listAssignments() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listAssignments(); +listAssignmentsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listAssignments().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getAssignmentById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getAssignmentById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getAssignmentById( + id: id, +); +getAssignmentByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getAssignmentById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listAssignmentsByWorkforceId +#### Required Arguments +```dart +String workforceId = ...; +ExampleConnector.instance.listAssignmentsByWorkforceId( + workforceId: workforceId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listAssignmentsByWorkforceId, we created `listAssignmentsByWorkforceIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListAssignmentsByWorkforceIdVariablesBuilder { + ... + ListAssignmentsByWorkforceIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsByWorkforceIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listAssignmentsByWorkforceId( + workforceId: workforceId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listAssignmentsByWorkforceId( + workforceId: workforceId, +); +listAssignmentsByWorkforceIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String workforceId = ...; + +final ref = ExampleConnector.instance.listAssignmentsByWorkforceId( + workforceId: workforceId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listAssignmentsByWorkforceIds +#### Required Arguments +```dart +String workforceIds = ...; +ExampleConnector.instance.listAssignmentsByWorkforceIds( + workforceIds: workforceIds, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listAssignmentsByWorkforceIds, we created `listAssignmentsByWorkforceIdsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListAssignmentsByWorkforceIdsVariablesBuilder { + ... + ListAssignmentsByWorkforceIdsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsByWorkforceIdsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listAssignmentsByWorkforceIds( + workforceIds: workforceIds, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listAssignmentsByWorkforceIds( + workforceIds: workforceIds, +); +listAssignmentsByWorkforceIdsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String workforceIds = ...; + +final ref = ExampleConnector.instance.listAssignmentsByWorkforceIds( + workforceIds: workforceIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listAssignmentsByShiftRole +#### Required Arguments +```dart +String shiftId = ...; +String roleId = ...; +ExampleConnector.instance.listAssignmentsByShiftRole( + shiftId: shiftId, + roleId: roleId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listAssignmentsByShiftRole, we created `listAssignmentsByShiftRoleBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListAssignmentsByShiftRoleVariablesBuilder { + ... + ListAssignmentsByShiftRoleVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsByShiftRoleVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listAssignmentsByShiftRole( + shiftId: shiftId, + roleId: roleId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listAssignmentsByShiftRole( + shiftId: shiftId, + roleId: roleId, +); +listAssignmentsByShiftRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.listAssignmentsByShiftRole( + shiftId: shiftId, + roleId: roleId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterAssignments +#### Required Arguments +```dart +String shiftIds = ...; +String roleIds = ...; +ExampleConnector.instance.filterAssignments( + shiftIds: shiftIds, + roleIds: roleIds, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterAssignments, we created `filterAssignmentsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterAssignmentsVariablesBuilder { + ... + FilterAssignmentsVariablesBuilder status(AssignmentStatus? t) { + _status.value = t; + return this; + } + FilterAssignmentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterAssignmentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterAssignments( + shiftIds: shiftIds, + roleIds: roleIds, +) +.status(status) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterAssignments( + shiftIds: shiftIds, + roleIds: roleIds, +); +filterAssignmentsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftIds = ...; +String roleIds = ...; + +final ref = ExampleConnector.instance.filterAssignments( + shiftIds: shiftIds, + roleIds: roleIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoices +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listInvoices().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoices, we created `listInvoicesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoicesVariablesBuilder { + ... + + ListInvoicesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoices() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoices(); +listInvoicesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listInvoices().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getInvoiceById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getInvoiceById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getInvoiceById( + id: id, +); +getInvoiceByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getInvoiceById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoicesByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listInvoicesByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoicesByVendorId, we created `listInvoicesByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoicesByVendorIdVariablesBuilder { + ... + ListInvoicesByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoicesByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoicesByVendorId( + vendorId: vendorId, +); +listInvoicesByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listInvoicesByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoicesByBusinessId +#### Required Arguments +```dart +String businessId = ...; +ExampleConnector.instance.listInvoicesByBusinessId( + businessId: businessId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoicesByBusinessId, we created `listInvoicesByBusinessIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoicesByBusinessIdVariablesBuilder { + ... + ListInvoicesByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoicesByBusinessId( + businessId: businessId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoicesByBusinessId( + businessId: businessId, +); +listInvoicesByBusinessIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; + +final ref = ExampleConnector.instance.listInvoicesByBusinessId( + businessId: businessId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoicesByOrderId +#### Required Arguments +```dart +String orderId = ...; +ExampleConnector.instance.listInvoicesByOrderId( + orderId: orderId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoicesByOrderId, we created `listInvoicesByOrderIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoicesByOrderIdVariablesBuilder { + ... + ListInvoicesByOrderIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByOrderIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoicesByOrderId( + orderId: orderId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoicesByOrderId( + orderId: orderId, +); +listInvoicesByOrderIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String orderId = ...; + +final ref = ExampleConnector.instance.listInvoicesByOrderId( + orderId: orderId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoicesByStatus +#### Required Arguments +```dart +InvoiceStatus status = ...; +ExampleConnector.instance.listInvoicesByStatus( + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoicesByStatus, we created `listInvoicesByStatusBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoicesByStatusVariablesBuilder { + ... + ListInvoicesByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoicesByStatus( + status: status, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoicesByStatus( + status: status, +); +listInvoicesByStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +InvoiceStatus status = ...; + +final ref = ExampleConnector.instance.listInvoicesByStatus( + status: status, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterInvoices +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterInvoices().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterInvoices, we created `filterInvoicesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterInvoicesVariablesBuilder { + ... + + FilterInvoicesVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + FilterInvoicesVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + FilterInvoicesVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + FilterInvoicesVariablesBuilder status(InvoiceStatus? t) { + _status.value = t; + return this; + } + FilterInvoicesVariablesBuilder issueDateFrom(Timestamp? t) { + _issueDateFrom.value = t; + return this; + } + FilterInvoicesVariablesBuilder issueDateTo(Timestamp? t) { + _issueDateTo.value = t; + return this; + } + FilterInvoicesVariablesBuilder dueDateFrom(Timestamp? t) { + _dueDateFrom.value = t; + return this; + } + FilterInvoicesVariablesBuilder dueDateTo(Timestamp? t) { + _dueDateTo.value = t; + return this; + } + FilterInvoicesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterInvoicesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterInvoices() +.vendorId(vendorId) +.businessId(businessId) +.orderId(orderId) +.status(status) +.issueDateFrom(issueDateFrom) +.issueDateTo(issueDateTo) +.dueDateFrom(dueDateFrom) +.dueDateTo(dueDateTo) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterInvoices(); +filterInvoicesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterInvoices().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listOverdueInvoices +#### Required Arguments +```dart +Timestamp now = ...; +ExampleConnector.instance.listOverdueInvoices( + now: now, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listOverdueInvoices, we created `listOverdueInvoicesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListOverdueInvoicesVariablesBuilder { + ... + ListOverdueInvoicesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListOverdueInvoicesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listOverdueInvoices( + now: now, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listOverdueInvoices( + now: now, +); +listOverdueInvoicesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +Timestamp now = ...; + +final ref = ExampleConnector.instance.listOverdueInvoices( + now: now, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTaskComments +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listTaskComments().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTaskComments(); +listTaskCommentsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listTaskComments().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTaskCommentById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getTaskCommentById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTaskCommentById( + id: id, +); +getTaskCommentByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getTaskCommentById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTaskCommentsByTaskId +#### Required Arguments +```dart +String taskId = ...; +ExampleConnector.instance.getTaskCommentsByTaskId( + taskId: taskId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTaskCommentsByTaskId( + taskId: taskId, +); +getTaskCommentsByTaskIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String taskId = ...; + +final ref = ExampleConnector.instance.getTaskCommentsByTaskId( + taskId: taskId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listVendorRates +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listVendorRates().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listVendorRates(); +listVendorRatesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listVendorRates().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getVendorRateById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getVendorRateById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getVendorRateById( + id: id, +); +getVendorRateByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getVendorRateById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listApplications +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listApplications().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listApplications(); +listApplicationsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listApplications().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getApplicationById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getApplicationById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getApplicationById( + id: id, +); +getApplicationByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getApplicationById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getApplicationsByShiftId +#### Required Arguments +```dart +String shiftId = ...; +ExampleConnector.instance.getApplicationsByShiftId( + shiftId: shiftId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getApplicationsByShiftId( + shiftId: shiftId, +); +getApplicationsByShiftIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; + +final ref = ExampleConnector.instance.getApplicationsByShiftId( + shiftId: shiftId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getApplicationsByShiftIdAndStatus +#### Required Arguments +```dart +String shiftId = ...; +ApplicationStatus status = ...; +ExampleConnector.instance.getApplicationsByShiftIdAndStatus( + shiftId: shiftId, + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getApplicationsByShiftIdAndStatus, we created `getApplicationsByShiftIdAndStatusBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetApplicationsByShiftIdAndStatusVariablesBuilder { + ... + GetApplicationsByShiftIdAndStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetApplicationsByShiftIdAndStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getApplicationsByShiftIdAndStatus( + shiftId: shiftId, + status: status, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getApplicationsByShiftIdAndStatus( + shiftId: shiftId, + status: status, +); +getApplicationsByShiftIdAndStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +ApplicationStatus status = ...; + +final ref = ExampleConnector.instance.getApplicationsByShiftIdAndStatus( + shiftId: shiftId, + status: status, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getApplicationsByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.getApplicationsByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getApplicationsByStaffId, we created `getApplicationsByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetApplicationsByStaffIdVariablesBuilder { + ... + GetApplicationsByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetApplicationsByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getApplicationsByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getApplicationsByStaffId( + staffId: staffId, +); +getApplicationsByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.getApplicationsByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoiceTemplates +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listInvoiceTemplates().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoiceTemplates, we created `listInvoiceTemplatesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoiceTemplatesVariablesBuilder { + ... + + ListInvoiceTemplatesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoiceTemplates() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoiceTemplates(); +listInvoiceTemplatesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listInvoiceTemplates().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getInvoiceTemplateById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getInvoiceTemplateById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getInvoiceTemplateById( + id: id, +); +getInvoiceTemplateByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getInvoiceTemplateById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoiceTemplatesByOwnerId +#### Required Arguments +```dart +String ownerId = ...; +ExampleConnector.instance.listInvoiceTemplatesByOwnerId( + ownerId: ownerId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoiceTemplatesByOwnerId, we created `listInvoiceTemplatesByOwnerIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoiceTemplatesByOwnerIdVariablesBuilder { + ... + ListInvoiceTemplatesByOwnerIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByOwnerIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoiceTemplatesByOwnerId( + ownerId: ownerId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoiceTemplatesByOwnerId( + ownerId: ownerId, +); +listInvoiceTemplatesByOwnerIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ownerId = ...; + +final ref = ExampleConnector.instance.listInvoiceTemplatesByOwnerId( + ownerId: ownerId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoiceTemplatesByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listInvoiceTemplatesByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoiceTemplatesByVendorId, we created `listInvoiceTemplatesByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoiceTemplatesByVendorIdVariablesBuilder { + ... + ListInvoiceTemplatesByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoiceTemplatesByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoiceTemplatesByVendorId( + vendorId: vendorId, +); +listInvoiceTemplatesByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listInvoiceTemplatesByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoiceTemplatesByBusinessId +#### Required Arguments +```dart +String businessId = ...; +ExampleConnector.instance.listInvoiceTemplatesByBusinessId( + businessId: businessId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoiceTemplatesByBusinessId, we created `listInvoiceTemplatesByBusinessIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoiceTemplatesByBusinessIdVariablesBuilder { + ... + ListInvoiceTemplatesByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoiceTemplatesByBusinessId( + businessId: businessId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoiceTemplatesByBusinessId( + businessId: businessId, +); +listInvoiceTemplatesByBusinessIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; + +final ref = ExampleConnector.instance.listInvoiceTemplatesByBusinessId( + businessId: businessId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoiceTemplatesByOrderId +#### Required Arguments +```dart +String orderId = ...; +ExampleConnector.instance.listInvoiceTemplatesByOrderId( + orderId: orderId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listInvoiceTemplatesByOrderId, we created `listInvoiceTemplatesByOrderIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListInvoiceTemplatesByOrderIdVariablesBuilder { + ... + ListInvoiceTemplatesByOrderIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByOrderIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listInvoiceTemplatesByOrderId( + orderId: orderId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoiceTemplatesByOrderId( + orderId: orderId, +); +listInvoiceTemplatesByOrderIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String orderId = ...; + +final ref = ExampleConnector.instance.listInvoiceTemplatesByOrderId( + orderId: orderId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### searchInvoiceTemplatesByOwnerAndName +#### Required Arguments +```dart +String ownerId = ...; +String name = ...; +ExampleConnector.instance.searchInvoiceTemplatesByOwnerAndName( + ownerId: ownerId, + name: name, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For searchInvoiceTemplatesByOwnerAndName, we created `searchInvoiceTemplatesByOwnerAndNameBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder { + ... + SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.searchInvoiceTemplatesByOwnerAndName( + ownerId: ownerId, + name: name, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.searchInvoiceTemplatesByOwnerAndName( + ownerId: ownerId, + name: name, +); +searchInvoiceTemplatesByOwnerAndNameData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ownerId = ...; +String name = ...; + +final ref = ExampleConnector.instance.searchInvoiceTemplatesByOwnerAndName( + ownerId: ownerId, + name: name, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRoles +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listRoles().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRoles(); +listRolesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listRoles().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getRoleById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getRoleById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getRoleById( + id: id, +); +getRoleByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getRoleById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRolesByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listRolesByVendorId( + vendorId: vendorId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRolesByVendorId( + vendorId: vendorId, +); +listRolesByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listRolesByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRolesByroleCategoryId +#### Required Arguments +```dart +String roleCategoryId = ...; +ExampleConnector.instance.listRolesByroleCategoryId( + roleCategoryId: roleCategoryId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRolesByroleCategoryId( + roleCategoryId: roleCategoryId, +); +listRolesByroleCategoryIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String roleCategoryId = ...; + +final ref = ExampleConnector.instance.listRolesByroleCategoryId( + roleCategoryId: roleCategoryId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaff +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listStaff().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaff(); +listStaffData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listStaff().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getStaffById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffById( + id: id, +); +getStaffByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getStaffById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffByUserId +#### Required Arguments +```dart +String userId = ...; +ExampleConnector.instance.getStaffByUserId( + userId: userId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffByUserId( + userId: userId, +); +getStaffByUserIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; + +final ref = ExampleConnector.instance.getStaffByUserId( + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterStaff +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterStaff().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterStaff, we created `filterStaffBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterStaffVariablesBuilder { + ... + + FilterStaffVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + FilterStaffVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + FilterStaffVariablesBuilder level(String? t) { + _level.value = t; + return this; + } + FilterStaffVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterStaff() +.ownerId(ownerId) +.fullName(fullName) +.level(level) +.email(email) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterStaff(); +filterStaffData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterStaff().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listUserConversations +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listUserConversations().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listUserConversations, we created `listUserConversationsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListUserConversationsVariablesBuilder { + ... + + ListUserConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUserConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listUserConversations() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listUserConversations(); +listUserConversationsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listUserConversations().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getUserConversationByKey +#### Required Arguments +```dart +String conversationId = ...; +String userId = ...; +ExampleConnector.instance.getUserConversationByKey( + conversationId: conversationId, + userId: userId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getUserConversationByKey( + conversationId: conversationId, + userId: userId, +); +getUserConversationByKeyData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; +String userId = ...; + +final ref = ExampleConnector.instance.getUserConversationByKey( + conversationId: conversationId, + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listUserConversationsByUserId +#### Required Arguments +```dart +String userId = ...; +ExampleConnector.instance.listUserConversationsByUserId( + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listUserConversationsByUserId, we created `listUserConversationsByUserIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListUserConversationsByUserIdVariablesBuilder { + ... + ListUserConversationsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUserConversationsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listUserConversationsByUserId( + userId: userId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listUserConversationsByUserId( + userId: userId, +); +listUserConversationsByUserIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; + +final ref = ExampleConnector.instance.listUserConversationsByUserId( + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listUnreadUserConversationsByUserId +#### Required Arguments +```dart +String userId = ...; +ExampleConnector.instance.listUnreadUserConversationsByUserId( + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listUnreadUserConversationsByUserId, we created `listUnreadUserConversationsByUserIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListUnreadUserConversationsByUserIdVariablesBuilder { + ... + ListUnreadUserConversationsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUnreadUserConversationsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listUnreadUserConversationsByUserId( + userId: userId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listUnreadUserConversationsByUserId( + userId: userId, +); +listUnreadUserConversationsByUserIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; + +final ref = ExampleConnector.instance.listUnreadUserConversationsByUserId( + userId: userId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listUserConversationsByConversationId +#### Required Arguments +```dart +String conversationId = ...; +ExampleConnector.instance.listUserConversationsByConversationId( + conversationId: conversationId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listUserConversationsByConversationId, we created `listUserConversationsByConversationIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListUserConversationsByConversationIdVariablesBuilder { + ... + ListUserConversationsByConversationIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUserConversationsByConversationIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listUserConversationsByConversationId( + conversationId: conversationId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listUserConversationsByConversationId( + conversationId: conversationId, +); +listUserConversationsByConversationIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; + +final ref = ExampleConnector.instance.listUserConversationsByConversationId( + conversationId: conversationId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterUserConversations +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterUserConversations().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterUserConversations, we created `filterUserConversationsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterUserConversationsVariablesBuilder { + ... + + FilterUserConversationsVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + FilterUserConversationsVariablesBuilder conversationId(String? t) { + _conversationId.value = t; + return this; + } + FilterUserConversationsVariablesBuilder unreadMin(int? t) { + _unreadMin.value = t; + return this; + } + FilterUserConversationsVariablesBuilder unreadMax(int? t) { + _unreadMax.value = t; + return this; + } + FilterUserConversationsVariablesBuilder lastReadAfter(Timestamp? t) { + _lastReadAfter.value = t; + return this; + } + FilterUserConversationsVariablesBuilder lastReadBefore(Timestamp? t) { + _lastReadBefore.value = t; + return this; + } + FilterUserConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterUserConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterUserConversations() +.userId(userId) +.conversationId(conversationId) +.unreadMin(unreadMin) +.unreadMax(unreadMax) +.lastReadAfter(lastReadAfter) +.lastReadBefore(lastReadBefore) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterUserConversations(); +filterUserConversationsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterUserConversations().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listCertificates +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listCertificates().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listCertificates(); +listCertificatesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listCertificates().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getCertificateById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getCertificateById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getCertificateById( + id: id, +); +getCertificateByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getCertificateById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listCertificatesByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listCertificatesByStaffId( + staffId: staffId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listCertificatesByStaffId( + staffId: staffId, +); +listCertificatesByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listCertificatesByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getMyTasks +#### Required Arguments +```dart +String teamMemberId = ...; +ExampleConnector.instance.getMyTasks( + teamMemberId: teamMemberId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getMyTasks( + teamMemberId: teamMemberId, +); +getMyTasksData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamMemberId = ...; + +final ref = ExampleConnector.instance.getMyTasks( + teamMemberId: teamMemberId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getMemberTaskByIdKey +#### Required Arguments +```dart +String teamMemberId = ...; +String taskId = ...; +ExampleConnector.instance.getMemberTaskByIdKey( + teamMemberId: teamMemberId, + taskId: taskId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getMemberTaskByIdKey( + teamMemberId: teamMemberId, + taskId: taskId, +); +getMemberTaskByIdKeyData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamMemberId = ...; +String taskId = ...; + +final ref = ExampleConnector.instance.getMemberTaskByIdKey( + teamMemberId: teamMemberId, + taskId: taskId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getMemberTasksByTaskId +#### Required Arguments +```dart +String taskId = ...; +ExampleConnector.instance.getMemberTasksByTaskId( + taskId: taskId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getMemberTasksByTaskId( + taskId: taskId, +); +getMemberTasksByTaskIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String taskId = ...; + +final ref = ExampleConnector.instance.getMemberTasksByTaskId( + taskId: taskId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRecentPayments +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listRecentPayments().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listRecentPayments, we created `listRecentPaymentsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListRecentPaymentsVariablesBuilder { + ... + + ListRecentPaymentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listRecentPayments() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRecentPayments(); +listRecentPaymentsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listRecentPayments().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getRecentPaymentById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getRecentPaymentById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getRecentPaymentById( + id: id, +); +getRecentPaymentByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getRecentPaymentById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRecentPaymentsByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listRecentPaymentsByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listRecentPaymentsByStaffId, we created `listRecentPaymentsByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListRecentPaymentsByStaffIdVariablesBuilder { + ... + ListRecentPaymentsByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listRecentPaymentsByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRecentPaymentsByStaffId( + staffId: staffId, +); +listRecentPaymentsByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listRecentPaymentsByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRecentPaymentsByApplicationId +#### Required Arguments +```dart +String applicationId = ...; +ExampleConnector.instance.listRecentPaymentsByApplicationId( + applicationId: applicationId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listRecentPaymentsByApplicationId, we created `listRecentPaymentsByApplicationIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListRecentPaymentsByApplicationIdVariablesBuilder { + ... + ListRecentPaymentsByApplicationIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByApplicationIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listRecentPaymentsByApplicationId( + applicationId: applicationId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRecentPaymentsByApplicationId( + applicationId: applicationId, +); +listRecentPaymentsByApplicationIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String applicationId = ...; + +final ref = ExampleConnector.instance.listRecentPaymentsByApplicationId( + applicationId: applicationId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRecentPaymentsByInvoiceId +#### Required Arguments +```dart +String invoiceId = ...; +ExampleConnector.instance.listRecentPaymentsByInvoiceId( + invoiceId: invoiceId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listRecentPaymentsByInvoiceId, we created `listRecentPaymentsByInvoiceIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListRecentPaymentsByInvoiceIdVariablesBuilder { + ... + ListRecentPaymentsByInvoiceIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByInvoiceIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listRecentPaymentsByInvoiceId( + invoiceId: invoiceId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRecentPaymentsByInvoiceId( + invoiceId: invoiceId, +); +listRecentPaymentsByInvoiceIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String invoiceId = ...; + +final ref = ExampleConnector.instance.listRecentPaymentsByInvoiceId( + invoiceId: invoiceId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRecentPaymentsByStatus +#### Required Arguments +```dart +RecentPaymentStatus status = ...; +ExampleConnector.instance.listRecentPaymentsByStatus( + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listRecentPaymentsByStatus, we created `listRecentPaymentsByStatusBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListRecentPaymentsByStatusVariablesBuilder { + ... + ListRecentPaymentsByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listRecentPaymentsByStatus( + status: status, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRecentPaymentsByStatus( + status: status, +); +listRecentPaymentsByStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +RecentPaymentStatus status = ...; + +final ref = ExampleConnector.instance.listRecentPaymentsByStatus( + status: status, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRecentPaymentsByInvoiceIds +#### Required Arguments +```dart +String invoiceIds = ...; +ExampleConnector.instance.listRecentPaymentsByInvoiceIds( + invoiceIds: invoiceIds, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listRecentPaymentsByInvoiceIds, we created `listRecentPaymentsByInvoiceIdsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListRecentPaymentsByInvoiceIdsVariablesBuilder { + ... + ListRecentPaymentsByInvoiceIdsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByInvoiceIdsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listRecentPaymentsByInvoiceIds( + invoiceIds: invoiceIds, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRecentPaymentsByInvoiceIds( + invoiceIds: invoiceIds, +); +listRecentPaymentsByInvoiceIdsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String invoiceIds = ...; + +final ref = ExampleConnector.instance.listRecentPaymentsByInvoiceIds( + invoiceIds: invoiceIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRecentPaymentsByBusinessId +#### Required Arguments +```dart +String businessId = ...; +ExampleConnector.instance.listRecentPaymentsByBusinessId( + businessId: businessId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listRecentPaymentsByBusinessId, we created `listRecentPaymentsByBusinessIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListRecentPaymentsByBusinessIdVariablesBuilder { + ... + ListRecentPaymentsByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listRecentPaymentsByBusinessId( + businessId: businessId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRecentPaymentsByBusinessId( + businessId: businessId, +); +listRecentPaymentsByBusinessIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; + +final ref = ExampleConnector.instance.listRecentPaymentsByBusinessId( + businessId: businessId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listRoleCategories +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listRoleCategories().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listRoleCategories(); +listRoleCategoriesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listRoleCategories().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getRoleCategoryById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getRoleCategoryById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getRoleCategoryById( + id: id, +); +getRoleCategoryByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getRoleCategoryById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getRoleCategoriesByCategory +#### Required Arguments +```dart +RoleCategoryType category = ...; +ExampleConnector.instance.getRoleCategoriesByCategory( + category: category, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getRoleCategoriesByCategory( + category: category, +); +getRoleCategoriesByCategoryData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +RoleCategoryType category = ...; + +final ref = ExampleConnector.instance.getRoleCategoriesByCategory( + category: category, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listUsers +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listUsers().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listUsers(); +listUsersData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listUsers().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getUserById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getUserById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getUserById( + id: id, +); +getUserByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getUserById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterUsers +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterUsers().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterUsers, we created `filterUsersBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterUsersVariablesBuilder { + ... + + FilterUsersVariablesBuilder id(String? t) { + _id.value = t; + return this; + } + FilterUsersVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + FilterUsersVariablesBuilder role(UserBaseRole? t) { + _role.value = t; + return this; + } + FilterUsersVariablesBuilder userRole(String? t) { + _userRole.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterUsers() +.id(id) +.email(email) +.role(role) +.userRole(userRole) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterUsers(); +filterUsersData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterUsers().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listClientFeedbacks +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listClientFeedbacks().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listClientFeedbacks, we created `listClientFeedbacksBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListClientFeedbacksVariablesBuilder { + ... + + ListClientFeedbacksVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listClientFeedbacks() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listClientFeedbacks(); +listClientFeedbacksData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listClientFeedbacks().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getClientFeedbackById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getClientFeedbackById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getClientFeedbackById( + id: id, +); +getClientFeedbackByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getClientFeedbackById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listClientFeedbacksByBusinessId +#### Required Arguments +```dart +String businessId = ...; +ExampleConnector.instance.listClientFeedbacksByBusinessId( + businessId: businessId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listClientFeedbacksByBusinessId, we created `listClientFeedbacksByBusinessIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListClientFeedbacksByBusinessIdVariablesBuilder { + ... + ListClientFeedbacksByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listClientFeedbacksByBusinessId( + businessId: businessId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listClientFeedbacksByBusinessId( + businessId: businessId, +); +listClientFeedbacksByBusinessIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; + +final ref = ExampleConnector.instance.listClientFeedbacksByBusinessId( + businessId: businessId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listClientFeedbacksByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listClientFeedbacksByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listClientFeedbacksByVendorId, we created `listClientFeedbacksByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListClientFeedbacksByVendorIdVariablesBuilder { + ... + ListClientFeedbacksByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listClientFeedbacksByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listClientFeedbacksByVendorId( + vendorId: vendorId, +); +listClientFeedbacksByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listClientFeedbacksByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listClientFeedbacksByBusinessAndVendor +#### Required Arguments +```dart +String businessId = ...; +String vendorId = ...; +ExampleConnector.instance.listClientFeedbacksByBusinessAndVendor( + businessId: businessId, + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listClientFeedbacksByBusinessAndVendor, we created `listClientFeedbacksByBusinessAndVendorBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListClientFeedbacksByBusinessAndVendorVariablesBuilder { + ... + ListClientFeedbacksByBusinessAndVendorVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksByBusinessAndVendorVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listClientFeedbacksByBusinessAndVendor( + businessId: businessId, + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listClientFeedbacksByBusinessAndVendor( + businessId: businessId, + vendorId: vendorId, +); +listClientFeedbacksByBusinessAndVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +String vendorId = ...; + +final ref = ExampleConnector.instance.listClientFeedbacksByBusinessAndVendor( + businessId: businessId, + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterClientFeedbacks +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterClientFeedbacks().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterClientFeedbacks, we created `filterClientFeedbacksBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterClientFeedbacksVariablesBuilder { + ... + + FilterClientFeedbacksVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder ratingMin(int? t) { + _ratingMin.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder ratingMax(int? t) { + _ratingMax.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterClientFeedbacks() +.businessId(businessId) +.vendorId(vendorId) +.ratingMin(ratingMin) +.ratingMax(ratingMax) +.dateFrom(dateFrom) +.dateTo(dateTo) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterClientFeedbacks(); +filterClientFeedbacksData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterClientFeedbacks().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listClientFeedbackRatingsByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listClientFeedbackRatingsByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listClientFeedbackRatingsByVendorId, we created `listClientFeedbackRatingsByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListClientFeedbackRatingsByVendorIdVariablesBuilder { + ... + ListClientFeedbackRatingsByVendorIdVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + ListClientFeedbackRatingsByVendorIdVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listClientFeedbackRatingsByVendorId( + vendorId: vendorId, +) +.dateFrom(dateFrom) +.dateTo(dateTo) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listClientFeedbackRatingsByVendorId( + vendorId: vendorId, +); +listClientFeedbackRatingsByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listClientFeedbackRatingsByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffRoles +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listStaffRoles().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffRoles, we created `listStaffRolesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffRolesVariablesBuilder { + ... + + ListStaffRolesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffRolesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffRoles() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffRoles(); +listStaffRolesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listStaffRoles().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffRoleByKey +#### Required Arguments +```dart +String staffId = ...; +String roleId = ...; +ExampleConnector.instance.getStaffRoleByKey( + staffId: staffId, + roleId: roleId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffRoleByKey( + staffId: staffId, + roleId: roleId, +); +getStaffRoleByKeyData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.getStaffRoleByKey( + staffId: staffId, + roleId: roleId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffRolesByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listStaffRolesByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffRolesByStaffId, we created `listStaffRolesByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffRolesByStaffIdVariablesBuilder { + ... + ListStaffRolesByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffRolesByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffRolesByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffRolesByStaffId( + staffId: staffId, +); +listStaffRolesByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listStaffRolesByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffRolesByRoleId +#### Required Arguments +```dart +String roleId = ...; +ExampleConnector.instance.listStaffRolesByRoleId( + roleId: roleId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffRolesByRoleId, we created `listStaffRolesByRoleIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffRolesByRoleIdVariablesBuilder { + ... + ListStaffRolesByRoleIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffRolesByRoleIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffRolesByRoleId( + roleId: roleId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffRolesByRoleId( + roleId: roleId, +); +listStaffRolesByRoleIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String roleId = ...; + +final ref = ExampleConnector.instance.listStaffRolesByRoleId( + roleId: roleId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterStaffRoles +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterStaffRoles().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterStaffRoles, we created `filterStaffRolesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterStaffRolesVariablesBuilder { + ... + + FilterStaffRolesVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + FilterStaffRolesVariablesBuilder roleId(String? t) { + _roleId.value = t; + return this; + } + FilterStaffRolesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterStaffRolesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterStaffRoles() +.staffId(staffId) +.roleId(roleId) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterStaffRoles(); +filterStaffRolesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterStaffRoles().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listAccounts +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listAccounts().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listAccounts(); +listAccountsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listAccounts().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getAccountById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getAccountById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getAccountById( + id: id, +); +getAccountByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getAccountById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getAccountsByOwnerId +#### Required Arguments +```dart +String ownerId = ...; +ExampleConnector.instance.getAccountsByOwnerId( + ownerId: ownerId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getAccountsByOwnerId( + ownerId: ownerId, +); +getAccountsByOwnerIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ownerId = ...; + +final ref = ExampleConnector.instance.getAccountsByOwnerId( + ownerId: ownerId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterAccounts +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterAccounts().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterAccounts, we created `filterAccountsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterAccountsVariablesBuilder { + ... + + FilterAccountsVariablesBuilder bank(String? t) { + _bank.value = t; + return this; + } + FilterAccountsVariablesBuilder type(AccountType? t) { + _type.value = t; + return this; + } + FilterAccountsVariablesBuilder isPrimary(bool? t) { + _isPrimary.value = t; + return this; + } + FilterAccountsVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterAccounts() +.bank(bank) +.type(type) +.isPrimary(isPrimary) +.ownerId(ownerId) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterAccounts(); +filterAccountsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterAccounts().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listOrders +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listOrders().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listOrders, we created `listOrdersBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListOrdersVariablesBuilder { + ... + + ListOrdersVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListOrdersVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listOrders() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listOrders(); +listOrdersData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listOrders().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getOrderById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getOrderById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getOrderById( + id: id, +); +getOrderByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getOrderById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getOrdersByBusinessId +#### Required Arguments +```dart +String businessId = ...; +ExampleConnector.instance.getOrdersByBusinessId( + businessId: businessId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getOrdersByBusinessId, we created `getOrdersByBusinessIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetOrdersByBusinessIdVariablesBuilder { + ... + GetOrdersByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getOrdersByBusinessId( + businessId: businessId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getOrdersByBusinessId( + businessId: businessId, +); +getOrdersByBusinessIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; + +final ref = ExampleConnector.instance.getOrdersByBusinessId( + businessId: businessId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getOrdersByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.getOrdersByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getOrdersByVendorId, we created `getOrdersByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetOrdersByVendorIdVariablesBuilder { + ... + GetOrdersByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getOrdersByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getOrdersByVendorId( + vendorId: vendorId, +); +getOrdersByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.getOrdersByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getOrdersByStatus +#### Required Arguments +```dart +OrderStatus status = ...; +ExampleConnector.instance.getOrdersByStatus( + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getOrdersByStatus, we created `getOrdersByStatusBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetOrdersByStatusVariablesBuilder { + ... + GetOrdersByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getOrdersByStatus( + status: status, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getOrdersByStatus( + status: status, +); +getOrdersByStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +OrderStatus status = ...; + +final ref = ExampleConnector.instance.getOrdersByStatus( + status: status, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getOrdersByDateRange +#### Required Arguments +```dart +Timestamp start = ...; +Timestamp end = ...; +ExampleConnector.instance.getOrdersByDateRange( + start: start, + end: end, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getOrdersByDateRange, we created `getOrdersByDateRangeBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetOrdersByDateRangeVariablesBuilder { + ... + GetOrdersByDateRangeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByDateRangeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getOrdersByDateRange( + start: start, + end: end, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getOrdersByDateRange( + start: start, + end: end, +); +getOrdersByDateRangeData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +Timestamp start = ...; +Timestamp end = ...; + +final ref = ExampleConnector.instance.getOrdersByDateRange( + start: start, + end: end, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getRapidOrders +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.getRapidOrders().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For getRapidOrders, we created `getRapidOrdersBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class GetRapidOrdersVariablesBuilder { + ... + + GetRapidOrdersVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetRapidOrdersVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.getRapidOrders() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getRapidOrders(); +getRapidOrdersData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.getRapidOrders().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForCoverage +#### Required Arguments +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listShiftsForCoverage( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForCoverage( + businessId: businessId, + startDate: startDate, + endDate: endDate, +); +listShiftsForCoverageData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listShiftsForCoverage( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listApplicationsForCoverage +#### Required Arguments +```dart +String shiftIds = ...; +ExampleConnector.instance.listApplicationsForCoverage( + shiftIds: shiftIds, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listApplicationsForCoverage( + shiftIds: shiftIds, +); +listApplicationsForCoverageData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftIds = ...; + +final ref = ExampleConnector.instance.listApplicationsForCoverage( + shiftIds: shiftIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForDailyOpsByBusiness +#### Required Arguments +```dart +String businessId = ...; +Timestamp date = ...; +ExampleConnector.instance.listShiftsForDailyOpsByBusiness( + businessId: businessId, + date: date, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForDailyOpsByBusiness( + businessId: businessId, + date: date, +); +listShiftsForDailyOpsByBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +Timestamp date = ...; + +final ref = ExampleConnector.instance.listShiftsForDailyOpsByBusiness( + businessId: businessId, + date: date, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForDailyOpsByVendor +#### Required Arguments +```dart +String vendorId = ...; +Timestamp date = ...; +ExampleConnector.instance.listShiftsForDailyOpsByVendor( + vendorId: vendorId, + date: date, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForDailyOpsByVendor( + vendorId: vendorId, + date: date, +); +listShiftsForDailyOpsByVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +Timestamp date = ...; + +final ref = ExampleConnector.instance.listShiftsForDailyOpsByVendor( + vendorId: vendorId, + date: date, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listApplicationsForDailyOps +#### Required Arguments +```dart +String shiftIds = ...; +ExampleConnector.instance.listApplicationsForDailyOps( + shiftIds: shiftIds, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listApplicationsForDailyOps( + shiftIds: shiftIds, +); +listApplicationsForDailyOpsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftIds = ...; + +final ref = ExampleConnector.instance.listApplicationsForDailyOps( + shiftIds: shiftIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForForecastByBusiness +#### Required Arguments +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listShiftsForForecastByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForForecastByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +); +listShiftsForForecastByBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listShiftsForForecastByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForForecastByVendor +#### Required Arguments +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listShiftsForForecastByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForForecastByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +); +listShiftsForForecastByVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listShiftsForForecastByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForNoShowRangeByBusiness +#### Required Arguments +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listShiftsForNoShowRangeByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForNoShowRangeByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +); +listShiftsForNoShowRangeByBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listShiftsForNoShowRangeByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForNoShowRangeByVendor +#### Required Arguments +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listShiftsForNoShowRangeByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForNoShowRangeByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +); +listShiftsForNoShowRangeByVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listShiftsForNoShowRangeByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listApplicationsForNoShowRange +#### Required Arguments +```dart +String shiftIds = ...; +ExampleConnector.instance.listApplicationsForNoShowRange( + shiftIds: shiftIds, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listApplicationsForNoShowRange( + shiftIds: shiftIds, +); +listApplicationsForNoShowRangeData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftIds = ...; + +final ref = ExampleConnector.instance.listApplicationsForNoShowRange( + shiftIds: shiftIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffForNoShowReport +#### Required Arguments +```dart +String staffIds = ...; +ExampleConnector.instance.listStaffForNoShowReport( + staffIds: staffIds, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffForNoShowReport( + staffIds: staffIds, +); +listStaffForNoShowReportData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffIds = ...; + +final ref = ExampleConnector.instance.listStaffForNoShowReport( + staffIds: staffIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoicesForSpendByBusiness +#### Required Arguments +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listInvoicesForSpendByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoicesForSpendByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +); +listInvoicesForSpendByBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listInvoicesForSpendByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoicesForSpendByVendor +#### Required Arguments +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listInvoicesForSpendByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoicesForSpendByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +); +listInvoicesForSpendByVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listInvoicesForSpendByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listInvoicesForSpendByOrder +#### Required Arguments +```dart +String orderId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listInvoicesForSpendByOrder( + orderId: orderId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listInvoicesForSpendByOrder( + orderId: orderId, + startDate: startDate, + endDate: endDate, +); +listInvoicesForSpendByOrderData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String orderId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listInvoicesForSpendByOrder( + orderId: orderId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTimesheetsForSpend +#### Required Arguments +```dart +Timestamp startTime = ...; +Timestamp endTime = ...; +ExampleConnector.instance.listTimesheetsForSpend( + startTime: startTime, + endTime: endTime, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTimesheetsForSpend( + startTime: startTime, + endTime: endTime, +); +listTimesheetsForSpendData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +Timestamp startTime = ...; +Timestamp endTime = ...; + +final ref = ExampleConnector.instance.listTimesheetsForSpend( + startTime: startTime, + endTime: endTime, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForPerformanceByBusiness +#### Required Arguments +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listShiftsForPerformanceByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForPerformanceByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +); +listShiftsForPerformanceByBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listShiftsForPerformanceByBusiness( + businessId: businessId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listShiftsForPerformanceByVendor +#### Required Arguments +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; +ExampleConnector.instance.listShiftsForPerformanceByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listShiftsForPerformanceByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +); +listShiftsForPerformanceByVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +Timestamp startDate = ...; +Timestamp endDate = ...; + +final ref = ExampleConnector.instance.listShiftsForPerformanceByVendor( + vendorId: vendorId, + startDate: startDate, + endDate: endDate, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listApplicationsForPerformance +#### Required Arguments +```dart +String shiftIds = ...; +ExampleConnector.instance.listApplicationsForPerformance( + shiftIds: shiftIds, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listApplicationsForPerformance( + shiftIds: shiftIds, +); +listApplicationsForPerformanceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftIds = ...; + +final ref = ExampleConnector.instance.listApplicationsForPerformance( + shiftIds: shiftIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffForPerformance +#### Required Arguments +```dart +String staffIds = ...; +ExampleConnector.instance.listStaffForPerformance( + staffIds: staffIds, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffForPerformance( + staffIds: staffIds, +); +listStaffForPerformanceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffIds = ...; + +final ref = ExampleConnector.instance.listStaffForPerformance( + staffIds: staffIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listBenefitsData +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listBenefitsData().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listBenefitsData, we created `listBenefitsDataBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListBenefitsDataVariablesBuilder { + ... + + ListBenefitsDataVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listBenefitsData() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listBenefitsData(); +listBenefitsDataData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listBenefitsData().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getBenefitsDataByKey +#### Required Arguments +```dart +String staffId = ...; +String vendorBenefitPlanId = ...; +ExampleConnector.instance.getBenefitsDataByKey( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getBenefitsDataByKey( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +); +getBenefitsDataByKeyData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String vendorBenefitPlanId = ...; + +final ref = ExampleConnector.instance.getBenefitsDataByKey( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listBenefitsDataByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listBenefitsDataByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listBenefitsDataByStaffId, we created `listBenefitsDataByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListBenefitsDataByStaffIdVariablesBuilder { + ... + ListBenefitsDataByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listBenefitsDataByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listBenefitsDataByStaffId( + staffId: staffId, +); +listBenefitsDataByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listBenefitsDataByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listBenefitsDataByVendorBenefitPlanId +#### Required Arguments +```dart +String vendorBenefitPlanId = ...; +ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanId( + vendorBenefitPlanId: vendorBenefitPlanId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listBenefitsDataByVendorBenefitPlanId, we created `listBenefitsDataByVendorBenefitPlanIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder { + ... + ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanId( + vendorBenefitPlanId: vendorBenefitPlanId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanId( + vendorBenefitPlanId: vendorBenefitPlanId, +); +listBenefitsDataByVendorBenefitPlanIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorBenefitPlanId = ...; + +final ref = ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanId( + vendorBenefitPlanId: vendorBenefitPlanId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listBenefitsDataByVendorBenefitPlanIds +#### Required Arguments +```dart +String vendorBenefitPlanIds = ...; +ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanIds( + vendorBenefitPlanIds: vendorBenefitPlanIds, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listBenefitsDataByVendorBenefitPlanIds, we created `listBenefitsDataByVendorBenefitPlanIdsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder { + ... + ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanIds( + vendorBenefitPlanIds: vendorBenefitPlanIds, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanIds( + vendorBenefitPlanIds: vendorBenefitPlanIds, +); +listBenefitsDataByVendorBenefitPlanIdsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorBenefitPlanIds = ...; + +final ref = ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanIds( + vendorBenefitPlanIds: vendorBenefitPlanIds, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffAvailabilities +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listStaffAvailabilities().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffAvailabilities, we created `listStaffAvailabilitiesBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffAvailabilitiesVariablesBuilder { + ... + + ListStaffAvailabilitiesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilitiesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffAvailabilities() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffAvailabilities(); +listStaffAvailabilitiesData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listStaffAvailabilities().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffAvailabilitiesByStaffId +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.listStaffAvailabilitiesByStaffId( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffAvailabilitiesByStaffId, we created `listStaffAvailabilitiesByStaffIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffAvailabilitiesByStaffIdVariablesBuilder { + ... + ListStaffAvailabilitiesByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilitiesByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffAvailabilitiesByStaffId( + staffId: staffId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffAvailabilitiesByStaffId( + staffId: staffId, +); +listStaffAvailabilitiesByStaffIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.listStaffAvailabilitiesByStaffId( + staffId: staffId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getStaffAvailabilityByKey +#### Required Arguments +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; +ExampleConnector.instance.getStaffAvailabilityByKey( + staffId: staffId, + day: day, + slot: slot, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getStaffAvailabilityByKey( + staffId: staffId, + day: day, + slot: slot, +); +getStaffAvailabilityByKeyData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; + +final ref = ExampleConnector.instance.getStaffAvailabilityByKey( + staffId: staffId, + day: day, + slot: slot, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listStaffAvailabilitiesByDay +#### Required Arguments +```dart +DayOfWeek day = ...; +ExampleConnector.instance.listStaffAvailabilitiesByDay( + day: day, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listStaffAvailabilitiesByDay, we created `listStaffAvailabilitiesByDayBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListStaffAvailabilitiesByDayVariablesBuilder { + ... + ListStaffAvailabilitiesByDayVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilitiesByDayVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listStaffAvailabilitiesByDay( + day: day, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listStaffAvailabilitiesByDay( + day: day, +); +listStaffAvailabilitiesByDayData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +DayOfWeek day = ...; + +final ref = ExampleConnector.instance.listStaffAvailabilitiesByDay( + day: day, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listTeamMembers +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listTeamMembers().execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listTeamMembers(); +listTeamMembersData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listTeamMembers().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTeamMemberById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getTeamMemberById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTeamMemberById( + id: id, +); +getTeamMemberByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getTeamMemberById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getTeamMembersByTeamId +#### Required Arguments +```dart +String teamId = ...; +ExampleConnector.instance.getTeamMembersByTeamId( + teamId: teamId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getTeamMembersByTeamId( + teamId: teamId, +); +getTeamMembersByTeamIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamId = ...; + +final ref = ExampleConnector.instance.getTeamMembersByTeamId( + teamId: teamId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listVendorBenefitPlans +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.listVendorBenefitPlans().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listVendorBenefitPlans, we created `listVendorBenefitPlansBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListVendorBenefitPlansVariablesBuilder { + ... + + ListVendorBenefitPlansVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListVendorBenefitPlansVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listVendorBenefitPlans() +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listVendorBenefitPlans(); +listVendorBenefitPlansData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.listVendorBenefitPlans().ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### getVendorBenefitPlanById +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.getVendorBenefitPlanById( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.getVendorBenefitPlanById( + id: id, +); +getVendorBenefitPlanByIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.getVendorBenefitPlanById( + id: id, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listVendorBenefitPlansByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listVendorBenefitPlansByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listVendorBenefitPlansByVendorId, we created `listVendorBenefitPlansByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListVendorBenefitPlansByVendorIdVariablesBuilder { + ... + ListVendorBenefitPlansByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListVendorBenefitPlansByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listVendorBenefitPlansByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listVendorBenefitPlansByVendorId( + vendorId: vendorId, +); +listVendorBenefitPlansByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listVendorBenefitPlansByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### listActiveVendorBenefitPlansByVendorId +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.listActiveVendorBenefitPlansByVendorId( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For listActiveVendorBenefitPlansByVendorId, we created `listActiveVendorBenefitPlansByVendorIdBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class ListActiveVendorBenefitPlansByVendorIdVariablesBuilder { + ... + ListActiveVendorBenefitPlansByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListActiveVendorBenefitPlansByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.listActiveVendorBenefitPlansByVendorId( + vendorId: vendorId, +) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.listActiveVendorBenefitPlansByVendorId( + vendorId: vendorId, +); +listActiveVendorBenefitPlansByVendorIdData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.listActiveVendorBenefitPlansByVendorId( + vendorId: vendorId, +).ref(); +ref.execute(); + +ref.subscribe(...); +``` + + +### filterVendorBenefitPlans +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.filterVendorBenefitPlans().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For filterVendorBenefitPlans, we created `filterVendorBenefitPlansBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class FilterVendorBenefitPlansVariablesBuilder { + ... + + FilterVendorBenefitPlansVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ... +} +ExampleConnector.instance.filterVendorBenefitPlans() +.vendorId(vendorId) +.title(title) +.isActive(isActive) +.offset(offset) +.limit(limit) +.execute(); +``` + +#### Return Type +`execute()` returns a `QueryResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +/// Result of a query request. Created to hold extra variables in the future. +class QueryResult extends OperationResult { + QueryResult(super.dataConnect, super.data, super.ref); +} + +final result = await ExampleConnector.instance.filterVendorBenefitPlans(); +filterVendorBenefitPlansData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.filterVendorBenefitPlans().ref(); +ref.execute(); + +ref.subscribe(...); +``` + +## Mutations + +### createDocument +#### Required Arguments +```dart +DocumentType documentType = ...; +String name = ...; +ExampleConnector.instance.createDocument( + documentType: documentType, + name: name, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createDocument, we created `createDocumentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateDocumentVariablesBuilder { + ... + CreateDocumentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createDocument( + documentType: documentType, + name: name, +) +.description(description) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createDocument( + documentType: documentType, + name: name, +); +createDocumentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +DocumentType documentType = ...; +String name = ...; + +final ref = ExampleConnector.instance.createDocument( + documentType: documentType, + name: name, +).ref(); +ref.execute(); +``` + + +### updateDocument +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateDocument( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateDocument, we created `updateDocumentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateDocumentVariablesBuilder { + ... + UpdateDocumentVariablesBuilder documentType(DocumentType? t) { + _documentType.value = t; + return this; + } + UpdateDocumentVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateDocumentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateDocument( + id: id, +) +.documentType(documentType) +.name(name) +.description(description) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateDocument( + id: id, +); +updateDocumentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateDocument( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteDocument +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteDocument( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteDocument( + id: id, +); +deleteDocumentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteDocument( + id: id, +).ref(); +ref.execute(); +``` + + +### createConversation +#### Required Arguments +```dart +// No required arguments +ExampleConnector.instance.createConversation().execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createConversation, we created `createConversationBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateConversationVariablesBuilder { + ... + + CreateConversationVariablesBuilder subject(String? t) { + _subject.value = t; + return this; + } + CreateConversationVariablesBuilder status(ConversationStatus? t) { + _status.value = t; + return this; + } + CreateConversationVariablesBuilder conversationType(ConversationType? t) { + _conversationType.value = t; + return this; + } + CreateConversationVariablesBuilder isGroup(bool? t) { + _isGroup.value = t; + return this; + } + CreateConversationVariablesBuilder groupName(String? t) { + _groupName.value = t; + return this; + } + CreateConversationVariablesBuilder lastMessage(String? t) { + _lastMessage.value = t; + return this; + } + CreateConversationVariablesBuilder lastMessageAt(Timestamp? t) { + _lastMessageAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createConversation() +.subject(subject) +.status(status) +.conversationType(conversationType) +.isGroup(isGroup) +.groupName(groupName) +.lastMessage(lastMessage) +.lastMessageAt(lastMessageAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createConversation(); +createConversationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +final ref = ExampleConnector.instance.createConversation().ref(); +ref.execute(); +``` + + +### updateConversation +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateConversation( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateConversation, we created `updateConversationBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateConversationVariablesBuilder { + ... + UpdateConversationVariablesBuilder subject(String? t) { + _subject.value = t; + return this; + } + UpdateConversationVariablesBuilder status(ConversationStatus? t) { + _status.value = t; + return this; + } + UpdateConversationVariablesBuilder conversationType(ConversationType? t) { + _conversationType.value = t; + return this; + } + UpdateConversationVariablesBuilder isGroup(bool? t) { + _isGroup.value = t; + return this; + } + UpdateConversationVariablesBuilder groupName(String? t) { + _groupName.value = t; + return this; + } + UpdateConversationVariablesBuilder lastMessage(String? t) { + _lastMessage.value = t; + return this; + } + UpdateConversationVariablesBuilder lastMessageAt(Timestamp? t) { + _lastMessageAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateConversation( + id: id, +) +.subject(subject) +.status(status) +.conversationType(conversationType) +.isGroup(isGroup) +.groupName(groupName) +.lastMessage(lastMessage) +.lastMessageAt(lastMessageAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateConversation( + id: id, +); +updateConversationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateConversation( + id: id, +).ref(); +ref.execute(); +``` + + +### updateConversationLastMessage +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateConversationLastMessage( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateConversationLastMessage, we created `updateConversationLastMessageBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateConversationLastMessageVariablesBuilder { + ... + UpdateConversationLastMessageVariablesBuilder lastMessage(String? t) { + _lastMessage.value = t; + return this; + } + UpdateConversationLastMessageVariablesBuilder lastMessageAt(Timestamp? t) { + _lastMessageAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateConversationLastMessage( + id: id, +) +.lastMessage(lastMessage) +.lastMessageAt(lastMessageAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateConversationLastMessage( + id: id, +); +updateConversationLastMessageData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateConversationLastMessage( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteConversation +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteConversation( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteConversation( + id: id, +); +deleteConversationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteConversation( + id: id, +).ref(); +ref.execute(); +``` + + +### createInvoice +#### Required Arguments +```dart +InvoiceStatus status = ...; +String vendorId = ...; +String businessId = ...; +String orderId = ...; +String invoiceNumber = ...; +Timestamp issueDate = ...; +Timestamp dueDate = ...; +double amount = ...; +ExampleConnector.instance.createInvoice( + status: status, + vendorId: vendorId, + businessId: businessId, + orderId: orderId, + invoiceNumber: invoiceNumber, + issueDate: issueDate, + dueDate: dueDate, + amount: amount, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createInvoice, we created `createInvoiceBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateInvoiceVariablesBuilder { + ... + CreateInvoiceVariablesBuilder paymentTerms(InovicePaymentTerms? t) { + _paymentTerms.value = t; + return this; + } + CreateInvoiceVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + CreateInvoiceVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + CreateInvoiceVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + CreateInvoiceVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + CreateInvoiceVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + CreateInvoiceVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + CreateInvoiceVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + CreateInvoiceVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + CreateInvoiceVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + CreateInvoiceVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createInvoice( + status: status, + vendorId: vendorId, + businessId: businessId, + orderId: orderId, + invoiceNumber: invoiceNumber, + issueDate: issueDate, + dueDate: dueDate, + amount: amount, +) +.paymentTerms(paymentTerms) +.hub(hub) +.managerName(managerName) +.vendorNumber(vendorNumber) +.roles(roles) +.charges(charges) +.otherCharges(otherCharges) +.subtotal(subtotal) +.notes(notes) +.staffCount(staffCount) +.chargesCount(chargesCount) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createInvoice( + status: status, + vendorId: vendorId, + businessId: businessId, + orderId: orderId, + invoiceNumber: invoiceNumber, + issueDate: issueDate, + dueDate: dueDate, + amount: amount, +); +createInvoiceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +InvoiceStatus status = ...; +String vendorId = ...; +String businessId = ...; +String orderId = ...; +String invoiceNumber = ...; +Timestamp issueDate = ...; +Timestamp dueDate = ...; +double amount = ...; + +final ref = ExampleConnector.instance.createInvoice( + status: status, + vendorId: vendorId, + businessId: businessId, + orderId: orderId, + invoiceNumber: invoiceNumber, + issueDate: issueDate, + dueDate: dueDate, + amount: amount, +).ref(); +ref.execute(); +``` + + +### updateInvoice +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateInvoice( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateInvoice, we created `updateInvoiceBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateInvoiceVariablesBuilder { + ... + UpdateInvoiceVariablesBuilder status(InvoiceStatus? t) { + _status.value = t; + return this; + } + UpdateInvoiceVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateInvoiceVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateInvoiceVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + UpdateInvoiceVariablesBuilder paymentTerms(InovicePaymentTerms? t) { + _paymentTerms.value = t; + return this; + } + UpdateInvoiceVariablesBuilder invoiceNumber(String? t) { + _invoiceNumber.value = t; + return this; + } + UpdateInvoiceVariablesBuilder issueDate(Timestamp? t) { + _issueDate.value = t; + return this; + } + UpdateInvoiceVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + UpdateInvoiceVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + UpdateInvoiceVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + UpdateInvoiceVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + UpdateInvoiceVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + UpdateInvoiceVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + UpdateInvoiceVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + UpdateInvoiceVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + UpdateInvoiceVariablesBuilder amount(double? t) { + _amount.value = t; + return this; + } + UpdateInvoiceVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + UpdateInvoiceVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + UpdateInvoiceVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + UpdateInvoiceVariablesBuilder disputedItems(AnyValue? t) { + _disputedItems.value = t; + return this; + } + UpdateInvoiceVariablesBuilder disputeReason(String? t) { + _disputeReason.value = t; + return this; + } + UpdateInvoiceVariablesBuilder disputeDetails(String? t) { + _disputeDetails.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateInvoice( + id: id, +) +.status(status) +.vendorId(vendorId) +.businessId(businessId) +.orderId(orderId) +.paymentTerms(paymentTerms) +.invoiceNumber(invoiceNumber) +.issueDate(issueDate) +.dueDate(dueDate) +.hub(hub) +.managerName(managerName) +.vendorNumber(vendorNumber) +.roles(roles) +.charges(charges) +.otherCharges(otherCharges) +.subtotal(subtotal) +.amount(amount) +.notes(notes) +.staffCount(staffCount) +.chargesCount(chargesCount) +.disputedItems(disputedItems) +.disputeReason(disputeReason) +.disputeDetails(disputeDetails) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateInvoice( + id: id, +); +updateInvoiceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateInvoice( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteInvoice +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteInvoice( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteInvoice( + id: id, +); +deleteInvoiceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteInvoice( + id: id, +).ref(); +ref.execute(); +``` + + +### createVendorRate +#### Required Arguments +```dart +String vendorId = ...; +ExampleConnector.instance.createVendorRate( + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createVendorRate, we created `createVendorRateBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateVendorRateVariablesBuilder { + ... + CreateVendorRateVariablesBuilder roleName(String? t) { + _roleName.value = t; + return this; + } + CreateVendorRateVariablesBuilder category(CategoryType? t) { + _category.value = t; + return this; + } + CreateVendorRateVariablesBuilder clientRate(double? t) { + _clientRate.value = t; + return this; + } + CreateVendorRateVariablesBuilder employeeWage(double? t) { + _employeeWage.value = t; + return this; + } + CreateVendorRateVariablesBuilder markupPercentage(double? t) { + _markupPercentage.value = t; + return this; + } + CreateVendorRateVariablesBuilder vendorFeePercentage(double? t) { + _vendorFeePercentage.value = t; + return this; + } + CreateVendorRateVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateVendorRateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createVendorRate( + vendorId: vendorId, +) +.roleName(roleName) +.category(category) +.clientRate(clientRate) +.employeeWage(employeeWage) +.markupPercentage(markupPercentage) +.vendorFeePercentage(vendorFeePercentage) +.isActive(isActive) +.notes(notes) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createVendorRate( + vendorId: vendorId, +); +createVendorRateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; + +final ref = ExampleConnector.instance.createVendorRate( + vendorId: vendorId, +).ref(); +ref.execute(); +``` + + +### updateVendorRate +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateVendorRate( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateVendorRate, we created `updateVendorRateBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateVendorRateVariablesBuilder { + ... + UpdateVendorRateVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateVendorRateVariablesBuilder roleName(String? t) { + _roleName.value = t; + return this; + } + UpdateVendorRateVariablesBuilder category(CategoryType? t) { + _category.value = t; + return this; + } + UpdateVendorRateVariablesBuilder clientRate(double? t) { + _clientRate.value = t; + return this; + } + UpdateVendorRateVariablesBuilder employeeWage(double? t) { + _employeeWage.value = t; + return this; + } + UpdateVendorRateVariablesBuilder markupPercentage(double? t) { + _markupPercentage.value = t; + return this; + } + UpdateVendorRateVariablesBuilder vendorFeePercentage(double? t) { + _vendorFeePercentage.value = t; + return this; + } + UpdateVendorRateVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateVendorRateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateVendorRate( + id: id, +) +.vendorId(vendorId) +.roleName(roleName) +.category(category) +.clientRate(clientRate) +.employeeWage(employeeWage) +.markupPercentage(markupPercentage) +.vendorFeePercentage(vendorFeePercentage) +.isActive(isActive) +.notes(notes) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateVendorRate( + id: id, +); +updateVendorRateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateVendorRate( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteVendorRate +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteVendorRate( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteVendorRate( + id: id, +); +deleteVendorRateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteVendorRate( + id: id, +).ref(); +ref.execute(); +``` + + +### createClientFeedback +#### Required Arguments +```dart +String businessId = ...; +String vendorId = ...; +ExampleConnector.instance.createClientFeedback( + businessId: businessId, + vendorId: vendorId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createClientFeedback, we created `createClientFeedbackBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateClientFeedbackVariablesBuilder { + ... + CreateClientFeedbackVariablesBuilder rating(int? t) { + _rating.value = t; + return this; + } + CreateClientFeedbackVariablesBuilder comment(String? t) { + _comment.value = t; + return this; + } + CreateClientFeedbackVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + CreateClientFeedbackVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createClientFeedback( + businessId: businessId, + vendorId: vendorId, +) +.rating(rating) +.comment(comment) +.date(date) +.createdBy(createdBy) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createClientFeedback( + businessId: businessId, + vendorId: vendorId, +); +createClientFeedbackData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessId = ...; +String vendorId = ...; + +final ref = ExampleConnector.instance.createClientFeedback( + businessId: businessId, + vendorId: vendorId, +).ref(); +ref.execute(); +``` + + +### updateClientFeedback +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateClientFeedback( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateClientFeedback, we created `updateClientFeedbackBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateClientFeedbackVariablesBuilder { + ... + UpdateClientFeedbackVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder rating(int? t) { + _rating.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder comment(String? t) { + _comment.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateClientFeedback( + id: id, +) +.businessId(businessId) +.vendorId(vendorId) +.rating(rating) +.comment(comment) +.date(date) +.createdBy(createdBy) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateClientFeedback( + id: id, +); +updateClientFeedbackData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateClientFeedback( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteClientFeedback +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteClientFeedback( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteClientFeedback( + id: id, +); +deleteClientFeedbackData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteClientFeedback( + id: id, +).ref(); +ref.execute(); +``` + + +### createTeam +#### Required Arguments +```dart +String teamName = ...; +String ownerId = ...; +String ownerName = ...; +String ownerRole = ...; +ExampleConnector.instance.createTeam( + teamName: teamName, + ownerId: ownerId, + ownerName: ownerName, + ownerRole: ownerRole, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createTeam, we created `createTeamBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateTeamVariablesBuilder { + ... + CreateTeamVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateTeamVariablesBuilder companyLogo(String? t) { + _companyLogo.value = t; + return this; + } + CreateTeamVariablesBuilder totalMembers(int? t) { + _totalMembers.value = t; + return this; + } + CreateTeamVariablesBuilder activeMembers(int? t) { + _activeMembers.value = t; + return this; + } + CreateTeamVariablesBuilder totalHubs(int? t) { + _totalHubs.value = t; + return this; + } + CreateTeamVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + CreateTeamVariablesBuilder favoriteStaffCount(int? t) { + _favoriteStaffCount.value = t; + return this; + } + CreateTeamVariablesBuilder blockedStaffCount(int? t) { + _blockedStaffCount.value = t; + return this; + } + CreateTeamVariablesBuilder favoriteStaff(AnyValue? t) { + _favoriteStaff.value = t; + return this; + } + CreateTeamVariablesBuilder blockedStaff(AnyValue? t) { + _blockedStaff.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createTeam( + teamName: teamName, + ownerId: ownerId, + ownerName: ownerName, + ownerRole: ownerRole, +) +.email(email) +.companyLogo(companyLogo) +.totalMembers(totalMembers) +.activeMembers(activeMembers) +.totalHubs(totalHubs) +.departments(departments) +.favoriteStaffCount(favoriteStaffCount) +.blockedStaffCount(blockedStaffCount) +.favoriteStaff(favoriteStaff) +.blockedStaff(blockedStaff) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createTeam( + teamName: teamName, + ownerId: ownerId, + ownerName: ownerName, + ownerRole: ownerRole, +); +createTeamData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamName = ...; +String ownerId = ...; +String ownerName = ...; +String ownerRole = ...; + +final ref = ExampleConnector.instance.createTeam( + teamName: teamName, + ownerId: ownerId, + ownerName: ownerName, + ownerRole: ownerRole, +).ref(); +ref.execute(); +``` + + +### updateTeam +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateTeam( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateTeam, we created `updateTeamBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateTeamVariablesBuilder { + ... + UpdateTeamVariablesBuilder teamName(String? t) { + _teamName.value = t; + return this; + } + UpdateTeamVariablesBuilder ownerName(String? t) { + _ownerName.value = t; + return this; + } + UpdateTeamVariablesBuilder ownerRole(String? t) { + _ownerRole.value = t; + return this; + } + UpdateTeamVariablesBuilder companyLogo(String? t) { + _companyLogo.value = t; + return this; + } + UpdateTeamVariablesBuilder totalMembers(int? t) { + _totalMembers.value = t; + return this; + } + UpdateTeamVariablesBuilder activeMembers(int? t) { + _activeMembers.value = t; + return this; + } + UpdateTeamVariablesBuilder totalHubs(int? t) { + _totalHubs.value = t; + return this; + } + UpdateTeamVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + UpdateTeamVariablesBuilder favoriteStaffCount(int? t) { + _favoriteStaffCount.value = t; + return this; + } + UpdateTeamVariablesBuilder blockedStaffCount(int? t) { + _blockedStaffCount.value = t; + return this; + } + UpdateTeamVariablesBuilder favoriteStaff(AnyValue? t) { + _favoriteStaff.value = t; + return this; + } + UpdateTeamVariablesBuilder blockedStaff(AnyValue? t) { + _blockedStaff.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateTeam( + id: id, +) +.teamName(teamName) +.ownerName(ownerName) +.ownerRole(ownerRole) +.companyLogo(companyLogo) +.totalMembers(totalMembers) +.activeMembers(activeMembers) +.totalHubs(totalHubs) +.departments(departments) +.favoriteStaffCount(favoriteStaffCount) +.blockedStaffCount(blockedStaffCount) +.favoriteStaff(favoriteStaff) +.blockedStaff(blockedStaff) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTeam( + id: id, +); +updateTeamData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateTeam( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteTeam +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteTeam( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteTeam( + id: id, +); +deleteTeamData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteTeam( + id: id, +).ref(); +ref.execute(); +``` + + +### createVendor +#### Required Arguments +```dart +String userId = ...; +String companyName = ...; +ExampleConnector.instance.createVendor( + userId: userId, + companyName: companyName, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createVendor, we created `createVendorBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateVendorVariablesBuilder { + ... + CreateVendorVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateVendorVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + CreateVendorVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + CreateVendorVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + CreateVendorVariablesBuilder billingAddress(String? t) { + _billingAddress.value = t; + return this; + } + CreateVendorVariablesBuilder timezone(String? t) { + _timezone.value = t; + return this; + } + CreateVendorVariablesBuilder legalName(String? t) { + _legalName.value = t; + return this; + } + CreateVendorVariablesBuilder doingBusinessAs(String? t) { + _doingBusinessAs.value = t; + return this; + } + CreateVendorVariablesBuilder region(String? t) { + _region.value = t; + return this; + } + CreateVendorVariablesBuilder state(String? t) { + _state.value = t; + return this; + } + CreateVendorVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + CreateVendorVariablesBuilder serviceSpecialty(String? t) { + _serviceSpecialty.value = t; + return this; + } + CreateVendorVariablesBuilder approvalStatus(ApprovalStatus? t) { + _approvalStatus.value = t; + return this; + } + CreateVendorVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateVendorVariablesBuilder markup(double? t) { + _markup.value = t; + return this; + } + CreateVendorVariablesBuilder fee(double? t) { + _fee.value = t; + return this; + } + CreateVendorVariablesBuilder csat(double? t) { + _csat.value = t; + return this; + } + CreateVendorVariablesBuilder tier(VendorTier? t) { + _tier.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createVendor( + userId: userId, + companyName: companyName, +) +.email(email) +.phone(phone) +.photoUrl(photoUrl) +.address(address) +.billingAddress(billingAddress) +.timezone(timezone) +.legalName(legalName) +.doingBusinessAs(doingBusinessAs) +.region(region) +.state(state) +.city(city) +.serviceSpecialty(serviceSpecialty) +.approvalStatus(approvalStatus) +.isActive(isActive) +.markup(markup) +.fee(fee) +.csat(csat) +.tier(tier) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createVendor( + userId: userId, + companyName: companyName, +); +createVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; +String companyName = ...; + +final ref = ExampleConnector.instance.createVendor( + userId: userId, + companyName: companyName, +).ref(); +ref.execute(); +``` + + +### updateVendor +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateVendor( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateVendor, we created `updateVendorBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateVendorVariablesBuilder { + ... + UpdateVendorVariablesBuilder companyName(String? t) { + _companyName.value = t; + return this; + } + UpdateVendorVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateVendorVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateVendorVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + UpdateVendorVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateVendorVariablesBuilder billingAddress(String? t) { + _billingAddress.value = t; + return this; + } + UpdateVendorVariablesBuilder timezone(String? t) { + _timezone.value = t; + return this; + } + UpdateVendorVariablesBuilder legalName(String? t) { + _legalName.value = t; + return this; + } + UpdateVendorVariablesBuilder doingBusinessAs(String? t) { + _doingBusinessAs.value = t; + return this; + } + UpdateVendorVariablesBuilder region(String? t) { + _region.value = t; + return this; + } + UpdateVendorVariablesBuilder state(String? t) { + _state.value = t; + return this; + } + UpdateVendorVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateVendorVariablesBuilder serviceSpecialty(String? t) { + _serviceSpecialty.value = t; + return this; + } + UpdateVendorVariablesBuilder approvalStatus(ApprovalStatus? t) { + _approvalStatus.value = t; + return this; + } + UpdateVendorVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateVendorVariablesBuilder markup(double? t) { + _markup.value = t; + return this; + } + UpdateVendorVariablesBuilder fee(double? t) { + _fee.value = t; + return this; + } + UpdateVendorVariablesBuilder csat(double? t) { + _csat.value = t; + return this; + } + UpdateVendorVariablesBuilder tier(VendorTier? t) { + _tier.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateVendor( + id: id, +) +.companyName(companyName) +.email(email) +.phone(phone) +.photoUrl(photoUrl) +.address(address) +.billingAddress(billingAddress) +.timezone(timezone) +.legalName(legalName) +.doingBusinessAs(doingBusinessAs) +.region(region) +.state(state) +.city(city) +.serviceSpecialty(serviceSpecialty) +.approvalStatus(approvalStatus) +.isActive(isActive) +.markup(markup) +.fee(fee) +.csat(csat) +.tier(tier) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateVendor( + id: id, +); +updateVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateVendor( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteVendor +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteVendor( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteVendor( + id: id, +); +deleteVendorData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteVendor( + id: id, +).ref(); +ref.execute(); +``` + + +### createWorkforce +#### Required Arguments +```dart +String vendorId = ...; +String staffId = ...; +String workforceNumber = ...; +ExampleConnector.instance.createWorkforce( + vendorId: vendorId, + staffId: staffId, + workforceNumber: workforceNumber, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createWorkforce, we created `createWorkforceBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateWorkforceVariablesBuilder { + ... + CreateWorkforceVariablesBuilder employmentType(WorkforceEmploymentType? t) { + _employmentType.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createWorkforce( + vendorId: vendorId, + staffId: staffId, + workforceNumber: workforceNumber, +) +.employmentType(employmentType) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createWorkforce( + vendorId: vendorId, + staffId: staffId, + workforceNumber: workforceNumber, +); +createWorkforceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +String staffId = ...; +String workforceNumber = ...; + +final ref = ExampleConnector.instance.createWorkforce( + vendorId: vendorId, + staffId: staffId, + workforceNumber: workforceNumber, +).ref(); +ref.execute(); +``` + + +### updateWorkforce +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateWorkforce( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateWorkforce, we created `updateWorkforceBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateWorkforceVariablesBuilder { + ... + UpdateWorkforceVariablesBuilder workforceNumber(String? t) { + _workforceNumber.value = t; + return this; + } + UpdateWorkforceVariablesBuilder employmentType(WorkforceEmploymentType? t) { + _employmentType.value = t; + return this; + } + UpdateWorkforceVariablesBuilder status(WorkforceStatus? t) { + _status.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateWorkforce( + id: id, +) +.workforceNumber(workforceNumber) +.employmentType(employmentType) +.status(status) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateWorkforce( + id: id, +); +updateWorkforceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateWorkforce( + id: id, +).ref(); +ref.execute(); +``` + + +### deactivateWorkforce +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deactivateWorkforce( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deactivateWorkforce( + id: id, +); +deactivateWorkforceData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deactivateWorkforce( + id: id, +).ref(); +ref.execute(); +``` + + +### createBusiness +#### Required Arguments +```dart +String businessName = ...; +String userId = ...; +BusinessRateGroup rateGroup = ...; +BusinessStatus status = ...; +ExampleConnector.instance.createBusiness( + businessName: businessName, + userId: userId, + rateGroup: rateGroup, + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createBusiness, we created `createBusinessBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateBusinessVariablesBuilder { + ... + CreateBusinessVariablesBuilder contactName(String? t) { + _contactName.value = t; + return this; + } + CreateBusinessVariablesBuilder companyLogoUrl(String? t) { + _companyLogoUrl.value = t; + return this; + } + CreateBusinessVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + CreateBusinessVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateBusinessVariablesBuilder hubBuilding(String? t) { + _hubBuilding.value = t; + return this; + } + CreateBusinessVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + CreateBusinessVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + CreateBusinessVariablesBuilder area(BusinessArea? t) { + _area.value = t; + return this; + } + CreateBusinessVariablesBuilder sector(BusinessSector? t) { + _sector.value = t; + return this; + } + CreateBusinessVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createBusiness( + businessName: businessName, + userId: userId, + rateGroup: rateGroup, + status: status, +) +.contactName(contactName) +.companyLogoUrl(companyLogoUrl) +.phone(phone) +.email(email) +.hubBuilding(hubBuilding) +.address(address) +.city(city) +.area(area) +.sector(sector) +.notes(notes) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createBusiness( + businessName: businessName, + userId: userId, + rateGroup: rateGroup, + status: status, +); +createBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String businessName = ...; +String userId = ...; +BusinessRateGroup rateGroup = ...; +BusinessStatus status = ...; + +final ref = ExampleConnector.instance.createBusiness( + businessName: businessName, + userId: userId, + rateGroup: rateGroup, + status: status, +).ref(); +ref.execute(); +``` + + +### updateBusiness +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateBusiness( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateBusiness, we created `updateBusinessBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateBusinessVariablesBuilder { + ... + UpdateBusinessVariablesBuilder businessName(String? t) { + _businessName.value = t; + return this; + } + UpdateBusinessVariablesBuilder contactName(String? t) { + _contactName.value = t; + return this; + } + UpdateBusinessVariablesBuilder companyLogoUrl(String? t) { + _companyLogoUrl.value = t; + return this; + } + UpdateBusinessVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateBusinessVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateBusinessVariablesBuilder hubBuilding(String? t) { + _hubBuilding.value = t; + return this; + } + UpdateBusinessVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateBusinessVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateBusinessVariablesBuilder area(BusinessArea? t) { + _area.value = t; + return this; + } + UpdateBusinessVariablesBuilder sector(BusinessSector? t) { + _sector.value = t; + return this; + } + UpdateBusinessVariablesBuilder rateGroup(BusinessRateGroup? t) { + _rateGroup.value = t; + return this; + } + UpdateBusinessVariablesBuilder status(BusinessStatus? t) { + _status.value = t; + return this; + } + UpdateBusinessVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateBusiness( + id: id, +) +.businessName(businessName) +.contactName(contactName) +.companyLogoUrl(companyLogoUrl) +.phone(phone) +.email(email) +.hubBuilding(hubBuilding) +.address(address) +.city(city) +.area(area) +.sector(sector) +.rateGroup(rateGroup) +.status(status) +.notes(notes) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateBusiness( + id: id, +); +updateBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateBusiness( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteBusiness +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteBusiness( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteBusiness( + id: id, +); +deleteBusinessData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteBusiness( + id: id, +).ref(); +ref.execute(); +``` + + +### createHub +#### Required Arguments +```dart +String name = ...; +String ownerId = ...; +ExampleConnector.instance.createHub( + name: name, + ownerId: ownerId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createHub, we created `createHubBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateHubVariablesBuilder { + ... + CreateHubVariablesBuilder locationName(String? t) { + _locationName.value = t; + return this; + } + CreateHubVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + CreateHubVariablesBuilder nfcTagId(String? t) { + _nfcTagId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createHub( + name: name, + ownerId: ownerId, +) +.locationName(locationName) +.address(address) +.nfcTagId(nfcTagId) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createHub( + name: name, + ownerId: ownerId, +); +createHubData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; +String ownerId = ...; + +final ref = ExampleConnector.instance.createHub( + name: name, + ownerId: ownerId, +).ref(); +ref.execute(); +``` + + +### updateHub +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateHub( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateHub, we created `updateHubBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateHubVariablesBuilder { + ... + UpdateHubVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateHubVariablesBuilder locationName(String? t) { + _locationName.value = t; + return this; + } + UpdateHubVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateHubVariablesBuilder nfcTagId(String? t) { + _nfcTagId.value = t; + return this; + } + UpdateHubVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateHub( + id: id, +) +.name(name) +.locationName(locationName) +.address(address) +.nfcTagId(nfcTagId) +.ownerId(ownerId) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateHub( + id: id, +); +updateHubData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateHub( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteHub +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteHub( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteHub( + id: id, +); +deleteHubData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteHub( + id: id, +).ref(); +ref.execute(); +``` + + +### createLevel +#### Required Arguments +```dart +String name = ...; +int xpRequired = ...; +ExampleConnector.instance.createLevel( + name: name, + xpRequired: xpRequired, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createLevel, we created `createLevelBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateLevelVariablesBuilder { + ... + CreateLevelVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + CreateLevelVariablesBuilder colors(AnyValue? t) { + _colors.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createLevel( + name: name, + xpRequired: xpRequired, +) +.icon(icon) +.colors(colors) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createLevel( + name: name, + xpRequired: xpRequired, +); +createLevelData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; +int xpRequired = ...; + +final ref = ExampleConnector.instance.createLevel( + name: name, + xpRequired: xpRequired, +).ref(); +ref.execute(); +``` + + +### updateLevel +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateLevel( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateLevel, we created `updateLevelBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateLevelVariablesBuilder { + ... + UpdateLevelVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateLevelVariablesBuilder xpRequired(int? t) { + _xpRequired.value = t; + return this; + } + UpdateLevelVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + UpdateLevelVariablesBuilder colors(AnyValue? t) { + _colors.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateLevel( + id: id, +) +.name(name) +.xpRequired(xpRequired) +.icon(icon) +.colors(colors) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateLevel( + id: id, +); +updateLevelData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateLevel( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteLevel +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteLevel( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteLevel( + id: id, +); +deleteLevelData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteLevel( + id: id, +).ref(); +ref.execute(); +``` + + +### createRecentPayment +#### Required Arguments +```dart +String staffId = ...; +String applicationId = ...; +String invoiceId = ...; +ExampleConnector.instance.createRecentPayment( + staffId: staffId, + applicationId: applicationId, + invoiceId: invoiceId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createRecentPayment, we created `createRecentPaymentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateRecentPaymentVariablesBuilder { + ... + + CreateRecentPaymentVariablesBuilder workedTime(String? t) { + _workedTime.value = t; + return this; + } + CreateRecentPaymentVariablesBuilder status(RecentPaymentStatus? t) { + _status.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createRecentPayment( + staffId: staffId, + applicationId: applicationId, + invoiceId: invoiceId, +) +.workedTime(workedTime) +.status(status) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createRecentPayment( + staffId: staffId, + applicationId: applicationId, + invoiceId: invoiceId, +); +createRecentPaymentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String applicationId = ...; +String invoiceId = ...; + +final ref = ExampleConnector.instance.createRecentPayment( + staffId: staffId, + applicationId: applicationId, + invoiceId: invoiceId, +).ref(); +ref.execute(); +``` + + +### updateRecentPayment +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateRecentPayment( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateRecentPayment, we created `updateRecentPaymentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateRecentPaymentVariablesBuilder { + ... + UpdateRecentPaymentVariablesBuilder workedTime(String? t) { + _workedTime.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder status(RecentPaymentStatus? t) { + _status.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder applicationId(String? t) { + _applicationId.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder invoiceId(String? t) { + _invoiceId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateRecentPayment( + id: id, +) +.workedTime(workedTime) +.status(status) +.staffId(staffId) +.applicationId(applicationId) +.invoiceId(invoiceId) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateRecentPayment( + id: id, +); +updateRecentPaymentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateRecentPayment( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteRecentPayment +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteRecentPayment( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteRecentPayment( + id: id, +); +deleteRecentPaymentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteRecentPayment( + id: id, +).ref(); +ref.execute(); +``` + + +### createTeamHudDepartment +#### Required Arguments +```dart +String name = ...; +String teamHubId = ...; +ExampleConnector.instance.createTeamHudDepartment( + name: name, + teamHubId: teamHubId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createTeamHudDepartment, we created `createTeamHudDepartmentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateTeamHudDepartmentVariablesBuilder { + ... + CreateTeamHudDepartmentVariablesBuilder costCenter(String? t) { + _costCenter.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createTeamHudDepartment( + name: name, + teamHubId: teamHubId, +) +.costCenter(costCenter) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createTeamHudDepartment( + name: name, + teamHubId: teamHubId, +); +createTeamHudDepartmentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; +String teamHubId = ...; + +final ref = ExampleConnector.instance.createTeamHudDepartment( + name: name, + teamHubId: teamHubId, +).ref(); +ref.execute(); +``` + + +### updateTeamHudDepartment +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateTeamHudDepartment( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateTeamHudDepartment, we created `updateTeamHudDepartmentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateTeamHudDepartmentVariablesBuilder { + ... + UpdateTeamHudDepartmentVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateTeamHudDepartmentVariablesBuilder costCenter(String? t) { + _costCenter.value = t; + return this; + } + UpdateTeamHudDepartmentVariablesBuilder teamHubId(String? t) { + _teamHubId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateTeamHudDepartment( + id: id, +) +.name(name) +.costCenter(costCenter) +.teamHubId(teamHubId) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTeamHudDepartment( + id: id, +); +updateTeamHudDepartmentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateTeamHudDepartment( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteTeamHudDepartment +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteTeamHudDepartment( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteTeamHudDepartment( + id: id, +); +deleteTeamHudDepartmentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteTeamHudDepartment( + id: id, +).ref(); +ref.execute(); +``` + + +### createTeamMember +#### Required Arguments +```dart +String teamId = ...; +TeamMemberRole role = ...; +String userId = ...; +ExampleConnector.instance.createTeamMember( + teamId: teamId, + role: role, + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createTeamMember, we created `createTeamMemberBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateTeamMemberVariablesBuilder { + ... + CreateTeamMemberVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + CreateTeamMemberVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + CreateTeamMemberVariablesBuilder teamHubId(String? t) { + _teamHubId.value = t; + return this; + } + CreateTeamMemberVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateTeamMemberVariablesBuilder inviteStatus(TeamMemberInviteStatus? t) { + _inviteStatus.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createTeamMember( + teamId: teamId, + role: role, + userId: userId, +) +.title(title) +.department(department) +.teamHubId(teamHubId) +.isActive(isActive) +.inviteStatus(inviteStatus) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createTeamMember( + teamId: teamId, + role: role, + userId: userId, +); +createTeamMemberData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamId = ...; +TeamMemberRole role = ...; +String userId = ...; + +final ref = ExampleConnector.instance.createTeamMember( + teamId: teamId, + role: role, + userId: userId, +).ref(); +ref.execute(); +``` + + +### updateTeamMember +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateTeamMember( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateTeamMember, we created `updateTeamMemberBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateTeamMemberVariablesBuilder { + ... + UpdateTeamMemberVariablesBuilder role(TeamMemberRole? t) { + _role.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder teamHubId(String? t) { + _teamHubId.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder inviteStatus(TeamMemberInviteStatus? t) { + _inviteStatus.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateTeamMember( + id: id, +) +.role(role) +.title(title) +.department(department) +.teamHubId(teamHubId) +.isActive(isActive) +.inviteStatus(inviteStatus) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTeamMember( + id: id, +); +updateTeamMemberData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateTeamMember( + id: id, +).ref(); +ref.execute(); +``` + + +### updateTeamMemberInviteStatus +#### Required Arguments +```dart +String id = ...; +TeamMemberInviteStatus inviteStatus = ...; +ExampleConnector.instance.updateTeamMemberInviteStatus( + id: id, + inviteStatus: inviteStatus, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTeamMemberInviteStatus( + id: id, + inviteStatus: inviteStatus, +); +updateTeamMemberInviteStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; +TeamMemberInviteStatus inviteStatus = ...; + +final ref = ExampleConnector.instance.updateTeamMemberInviteStatus( + id: id, + inviteStatus: inviteStatus, +).ref(); +ref.execute(); +``` + + +### acceptInviteByCode +#### Required Arguments +```dart +String inviteCode = ...; +ExampleConnector.instance.acceptInviteByCode( + inviteCode: inviteCode, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.acceptInviteByCode( + inviteCode: inviteCode, +); +acceptInviteByCodeData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String inviteCode = ...; + +final ref = ExampleConnector.instance.acceptInviteByCode( + inviteCode: inviteCode, +).ref(); +ref.execute(); +``` + + +### cancelInviteByCode +#### Required Arguments +```dart +String inviteCode = ...; +ExampleConnector.instance.cancelInviteByCode( + inviteCode: inviteCode, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.cancelInviteByCode( + inviteCode: inviteCode, +); +cancelInviteByCodeData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String inviteCode = ...; + +final ref = ExampleConnector.instance.cancelInviteByCode( + inviteCode: inviteCode, +).ref(); +ref.execute(); +``` + + +### deleteTeamMember +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteTeamMember( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteTeamMember( + id: id, +); +deleteTeamMemberData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteTeamMember( + id: id, +).ref(); +ref.execute(); +``` + + +### CreateUser +#### Required Arguments +```dart +String id = ...; +UserBaseRole role = ...; +ExampleConnector.instance.createUser( + id: id, + role: role, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For CreateUser, we created `CreateUserBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateUserVariablesBuilder { + ... + CreateUserVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateUserVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + CreateUserVariablesBuilder userRole(String? t) { + _userRole.value = t; + return this; + } + CreateUserVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createUser( + id: id, + role: role, +) +.email(email) +.fullName(fullName) +.userRole(userRole) +.photoUrl(photoUrl) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createUser( + id: id, + role: role, +); +CreateUserData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; +UserBaseRole role = ...; + +final ref = ExampleConnector.instance.createUser( + id: id, + role: role, +).ref(); +ref.execute(); +``` + + +### UpdateUser +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateUser( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For UpdateUser, we created `UpdateUserBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateUserVariablesBuilder { + ... + UpdateUserVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateUserVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + UpdateUserVariablesBuilder role(UserBaseRole? t) { + _role.value = t; + return this; + } + UpdateUserVariablesBuilder userRole(String? t) { + _userRole.value = t; + return this; + } + UpdateUserVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateUser( + id: id, +) +.email(email) +.fullName(fullName) +.role(role) +.userRole(userRole) +.photoUrl(photoUrl) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateUser( + id: id, +); +UpdateUserData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateUser( + id: id, +).ref(); +ref.execute(); +``` + + +### DeleteUser +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteUser( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteUser( + id: id, +); +DeleteUserData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteUser( + id: id, +).ref(); +ref.execute(); +``` + + +### createShift +#### Required Arguments +```dart +String title = ...; +String orderId = ...; +ExampleConnector.instance.createShift( + title: title, + orderId: orderId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createShift, we created `createShiftBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateShiftVariablesBuilder { + ... + CreateShiftVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + CreateShiftVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + CreateShiftVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + CreateShiftVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + CreateShiftVariablesBuilder cost(double? t) { + _cost.value = t; + return this; + } + CreateShiftVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + CreateShiftVariablesBuilder locationAddress(String? t) { + _locationAddress.value = t; + return this; + } + CreateShiftVariablesBuilder latitude(double? t) { + _latitude.value = t; + return this; + } + CreateShiftVariablesBuilder longitude(double? t) { + _longitude.value = t; + return this; + } + CreateShiftVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateShiftVariablesBuilder status(ShiftStatus? t) { + _status.value = t; + return this; + } + CreateShiftVariablesBuilder workersNeeded(int? t) { + _workersNeeded.value = t; + return this; + } + CreateShiftVariablesBuilder filled(int? t) { + _filled.value = t; + return this; + } + CreateShiftVariablesBuilder filledAt(Timestamp? t) { + _filledAt.value = t; + return this; + } + CreateShiftVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + CreateShiftVariablesBuilder durationDays(int? t) { + _durationDays.value = t; + return this; + } + CreateShiftVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createShift( + title: title, + orderId: orderId, +) +.date(date) +.startTime(startTime) +.endTime(endTime) +.hours(hours) +.cost(cost) +.location(location) +.locationAddress(locationAddress) +.latitude(latitude) +.longitude(longitude) +.description(description) +.status(status) +.workersNeeded(workersNeeded) +.filled(filled) +.filledAt(filledAt) +.managers(managers) +.durationDays(durationDays) +.createdBy(createdBy) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createShift( + title: title, + orderId: orderId, +); +createShiftData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String title = ...; +String orderId = ...; + +final ref = ExampleConnector.instance.createShift( + title: title, + orderId: orderId, +).ref(); +ref.execute(); +``` + + +### updateShift +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateShift( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateShift, we created `updateShiftBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateShiftVariablesBuilder { + ... + UpdateShiftVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateShiftVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + UpdateShiftVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + UpdateShiftVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + UpdateShiftVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + UpdateShiftVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + UpdateShiftVariablesBuilder cost(double? t) { + _cost.value = t; + return this; + } + UpdateShiftVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + UpdateShiftVariablesBuilder locationAddress(String? t) { + _locationAddress.value = t; + return this; + } + UpdateShiftVariablesBuilder latitude(double? t) { + _latitude.value = t; + return this; + } + UpdateShiftVariablesBuilder longitude(double? t) { + _longitude.value = t; + return this; + } + UpdateShiftVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateShiftVariablesBuilder status(ShiftStatus? t) { + _status.value = t; + return this; + } + UpdateShiftVariablesBuilder workersNeeded(int? t) { + _workersNeeded.value = t; + return this; + } + UpdateShiftVariablesBuilder filled(int? t) { + _filled.value = t; + return this; + } + UpdateShiftVariablesBuilder filledAt(Timestamp? t) { + _filledAt.value = t; + return this; + } + UpdateShiftVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + UpdateShiftVariablesBuilder durationDays(int? t) { + _durationDays.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateShift( + id: id, +) +.title(title) +.orderId(orderId) +.date(date) +.startTime(startTime) +.endTime(endTime) +.hours(hours) +.cost(cost) +.location(location) +.locationAddress(locationAddress) +.latitude(latitude) +.longitude(longitude) +.description(description) +.status(status) +.workersNeeded(workersNeeded) +.filled(filled) +.filledAt(filledAt) +.managers(managers) +.durationDays(durationDays) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateShift( + id: id, +); +updateShiftData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateShift( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteShift +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteShift( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteShift( + id: id, +); +deleteShiftData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteShift( + id: id, +).ref(); +ref.execute(); +``` + + +### createShiftRole +#### Required Arguments +```dart +String shiftId = ...; +String roleId = ...; +int count = ...; +ExampleConnector.instance.createShiftRole( + shiftId: shiftId, + roleId: roleId, + count: count, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createShiftRole, we created `createShiftRoleBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateShiftRoleVariablesBuilder { + ... + CreateShiftRoleVariablesBuilder assigned(int? t) { + _assigned.value = t; + return this; + } + CreateShiftRoleVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + CreateShiftRoleVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + CreateShiftRoleVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + CreateShiftRoleVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + CreateShiftRoleVariablesBuilder uniform(String? t) { + _uniform.value = t; + return this; + } + CreateShiftRoleVariablesBuilder breakType(BreakDuration? t) { + _breakType.value = t; + return this; + } + CreateShiftRoleVariablesBuilder totalValue(double? t) { + _totalValue.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createShiftRole( + shiftId: shiftId, + roleId: roleId, + count: count, +) +.assigned(assigned) +.startTime(startTime) +.endTime(endTime) +.hours(hours) +.department(department) +.uniform(uniform) +.breakType(breakType) +.totalValue(totalValue) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createShiftRole( + shiftId: shiftId, + roleId: roleId, + count: count, +); +createShiftRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +String roleId = ...; +int count = ...; + +final ref = ExampleConnector.instance.createShiftRole( + shiftId: shiftId, + roleId: roleId, + count: count, +).ref(); +ref.execute(); +``` + + +### updateShiftRole +#### Required Arguments +```dart +String shiftId = ...; +String roleId = ...; +ExampleConnector.instance.updateShiftRole( + shiftId: shiftId, + roleId: roleId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateShiftRole, we created `updateShiftRoleBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateShiftRoleVariablesBuilder { + ... + UpdateShiftRoleVariablesBuilder count(int? t) { + _count.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder assigned(int? t) { + _assigned.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder uniform(String? t) { + _uniform.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder breakType(BreakDuration? t) { + _breakType.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder totalValue(double? t) { + _totalValue.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateShiftRole( + shiftId: shiftId, + roleId: roleId, +) +.count(count) +.assigned(assigned) +.startTime(startTime) +.endTime(endTime) +.hours(hours) +.department(department) +.uniform(uniform) +.breakType(breakType) +.totalValue(totalValue) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateShiftRole( + shiftId: shiftId, + roleId: roleId, +); +updateShiftRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.updateShiftRole( + shiftId: shiftId, + roleId: roleId, +).ref(); +ref.execute(); +``` + + +### deleteShiftRole +#### Required Arguments +```dart +String shiftId = ...; +String roleId = ...; +ExampleConnector.instance.deleteShiftRole( + shiftId: shiftId, + roleId: roleId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteShiftRole( + shiftId: shiftId, + roleId: roleId, +); +deleteShiftRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.deleteShiftRole( + shiftId: shiftId, + roleId: roleId, +).ref(); +ref.execute(); +``` + + +### createAttireOption +#### Required Arguments +```dart +String itemId = ...; +String label = ...; +ExampleConnector.instance.createAttireOption( + itemId: itemId, + label: label, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createAttireOption, we created `createAttireOptionBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateAttireOptionVariablesBuilder { + ... + CreateAttireOptionVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + CreateAttireOptionVariablesBuilder imageUrl(String? t) { + _imageUrl.value = t; + return this; + } + CreateAttireOptionVariablesBuilder isMandatory(bool? t) { + _isMandatory.value = t; + return this; + } + CreateAttireOptionVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createAttireOption( + itemId: itemId, + label: label, +) +.icon(icon) +.imageUrl(imageUrl) +.isMandatory(isMandatory) +.vendorId(vendorId) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createAttireOption( + itemId: itemId, + label: label, +); +createAttireOptionData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String itemId = ...; +String label = ...; + +final ref = ExampleConnector.instance.createAttireOption( + itemId: itemId, + label: label, +).ref(); +ref.execute(); +``` + + +### updateAttireOption +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateAttireOption( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateAttireOption, we created `updateAttireOptionBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateAttireOptionVariablesBuilder { + ... + UpdateAttireOptionVariablesBuilder itemId(String? t) { + _itemId.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder label(String? t) { + _label.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder imageUrl(String? t) { + _imageUrl.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder isMandatory(bool? t) { + _isMandatory.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateAttireOption( + id: id, +) +.itemId(itemId) +.label(label) +.icon(icon) +.imageUrl(imageUrl) +.isMandatory(isMandatory) +.vendorId(vendorId) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateAttireOption( + id: id, +); +updateAttireOptionData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateAttireOption( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteAttireOption +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteAttireOption( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteAttireOption( + id: id, +); +deleteAttireOptionData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteAttireOption( + id: id, +).ref(); +ref.execute(); +``` + + +### createCategory +#### Required Arguments +```dart +String categoryId = ...; +String label = ...; +ExampleConnector.instance.createCategory( + categoryId: categoryId, + label: label, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createCategory, we created `createCategoryBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateCategoryVariablesBuilder { + ... + CreateCategoryVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createCategory( + categoryId: categoryId, + label: label, +) +.icon(icon) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createCategory( + categoryId: categoryId, + label: label, +); +createCategoryData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String categoryId = ...; +String label = ...; + +final ref = ExampleConnector.instance.createCategory( + categoryId: categoryId, + label: label, +).ref(); +ref.execute(); +``` + + +### updateCategory +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateCategory( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateCategory, we created `updateCategoryBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateCategoryVariablesBuilder { + ... + UpdateCategoryVariablesBuilder categoryId(String? t) { + _categoryId.value = t; + return this; + } + UpdateCategoryVariablesBuilder label(String? t) { + _label.value = t; + return this; + } + UpdateCategoryVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateCategory( + id: id, +) +.categoryId(categoryId) +.label(label) +.icon(icon) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateCategory( + id: id, +); +updateCategoryData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateCategory( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteCategory +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteCategory( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteCategory( + id: id, +); +deleteCategoryData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteCategory( + id: id, +).ref(); +ref.execute(); +``` + + +### CreateStaff +#### Required Arguments +```dart +String userId = ...; +String fullName = ...; +ExampleConnector.instance.createStaff( + userId: userId, + fullName: fullName, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For CreateStaff, we created `CreateStaffBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateStaffVariablesBuilder { + ... + CreateStaffVariablesBuilder level(String? t) { + _level.value = t; + return this; + } + CreateStaffVariablesBuilder role(String? t) { + _role.value = t; + return this; + } + CreateStaffVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + CreateStaffVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateStaffVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + CreateStaffVariablesBuilder totalShifts(int? t) { + _totalShifts.value = t; + return this; + } + CreateStaffVariablesBuilder averageRating(double? t) { + _averageRating.value = t; + return this; + } + CreateStaffVariablesBuilder onTimeRate(int? t) { + _onTimeRate.value = t; + return this; + } + CreateStaffVariablesBuilder noShowCount(int? t) { + _noShowCount.value = t; + return this; + } + CreateStaffVariablesBuilder cancellationCount(int? t) { + _cancellationCount.value = t; + return this; + } + CreateStaffVariablesBuilder reliabilityScore(int? t) { + _reliabilityScore.value = t; + return this; + } + CreateStaffVariablesBuilder bio(String? t) { + _bio.value = t; + return this; + } + CreateStaffVariablesBuilder industries(AnyValue? t) { + _industries.value = t; + return this; + } + CreateStaffVariablesBuilder preferredLocations(AnyValue? t) { + _preferredLocations.value = t; + return this; + } + CreateStaffVariablesBuilder maxDistanceMiles(int? t) { + _maxDistanceMiles.value = t; + return this; + } + CreateStaffVariablesBuilder languages(AnyValue? t) { + _languages.value = t; + return this; + } + CreateStaffVariablesBuilder itemsAttire(AnyValue? t) { + _itemsAttire.value = t; + return this; + } + CreateStaffVariablesBuilder xp(int? t) { + _xp.value = t; + return this; + } + CreateStaffVariablesBuilder badges(AnyValue? t) { + _badges.value = t; + return this; + } + CreateStaffVariablesBuilder isRecommended(bool? t) { + _isRecommended.value = t; + return this; + } + CreateStaffVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + CreateStaffVariablesBuilder department(DepartmentType? t) { + _department.value = t; + return this; + } + CreateStaffVariablesBuilder hubId(String? t) { + _hubId.value = t; + return this; + } + CreateStaffVariablesBuilder manager(String? t) { + _manager.value = t; + return this; + } + CreateStaffVariablesBuilder english(EnglishProficiency? t) { + _english.value = t; + return this; + } + CreateStaffVariablesBuilder backgroundCheckStatus(BackgroundCheckStatus? t) { + _backgroundCheckStatus.value = t; + return this; + } + CreateStaffVariablesBuilder employmentType(EmploymentType? t) { + _employmentType.value = t; + return this; + } + CreateStaffVariablesBuilder initial(String? t) { + _initial.value = t; + return this; + } + CreateStaffVariablesBuilder englishRequired(bool? t) { + _englishRequired.value = t; + return this; + } + CreateStaffVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + CreateStaffVariablesBuilder addres(String? t) { + _addres.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createStaff( + userId: userId, + fullName: fullName, +) +.level(level) +.role(role) +.phone(phone) +.email(email) +.photoUrl(photoUrl) +.totalShifts(totalShifts) +.averageRating(averageRating) +.onTimeRate(onTimeRate) +.noShowCount(noShowCount) +.cancellationCount(cancellationCount) +.reliabilityScore(reliabilityScore) +.bio(bio) +.industries(industries) +.preferredLocations(preferredLocations) +.maxDistanceMiles(maxDistanceMiles) +.languages(languages) +.itemsAttire(itemsAttire) +.xp(xp) +.badges(badges) +.isRecommended(isRecommended) +.ownerId(ownerId) +.department(department) +.hubId(hubId) +.manager(manager) +.english(english) +.backgroundCheckStatus(backgroundCheckStatus) +.employmentType(employmentType) +.initial(initial) +.englishRequired(englishRequired) +.city(city) +.addres(addres) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createStaff( + userId: userId, + fullName: fullName, +); +CreateStaffData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; +String fullName = ...; + +final ref = ExampleConnector.instance.createStaff( + userId: userId, + fullName: fullName, +).ref(); +ref.execute(); +``` + + +### UpdateStaff +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateStaff( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For UpdateStaff, we created `UpdateStaffBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateStaffVariablesBuilder { + ... + UpdateStaffVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + UpdateStaffVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + UpdateStaffVariablesBuilder level(String? t) { + _level.value = t; + return this; + } + UpdateStaffVariablesBuilder role(String? t) { + _role.value = t; + return this; + } + UpdateStaffVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateStaffVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateStaffVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + UpdateStaffVariablesBuilder totalShifts(int? t) { + _totalShifts.value = t; + return this; + } + UpdateStaffVariablesBuilder averageRating(double? t) { + _averageRating.value = t; + return this; + } + UpdateStaffVariablesBuilder onTimeRate(int? t) { + _onTimeRate.value = t; + return this; + } + UpdateStaffVariablesBuilder noShowCount(int? t) { + _noShowCount.value = t; + return this; + } + UpdateStaffVariablesBuilder cancellationCount(int? t) { + _cancellationCount.value = t; + return this; + } + UpdateStaffVariablesBuilder reliabilityScore(int? t) { + _reliabilityScore.value = t; + return this; + } + UpdateStaffVariablesBuilder bio(String? t) { + _bio.value = t; + return this; + } + UpdateStaffVariablesBuilder industries(AnyValue? t) { + _industries.value = t; + return this; + } + UpdateStaffVariablesBuilder preferredLocations(AnyValue? t) { + _preferredLocations.value = t; + return this; + } + UpdateStaffVariablesBuilder maxDistanceMiles(int? t) { + _maxDistanceMiles.value = t; + return this; + } + UpdateStaffVariablesBuilder languages(AnyValue? t) { + _languages.value = t; + return this; + } + UpdateStaffVariablesBuilder itemsAttire(AnyValue? t) { + _itemsAttire.value = t; + return this; + } + UpdateStaffVariablesBuilder xp(int? t) { + _xp.value = t; + return this; + } + UpdateStaffVariablesBuilder badges(AnyValue? t) { + _badges.value = t; + return this; + } + UpdateStaffVariablesBuilder isRecommended(bool? t) { + _isRecommended.value = t; + return this; + } + UpdateStaffVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + UpdateStaffVariablesBuilder department(DepartmentType? t) { + _department.value = t; + return this; + } + UpdateStaffVariablesBuilder hubId(String? t) { + _hubId.value = t; + return this; + } + UpdateStaffVariablesBuilder manager(String? t) { + _manager.value = t; + return this; + } + UpdateStaffVariablesBuilder english(EnglishProficiency? t) { + _english.value = t; + return this; + } + UpdateStaffVariablesBuilder backgroundCheckStatus(BackgroundCheckStatus? t) { + _backgroundCheckStatus.value = t; + return this; + } + UpdateStaffVariablesBuilder employmentType(EmploymentType? t) { + _employmentType.value = t; + return this; + } + UpdateStaffVariablesBuilder initial(String? t) { + _initial.value = t; + return this; + } + UpdateStaffVariablesBuilder englishRequired(bool? t) { + _englishRequired.value = t; + return this; + } + UpdateStaffVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateStaffVariablesBuilder addres(String? t) { + _addres.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateStaff( + id: id, +) +.userId(userId) +.fullName(fullName) +.level(level) +.role(role) +.phone(phone) +.email(email) +.photoUrl(photoUrl) +.totalShifts(totalShifts) +.averageRating(averageRating) +.onTimeRate(onTimeRate) +.noShowCount(noShowCount) +.cancellationCount(cancellationCount) +.reliabilityScore(reliabilityScore) +.bio(bio) +.industries(industries) +.preferredLocations(preferredLocations) +.maxDistanceMiles(maxDistanceMiles) +.languages(languages) +.itemsAttire(itemsAttire) +.xp(xp) +.badges(badges) +.isRecommended(isRecommended) +.ownerId(ownerId) +.department(department) +.hubId(hubId) +.manager(manager) +.english(english) +.backgroundCheckStatus(backgroundCheckStatus) +.employmentType(employmentType) +.initial(initial) +.englishRequired(englishRequired) +.city(city) +.addres(addres) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateStaff( + id: id, +); +UpdateStaffData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateStaff( + id: id, +).ref(); +ref.execute(); +``` + + +### DeleteStaff +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteStaff( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteStaff( + id: id, +); +DeleteStaffData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteStaff( + id: id, +).ref(); +ref.execute(); +``` + + +### createStaffDocument +#### Required Arguments +```dart +String staffId = ...; +String staffName = ...; +String documentId = ...; +DocumentStatus status = ...; +ExampleConnector.instance.createStaffDocument( + staffId: staffId, + staffName: staffName, + documentId: documentId, + status: status, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createStaffDocument, we created `createStaffDocumentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateStaffDocumentVariablesBuilder { + ... + CreateStaffDocumentVariablesBuilder documentUrl(String? t) { + _documentUrl.value = t; + return this; + } + CreateStaffDocumentVariablesBuilder expiryDate(Timestamp? t) { + _expiryDate.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createStaffDocument( + staffId: staffId, + staffName: staffName, + documentId: documentId, + status: status, +) +.documentUrl(documentUrl) +.expiryDate(expiryDate) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createStaffDocument( + staffId: staffId, + staffName: staffName, + documentId: documentId, + status: status, +); +createStaffDocumentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String staffName = ...; +String documentId = ...; +DocumentStatus status = ...; + +final ref = ExampleConnector.instance.createStaffDocument( + staffId: staffId, + staffName: staffName, + documentId: documentId, + status: status, +).ref(); +ref.execute(); +``` + + +### updateStaffDocument +#### Required Arguments +```dart +String staffId = ...; +String documentId = ...; +ExampleConnector.instance.updateStaffDocument( + staffId: staffId, + documentId: documentId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateStaffDocument, we created `updateStaffDocumentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateStaffDocumentVariablesBuilder { + ... + UpdateStaffDocumentVariablesBuilder status(DocumentStatus? t) { + _status.value = t; + return this; + } + UpdateStaffDocumentVariablesBuilder documentUrl(String? t) { + _documentUrl.value = t; + return this; + } + UpdateStaffDocumentVariablesBuilder expiryDate(Timestamp? t) { + _expiryDate.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateStaffDocument( + staffId: staffId, + documentId: documentId, +) +.status(status) +.documentUrl(documentUrl) +.expiryDate(expiryDate) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateStaffDocument( + staffId: staffId, + documentId: documentId, +); +updateStaffDocumentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String documentId = ...; + +final ref = ExampleConnector.instance.updateStaffDocument( + staffId: staffId, + documentId: documentId, +).ref(); +ref.execute(); +``` + + +### deleteStaffDocument +#### Required Arguments +```dart +String staffId = ...; +String documentId = ...; +ExampleConnector.instance.deleteStaffDocument( + staffId: staffId, + documentId: documentId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteStaffDocument( + staffId: staffId, + documentId: documentId, +); +deleteStaffDocumentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String documentId = ...; + +final ref = ExampleConnector.instance.deleteStaffDocument( + staffId: staffId, + documentId: documentId, +).ref(); +ref.execute(); +``` + + +### createStaffRole +#### Required Arguments +```dart +String staffId = ...; +String roleId = ...; +ExampleConnector.instance.createStaffRole( + staffId: staffId, + roleId: roleId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createStaffRole, we created `createStaffRoleBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateStaffRoleVariablesBuilder { + ... + CreateStaffRoleVariablesBuilder roleType(RoleType? t) { + _roleType.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createStaffRole( + staffId: staffId, + roleId: roleId, +) +.roleType(roleType) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createStaffRole( + staffId: staffId, + roleId: roleId, +); +createStaffRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.createStaffRole( + staffId: staffId, + roleId: roleId, +).ref(); +ref.execute(); +``` + + +### deleteStaffRole +#### Required Arguments +```dart +String staffId = ...; +String roleId = ...; +ExampleConnector.instance.deleteStaffRole( + staffId: staffId, + roleId: roleId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteStaffRole( + staffId: staffId, + roleId: roleId, +); +deleteStaffRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.deleteStaffRole( + staffId: staffId, + roleId: roleId, +).ref(); +ref.execute(); +``` + + +### CreateCertificate +#### Required Arguments +```dart +String name = ...; +CertificateStatus status = ...; +String staffId = ...; +ExampleConnector.instance.createCertificate( + name: name, + status: status, + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For CreateCertificate, we created `CreateCertificateBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateCertificateVariablesBuilder { + ... + CreateCertificateVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateCertificateVariablesBuilder expiry(Timestamp? t) { + _expiry.value = t; + return this; + } + CreateCertificateVariablesBuilder fileUrl(String? t) { + _fileUrl.value = t; + return this; + } + CreateCertificateVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + CreateCertificateVariablesBuilder certificationType(ComplianceType? t) { + _certificationType.value = t; + return this; + } + CreateCertificateVariablesBuilder issuer(String? t) { + _issuer.value = t; + return this; + } + CreateCertificateVariablesBuilder validationStatus(ValidationStatus? t) { + _validationStatus.value = t; + return this; + } + CreateCertificateVariablesBuilder certificateNumber(String? t) { + _certificateNumber.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createCertificate( + name: name, + status: status, + staffId: staffId, +) +.description(description) +.expiry(expiry) +.fileUrl(fileUrl) +.icon(icon) +.certificationType(certificationType) +.issuer(issuer) +.validationStatus(validationStatus) +.certificateNumber(certificateNumber) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createCertificate( + name: name, + status: status, + staffId: staffId, +); +CreateCertificateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; +CertificateStatus status = ...; +String staffId = ...; + +final ref = ExampleConnector.instance.createCertificate( + name: name, + status: status, + staffId: staffId, +).ref(); +ref.execute(); +``` + + +### UpdateCertificate +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateCertificate( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For UpdateCertificate, we created `UpdateCertificateBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateCertificateVariablesBuilder { + ... + UpdateCertificateVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateCertificateVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateCertificateVariablesBuilder expiry(Timestamp? t) { + _expiry.value = t; + return this; + } + UpdateCertificateVariablesBuilder status(CertificateStatus? t) { + _status.value = t; + return this; + } + UpdateCertificateVariablesBuilder fileUrl(String? t) { + _fileUrl.value = t; + return this; + } + UpdateCertificateVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + UpdateCertificateVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + UpdateCertificateVariablesBuilder certificationType(ComplianceType? t) { + _certificationType.value = t; + return this; + } + UpdateCertificateVariablesBuilder issuer(String? t) { + _issuer.value = t; + return this; + } + UpdateCertificateVariablesBuilder validationStatus(ValidationStatus? t) { + _validationStatus.value = t; + return this; + } + UpdateCertificateVariablesBuilder certificateNumber(String? t) { + _certificateNumber.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateCertificate( + id: id, +) +.name(name) +.description(description) +.expiry(expiry) +.status(status) +.fileUrl(fileUrl) +.icon(icon) +.staffId(staffId) +.certificationType(certificationType) +.issuer(issuer) +.validationStatus(validationStatus) +.certificateNumber(certificateNumber) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateCertificate( + id: id, +); +UpdateCertificateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateCertificate( + id: id, +).ref(); +ref.execute(); +``` + + +### DeleteCertificate +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteCertificate( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteCertificate( + id: id, +); +DeleteCertificateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteCertificate( + id: id, +).ref(); +ref.execute(); +``` + + +### createFaqData +#### Required Arguments +```dart +String category = ...; +ExampleConnector.instance.createFaqData( + category: category, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createFaqData, we created `createFaqDataBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateFaqDataVariablesBuilder { + ... + CreateFaqDataVariablesBuilder questions(List? t) { + _questions.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createFaqData( + category: category, +) +.questions(questions) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createFaqData( + category: category, +); +createFaqDataData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String category = ...; + +final ref = ExampleConnector.instance.createFaqData( + category: category, +).ref(); +ref.execute(); +``` + + +### updateFaqData +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateFaqData( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateFaqData, we created `updateFaqDataBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateFaqDataVariablesBuilder { + ... + UpdateFaqDataVariablesBuilder category(String? t) { + _category.value = t; + return this; + } + UpdateFaqDataVariablesBuilder questions(List? t) { + _questions.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateFaqData( + id: id, +) +.category(category) +.questions(questions) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateFaqData( + id: id, +); +updateFaqDataData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateFaqData( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteFaqData +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteFaqData( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteFaqData( + id: id, +); +deleteFaqDataData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteFaqData( + id: id, +).ref(); +ref.execute(); +``` + + +### createStaffAvailabilityStats +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.createStaffAvailabilityStats( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createStaffAvailabilityStats, we created `createStaffAvailabilityStatsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateStaffAvailabilityStatsVariablesBuilder { + ... + CreateStaffAvailabilityStatsVariablesBuilder needWorkIndex(int? t) { + _needWorkIndex.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder utilizationPercentage(int? t) { + _utilizationPercentage.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder predictedAvailabilityScore(int? t) { + _predictedAvailabilityScore.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder scheduledHoursThisPeriod(int? t) { + _scheduledHoursThisPeriod.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder desiredHoursThisPeriod(int? t) { + _desiredHoursThisPeriod.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder lastShiftDate(Timestamp? t) { + _lastShiftDate.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder acceptanceRate(int? t) { + _acceptanceRate.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createStaffAvailabilityStats( + staffId: staffId, +) +.needWorkIndex(needWorkIndex) +.utilizationPercentage(utilizationPercentage) +.predictedAvailabilityScore(predictedAvailabilityScore) +.scheduledHoursThisPeriod(scheduledHoursThisPeriod) +.desiredHoursThisPeriod(desiredHoursThisPeriod) +.lastShiftDate(lastShiftDate) +.acceptanceRate(acceptanceRate) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createStaffAvailabilityStats( + staffId: staffId, +); +createStaffAvailabilityStatsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.createStaffAvailabilityStats( + staffId: staffId, +).ref(); +ref.execute(); +``` + + +### updateStaffAvailabilityStats +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.updateStaffAvailabilityStats( + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateStaffAvailabilityStats, we created `updateStaffAvailabilityStatsBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateStaffAvailabilityStatsVariablesBuilder { + ... + UpdateStaffAvailabilityStatsVariablesBuilder needWorkIndex(int? t) { + _needWorkIndex.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder utilizationPercentage(int? t) { + _utilizationPercentage.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder predictedAvailabilityScore(int? t) { + _predictedAvailabilityScore.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder scheduledHoursThisPeriod(int? t) { + _scheduledHoursThisPeriod.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder desiredHoursThisPeriod(int? t) { + _desiredHoursThisPeriod.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder lastShiftDate(Timestamp? t) { + _lastShiftDate.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder acceptanceRate(int? t) { + _acceptanceRate.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateStaffAvailabilityStats( + staffId: staffId, +) +.needWorkIndex(needWorkIndex) +.utilizationPercentage(utilizationPercentage) +.predictedAvailabilityScore(predictedAvailabilityScore) +.scheduledHoursThisPeriod(scheduledHoursThisPeriod) +.desiredHoursThisPeriod(desiredHoursThisPeriod) +.lastShiftDate(lastShiftDate) +.acceptanceRate(acceptanceRate) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateStaffAvailabilityStats( + staffId: staffId, +); +updateStaffAvailabilityStatsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.updateStaffAvailabilityStats( + staffId: staffId, +).ref(); +ref.execute(); +``` + + +### deleteStaffAvailabilityStats +#### Required Arguments +```dart +String staffId = ...; +ExampleConnector.instance.deleteStaffAvailabilityStats( + staffId: staffId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteStaffAvailabilityStats( + staffId: staffId, +); +deleteStaffAvailabilityStatsData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; + +final ref = ExampleConnector.instance.deleteStaffAvailabilityStats( + staffId: staffId, +).ref(); +ref.execute(); +``` + + +### createActivityLog +#### Required Arguments +```dart +String userId = ...; +Timestamp date = ...; +String title = ...; +String description = ...; +ActivityType activityType = ...; +ExampleConnector.instance.createActivityLog( + userId: userId, + date: date, + title: title, + description: description, + activityType: activityType, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createActivityLog, we created `createActivityLogBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateActivityLogVariablesBuilder { + ... + CreateActivityLogVariablesBuilder hourStart(String? t) { + _hourStart.value = t; + return this; + } + CreateActivityLogVariablesBuilder hourEnd(String? t) { + _hourEnd.value = t; + return this; + } + CreateActivityLogVariablesBuilder totalhours(String? t) { + _totalhours.value = t; + return this; + } + CreateActivityLogVariablesBuilder iconType(ActivityIconType? t) { + _iconType.value = t; + return this; + } + CreateActivityLogVariablesBuilder iconColor(String? t) { + _iconColor.value = t; + return this; + } + CreateActivityLogVariablesBuilder isRead(bool? t) { + _isRead.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createActivityLog( + userId: userId, + date: date, + title: title, + description: description, + activityType: activityType, +) +.hourStart(hourStart) +.hourEnd(hourEnd) +.totalhours(totalhours) +.iconType(iconType) +.iconColor(iconColor) +.isRead(isRead) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createActivityLog( + userId: userId, + date: date, + title: title, + description: description, + activityType: activityType, +); +createActivityLogData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String userId = ...; +Timestamp date = ...; +String title = ...; +String description = ...; +ActivityType activityType = ...; + +final ref = ExampleConnector.instance.createActivityLog( + userId: userId, + date: date, + title: title, + description: description, + activityType: activityType, +).ref(); +ref.execute(); +``` + + +### updateActivityLog +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateActivityLog( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateActivityLog, we created `updateActivityLogBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateActivityLogVariablesBuilder { + ... + UpdateActivityLogVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + UpdateActivityLogVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + UpdateActivityLogVariablesBuilder hourStart(String? t) { + _hourStart.value = t; + return this; + } + UpdateActivityLogVariablesBuilder hourEnd(String? t) { + _hourEnd.value = t; + return this; + } + UpdateActivityLogVariablesBuilder totalhours(String? t) { + _totalhours.value = t; + return this; + } + UpdateActivityLogVariablesBuilder iconType(ActivityIconType? t) { + _iconType.value = t; + return this; + } + UpdateActivityLogVariablesBuilder iconColor(String? t) { + _iconColor.value = t; + return this; + } + UpdateActivityLogVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateActivityLogVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateActivityLogVariablesBuilder isRead(bool? t) { + _isRead.value = t; + return this; + } + UpdateActivityLogVariablesBuilder activityType(ActivityType? t) { + _activityType.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateActivityLog( + id: id, +) +.userId(userId) +.date(date) +.hourStart(hourStart) +.hourEnd(hourEnd) +.totalhours(totalhours) +.iconType(iconType) +.iconColor(iconColor) +.title(title) +.description(description) +.isRead(isRead) +.activityType(activityType) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateActivityLog( + id: id, +); +updateActivityLogData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateActivityLog( + id: id, +).ref(); +ref.execute(); +``` + + +### markActivityLogAsRead +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.markActivityLogAsRead( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.markActivityLogAsRead( + id: id, +); +markActivityLogAsReadData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.markActivityLogAsRead( + id: id, +).ref(); +ref.execute(); +``` + + +### markActivityLogsAsRead +#### Required Arguments +```dart +String ids = ...; +ExampleConnector.instance.markActivityLogsAsRead( + ids: ids, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.markActivityLogsAsRead( + ids: ids, +); +markActivityLogsAsReadData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String ids = ...; + +final ref = ExampleConnector.instance.markActivityLogsAsRead( + ids: ids, +).ref(); +ref.execute(); +``` + + +### deleteActivityLog +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteActivityLog( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteActivityLog( + id: id, +); +deleteActivityLogData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteActivityLog( + id: id, +).ref(); +ref.execute(); +``` + + +### createStaffAvailability +#### Required Arguments +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; +ExampleConnector.instance.createStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createStaffAvailability, we created `createStaffAvailabilityBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateStaffAvailabilityVariablesBuilder { + ... + CreateStaffAvailabilityVariablesBuilder status(AvailabilityStatus? t) { + _status.value = t; + return this; + } + CreateStaffAvailabilityVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +) +.status(status) +.notes(notes) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +); +createStaffAvailabilityData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; + +final ref = ExampleConnector.instance.createStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +).ref(); +ref.execute(); +``` + + +### updateStaffAvailability +#### Required Arguments +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; +ExampleConnector.instance.updateStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateStaffAvailability, we created `updateStaffAvailabilityBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateStaffAvailabilityVariablesBuilder { + ... + UpdateStaffAvailabilityVariablesBuilder status(AvailabilityStatus? t) { + _status.value = t; + return this; + } + UpdateStaffAvailabilityVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +) +.status(status) +.notes(notes) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +); +updateStaffAvailabilityData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; + +final ref = ExampleConnector.instance.updateStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +).ref(); +ref.execute(); +``` + + +### deleteStaffAvailability +#### Required Arguments +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; +ExampleConnector.instance.deleteStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +); +deleteStaffAvailabilityData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +DayOfWeek day = ...; +AvailabilitySlot slot = ...; + +final ref = ExampleConnector.instance.deleteStaffAvailability( + staffId: staffId, + day: day, + slot: slot, +).ref(); +ref.execute(); +``` + + +### createTeamHub +#### Required Arguments +```dart +String teamId = ...; +String hubName = ...; +String address = ...; +String city = ...; +String state = ...; +String zipCode = ...; +String managerName = ...; +ExampleConnector.instance.createTeamHub( + teamId: teamId, + hubName: hubName, + address: address, + city: city, + state: state, + zipCode: zipCode, + managerName: managerName, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createTeamHub, we created `createTeamHubBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateTeamHubVariablesBuilder { + ... + CreateTeamHubVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateTeamHubVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createTeamHub( + teamId: teamId, + hubName: hubName, + address: address, + city: city, + state: state, + zipCode: zipCode, + managerName: managerName, +) +.isActive(isActive) +.departments(departments) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createTeamHub( + teamId: teamId, + hubName: hubName, + address: address, + city: city, + state: state, + zipCode: zipCode, + managerName: managerName, +); +createTeamHubData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamId = ...; +String hubName = ...; +String address = ...; +String city = ...; +String state = ...; +String zipCode = ...; +String managerName = ...; + +final ref = ExampleConnector.instance.createTeamHub( + teamId: teamId, + hubName: hubName, + address: address, + city: city, + state: state, + zipCode: zipCode, + managerName: managerName, +).ref(); +ref.execute(); +``` + + +### updateTeamHub +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateTeamHub( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateTeamHub, we created `updateTeamHubBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateTeamHubVariablesBuilder { + ... + UpdateTeamHubVariablesBuilder hubName(String? t) { + _hubName.value = t; + return this; + } + UpdateTeamHubVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateTeamHubVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateTeamHubVariablesBuilder state(String? t) { + _state.value = t; + return this; + } + UpdateTeamHubVariablesBuilder zipCode(String? t) { + _zipCode.value = t; + return this; + } + UpdateTeamHubVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + UpdateTeamHubVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateTeamHubVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateTeamHub( + id: id, +) +.hubName(hubName) +.address(address) +.city(city) +.state(state) +.zipCode(zipCode) +.managerName(managerName) +.isActive(isActive) +.departments(departments) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTeamHub( + id: id, +); +updateTeamHubData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateTeamHub( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteTeamHub +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteTeamHub( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteTeamHub( + id: id, +); +deleteTeamHubData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteTeamHub( + id: id, +).ref(); +ref.execute(); +``` + + +### createUserConversation +#### Required Arguments +```dart +String conversationId = ...; +String userId = ...; +ExampleConnector.instance.createUserConversation( + conversationId: conversationId, + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createUserConversation, we created `createUserConversationBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateUserConversationVariablesBuilder { + ... + CreateUserConversationVariablesBuilder unreadCount(int? t) { + _unreadCount.value = t; + return this; + } + CreateUserConversationVariablesBuilder lastReadAt(Timestamp? t) { + _lastReadAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createUserConversation( + conversationId: conversationId, + userId: userId, +) +.unreadCount(unreadCount) +.lastReadAt(lastReadAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createUserConversation( + conversationId: conversationId, + userId: userId, +); +createUserConversationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; +String userId = ...; + +final ref = ExampleConnector.instance.createUserConversation( + conversationId: conversationId, + userId: userId, +).ref(); +ref.execute(); +``` + + +### updateUserConversation +#### Required Arguments +```dart +String conversationId = ...; +String userId = ...; +ExampleConnector.instance.updateUserConversation( + conversationId: conversationId, + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateUserConversation, we created `updateUserConversationBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateUserConversationVariablesBuilder { + ... + UpdateUserConversationVariablesBuilder unreadCount(int? t) { + _unreadCount.value = t; + return this; + } + UpdateUserConversationVariablesBuilder lastReadAt(Timestamp? t) { + _lastReadAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateUserConversation( + conversationId: conversationId, + userId: userId, +) +.unreadCount(unreadCount) +.lastReadAt(lastReadAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateUserConversation( + conversationId: conversationId, + userId: userId, +); +updateUserConversationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; +String userId = ...; + +final ref = ExampleConnector.instance.updateUserConversation( + conversationId: conversationId, + userId: userId, +).ref(); +ref.execute(); +``` + + +### markConversationAsRead +#### Required Arguments +```dart +String conversationId = ...; +String userId = ...; +ExampleConnector.instance.markConversationAsRead( + conversationId: conversationId, + userId: userId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For markConversationAsRead, we created `markConversationAsReadBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class MarkConversationAsReadVariablesBuilder { + ... + MarkConversationAsReadVariablesBuilder lastReadAt(Timestamp? t) { + _lastReadAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.markConversationAsRead( + conversationId: conversationId, + userId: userId, +) +.lastReadAt(lastReadAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.markConversationAsRead( + conversationId: conversationId, + userId: userId, +); +markConversationAsReadData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; +String userId = ...; + +final ref = ExampleConnector.instance.markConversationAsRead( + conversationId: conversationId, + userId: userId, +).ref(); +ref.execute(); +``` + + +### incrementUnreadForUser +#### Required Arguments +```dart +String conversationId = ...; +String userId = ...; +int unreadCount = ...; +ExampleConnector.instance.incrementUnreadForUser( + conversationId: conversationId, + userId: userId, + unreadCount: unreadCount, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.incrementUnreadForUser( + conversationId: conversationId, + userId: userId, + unreadCount: unreadCount, +); +incrementUnreadForUserData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; +String userId = ...; +int unreadCount = ...; + +final ref = ExampleConnector.instance.incrementUnreadForUser( + conversationId: conversationId, + userId: userId, + unreadCount: unreadCount, +).ref(); +ref.execute(); +``` + + +### deleteUserConversation +#### Required Arguments +```dart +String conversationId = ...; +String userId = ...; +ExampleConnector.instance.deleteUserConversation( + conversationId: conversationId, + userId: userId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteUserConversation( + conversationId: conversationId, + userId: userId, +); +deleteUserConversationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; +String userId = ...; + +final ref = ExampleConnector.instance.deleteUserConversation( + conversationId: conversationId, + userId: userId, +).ref(); +ref.execute(); +``` + + +### createMemberTask +#### Required Arguments +```dart +String teamMemberId = ...; +String taskId = ...; +ExampleConnector.instance.createMemberTask( + teamMemberId: teamMemberId, + taskId: taskId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createMemberTask( + teamMemberId: teamMemberId, + taskId: taskId, +); +createMemberTaskData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamMemberId = ...; +String taskId = ...; + +final ref = ExampleConnector.instance.createMemberTask( + teamMemberId: teamMemberId, + taskId: taskId, +).ref(); +ref.execute(); +``` + + +### deleteMemberTask +#### Required Arguments +```dart +String teamMemberId = ...; +String taskId = ...; +ExampleConnector.instance.deleteMemberTask( + teamMemberId: teamMemberId, + taskId: taskId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteMemberTask( + teamMemberId: teamMemberId, + taskId: taskId, +); +deleteMemberTaskData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String teamMemberId = ...; +String taskId = ...; + +final ref = ExampleConnector.instance.deleteMemberTask( + teamMemberId: teamMemberId, + taskId: taskId, +).ref(); +ref.execute(); +``` + + +### createTask +#### Required Arguments +```dart +String taskName = ...; +TaskPriority priority = ...; +TaskStatus status = ...; +String ownerId = ...; +ExampleConnector.instance.createTask( + taskName: taskName, + priority: priority, + status: status, + ownerId: ownerId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createTask, we created `createTaskBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateTaskVariablesBuilder { + ... + CreateTaskVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateTaskVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + CreateTaskVariablesBuilder progress(int? t) { + _progress.value = t; + return this; + } + CreateTaskVariablesBuilder orderIndex(int? t) { + _orderIndex.value = t; + return this; + } + CreateTaskVariablesBuilder commentCount(int? t) { + _commentCount.value = t; + return this; + } + CreateTaskVariablesBuilder attachmentCount(int? t) { + _attachmentCount.value = t; + return this; + } + CreateTaskVariablesBuilder files(AnyValue? t) { + _files.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createTask( + taskName: taskName, + priority: priority, + status: status, + ownerId: ownerId, +) +.description(description) +.dueDate(dueDate) +.progress(progress) +.orderIndex(orderIndex) +.commentCount(commentCount) +.attachmentCount(attachmentCount) +.files(files) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createTask( + taskName: taskName, + priority: priority, + status: status, + ownerId: ownerId, +); +createTaskData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String taskName = ...; +TaskPriority priority = ...; +TaskStatus status = ...; +String ownerId = ...; + +final ref = ExampleConnector.instance.createTask( + taskName: taskName, + priority: priority, + status: status, + ownerId: ownerId, +).ref(); +ref.execute(); +``` + + +### updateTask +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateTask( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateTask, we created `updateTaskBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateTaskVariablesBuilder { + ... + UpdateTaskVariablesBuilder taskName(String? t) { + _taskName.value = t; + return this; + } + UpdateTaskVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateTaskVariablesBuilder priority(TaskPriority? t) { + _priority.value = t; + return this; + } + UpdateTaskVariablesBuilder status(TaskStatus? t) { + _status.value = t; + return this; + } + UpdateTaskVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + UpdateTaskVariablesBuilder progress(int? t) { + _progress.value = t; + return this; + } + UpdateTaskVariablesBuilder assignedMembers(AnyValue? t) { + _assignedMembers.value = t; + return this; + } + UpdateTaskVariablesBuilder orderIndex(int? t) { + _orderIndex.value = t; + return this; + } + UpdateTaskVariablesBuilder commentCount(int? t) { + _commentCount.value = t; + return this; + } + UpdateTaskVariablesBuilder attachmentCount(int? t) { + _attachmentCount.value = t; + return this; + } + UpdateTaskVariablesBuilder files(AnyValue? t) { + _files.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateTask( + id: id, +) +.taskName(taskName) +.description(description) +.priority(priority) +.status(status) +.dueDate(dueDate) +.progress(progress) +.assignedMembers(assignedMembers) +.orderIndex(orderIndex) +.commentCount(commentCount) +.attachmentCount(attachmentCount) +.files(files) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTask( + id: id, +); +updateTaskData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateTask( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteTask +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteTask( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteTask( + id: id, +); +deleteTaskData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteTask( + id: id, +).ref(); +ref.execute(); +``` + + +### createVendorBenefitPlan +#### Required Arguments +```dart +String vendorId = ...; +String title = ...; +ExampleConnector.instance.createVendorBenefitPlan( + vendorId: vendorId, + title: title, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createVendorBenefitPlan, we created `createVendorBenefitPlanBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateVendorBenefitPlanVariablesBuilder { + ... + CreateVendorBenefitPlanVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder requestLabel(String? t) { + _requestLabel.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder total(int? t) { + _total.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createVendorBenefitPlan( + vendorId: vendorId, + title: title, +) +.description(description) +.requestLabel(requestLabel) +.total(total) +.isActive(isActive) +.createdBy(createdBy) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createVendorBenefitPlan( + vendorId: vendorId, + title: title, +); +createVendorBenefitPlanData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +String title = ...; + +final ref = ExampleConnector.instance.createVendorBenefitPlan( + vendorId: vendorId, + title: title, +).ref(); +ref.execute(); +``` + + +### updateVendorBenefitPlan +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateVendorBenefitPlan( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateVendorBenefitPlan, we created `updateVendorBenefitPlanBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateVendorBenefitPlanVariablesBuilder { + ... + UpdateVendorBenefitPlanVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder requestLabel(String? t) { + _requestLabel.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder total(int? t) { + _total.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateVendorBenefitPlan( + id: id, +) +.vendorId(vendorId) +.title(title) +.description(description) +.requestLabel(requestLabel) +.total(total) +.isActive(isActive) +.createdBy(createdBy) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateVendorBenefitPlan( + id: id, +); +updateVendorBenefitPlanData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateVendorBenefitPlan( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteVendorBenefitPlan +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteVendorBenefitPlan( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteVendorBenefitPlan( + id: id, +); +deleteVendorBenefitPlanData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteVendorBenefitPlan( + id: id, +).ref(); +ref.execute(); +``` + + +### createTaskComment +#### Required Arguments +```dart +String taskId = ...; +String teamMemberId = ...; +String comment = ...; +ExampleConnector.instance.createTaskComment( + taskId: taskId, + teamMemberId: teamMemberId, + comment: comment, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createTaskComment, we created `createTaskCommentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateTaskCommentVariablesBuilder { + ... + CreateTaskCommentVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createTaskComment( + taskId: taskId, + teamMemberId: teamMemberId, + comment: comment, +) +.isSystem(isSystem) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createTaskComment( + taskId: taskId, + teamMemberId: teamMemberId, + comment: comment, +); +createTaskCommentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String taskId = ...; +String teamMemberId = ...; +String comment = ...; + +final ref = ExampleConnector.instance.createTaskComment( + taskId: taskId, + teamMemberId: teamMemberId, + comment: comment, +).ref(); +ref.execute(); +``` + + +### updateTaskComment +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateTaskComment( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateTaskComment, we created `updateTaskCommentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateTaskCommentVariablesBuilder { + ... + UpdateTaskCommentVariablesBuilder comment(String? t) { + _comment.value = t; + return this; + } + UpdateTaskCommentVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateTaskComment( + id: id, +) +.comment(comment) +.isSystem(isSystem) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTaskComment( + id: id, +); +updateTaskCommentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateTaskComment( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteTaskComment +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteTaskComment( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteTaskComment( + id: id, +); +deleteTaskCommentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteTaskComment( + id: id, +).ref(); +ref.execute(); +``` + + +### createTaxForm +#### Required Arguments +```dart +TaxFormType formType = ...; +String title = ...; +String staffId = ...; +ExampleConnector.instance.createTaxForm( + formType: formType, + title: title, + staffId: staffId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createTaxForm, we created `createTaxFormBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateTaxFormVariablesBuilder { + ... + CreateTaxFormVariablesBuilder subtitle(String? t) { + _subtitle.value = t; + return this; + } + CreateTaxFormVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateTaxFormVariablesBuilder status(TaxFormStatus? t) { + _status.value = t; + return this; + } + CreateTaxFormVariablesBuilder formData(AnyValue? t) { + _formData.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createTaxForm( + formType: formType, + title: title, + staffId: staffId, +) +.subtitle(subtitle) +.description(description) +.status(status) +.formData(formData) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createTaxForm( + formType: formType, + title: title, + staffId: staffId, +); +createTaxFormData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +TaxFormType formType = ...; +String title = ...; +String staffId = ...; + +final ref = ExampleConnector.instance.createTaxForm( + formType: formType, + title: title, + staffId: staffId, +).ref(); +ref.execute(); +``` + + +### updateTaxForm +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateTaxForm( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateTaxForm, we created `updateTaxFormBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateTaxFormVariablesBuilder { + ... + UpdateTaxFormVariablesBuilder status(TaxFormStatus? t) { + _status.value = t; + return this; + } + UpdateTaxFormVariablesBuilder formData(AnyValue? t) { + _formData.value = t; + return this; + } + UpdateTaxFormVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateTaxFormVariablesBuilder subtitle(String? t) { + _subtitle.value = t; + return this; + } + UpdateTaxFormVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateTaxForm( + id: id, +) +.status(status) +.formData(formData) +.title(title) +.subtitle(subtitle) +.description(description) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateTaxForm( + id: id, +); +updateTaxFormData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateTaxForm( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteTaxForm +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteTaxForm( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteTaxForm( + id: id, +); +deleteTaxFormData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteTaxForm( + id: id, +).ref(); +ref.execute(); +``` + + +### createMessage +#### Required Arguments +```dart +String conversationId = ...; +String senderId = ...; +String content = ...; +ExampleConnector.instance.createMessage( + conversationId: conversationId, + senderId: senderId, + content: content, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createMessage, we created `createMessageBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateMessageVariablesBuilder { + ... + CreateMessageVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createMessage( + conversationId: conversationId, + senderId: senderId, + content: content, +) +.isSystem(isSystem) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createMessage( + conversationId: conversationId, + senderId: senderId, + content: content, +); +createMessageData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String conversationId = ...; +String senderId = ...; +String content = ...; + +final ref = ExampleConnector.instance.createMessage( + conversationId: conversationId, + senderId: senderId, + content: content, +).ref(); +ref.execute(); +``` + + +### updateMessage +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateMessage( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateMessage, we created `updateMessageBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateMessageVariablesBuilder { + ... + UpdateMessageVariablesBuilder conversationId(String? t) { + _conversationId.value = t; + return this; + } + UpdateMessageVariablesBuilder senderId(String? t) { + _senderId.value = t; + return this; + } + UpdateMessageVariablesBuilder content(String? t) { + _content.value = t; + return this; + } + UpdateMessageVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateMessage( + id: id, +) +.conversationId(conversationId) +.senderId(senderId) +.content(content) +.isSystem(isSystem) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateMessage( + id: id, +); +updateMessageData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateMessage( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteMessage +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteMessage( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteMessage( + id: id, +); +deleteMessageData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteMessage( + id: id, +).ref(); +ref.execute(); +``` + + +### createApplication +#### Required Arguments +```dart +String shiftId = ...; +String staffId = ...; +ApplicationStatus status = ...; +ApplicationOrigin origin = ...; +String roleId = ...; +ExampleConnector.instance.createApplication( + shiftId: shiftId, + staffId: staffId, + status: status, + origin: origin, + roleId: roleId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createApplication, we created `createApplicationBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateApplicationVariablesBuilder { + ... + CreateApplicationVariablesBuilder checkInTime(Timestamp? t) { + _checkInTime.value = t; + return this; + } + CreateApplicationVariablesBuilder checkOutTime(Timestamp? t) { + _checkOutTime.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createApplication( + shiftId: shiftId, + staffId: staffId, + status: status, + origin: origin, + roleId: roleId, +) +.checkInTime(checkInTime) +.checkOutTime(checkOutTime) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createApplication( + shiftId: shiftId, + staffId: staffId, + status: status, + origin: origin, + roleId: roleId, +); +createApplicationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String shiftId = ...; +String staffId = ...; +ApplicationStatus status = ...; +ApplicationOrigin origin = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.createApplication( + shiftId: shiftId, + staffId: staffId, + status: status, + origin: origin, + roleId: roleId, +).ref(); +ref.execute(); +``` + + +### updateApplicationStatus +#### Required Arguments +```dart +String id = ...; +String roleId = ...; +ExampleConnector.instance.updateApplicationStatus( + id: id, + roleId: roleId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateApplicationStatus, we created `updateApplicationStatusBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateApplicationStatusVariablesBuilder { + ... + UpdateApplicationStatusVariablesBuilder shiftId(String? t) { + _shiftId.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder status(ApplicationStatus? t) { + _status.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder checkInTime(Timestamp? t) { + _checkInTime.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder checkOutTime(Timestamp? t) { + _checkOutTime.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateApplicationStatus( + id: id, + roleId: roleId, +) +.shiftId(shiftId) +.staffId(staffId) +.status(status) +.checkInTime(checkInTime) +.checkOutTime(checkOutTime) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateApplicationStatus( + id: id, + roleId: roleId, +); +updateApplicationStatusData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; +String roleId = ...; + +final ref = ExampleConnector.instance.updateApplicationStatus( + id: id, + roleId: roleId, +).ref(); +ref.execute(); +``` + + +### deleteApplication +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteApplication( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteApplication( + id: id, +); +deleteApplicationData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteApplication( + id: id, +).ref(); +ref.execute(); +``` + + +### CreateAssignment +#### Required Arguments +```dart +String workforceId = ...; +String roleId = ...; +String shiftId = ...; +ExampleConnector.instance.createAssignment( + workforceId: workforceId, + roleId: roleId, + shiftId: shiftId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For CreateAssignment, we created `CreateAssignmentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateAssignmentVariablesBuilder { + ... + CreateAssignmentVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + CreateAssignmentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateAssignmentVariablesBuilder instructions(String? t) { + _instructions.value = t; + return this; + } + CreateAssignmentVariablesBuilder status(AssignmentStatus? t) { + _status.value = t; + return this; + } + CreateAssignmentVariablesBuilder tipsAvailable(bool? t) { + _tipsAvailable.value = t; + return this; + } + CreateAssignmentVariablesBuilder travelTime(bool? t) { + _travelTime.value = t; + return this; + } + CreateAssignmentVariablesBuilder mealProvided(bool? t) { + _mealProvided.value = t; + return this; + } + CreateAssignmentVariablesBuilder parkingAvailable(bool? t) { + _parkingAvailable.value = t; + return this; + } + CreateAssignmentVariablesBuilder gasCompensation(bool? t) { + _gasCompensation.value = t; + return this; + } + CreateAssignmentVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createAssignment( + workforceId: workforceId, + roleId: roleId, + shiftId: shiftId, +) +.title(title) +.description(description) +.instructions(instructions) +.status(status) +.tipsAvailable(tipsAvailable) +.travelTime(travelTime) +.mealProvided(mealProvided) +.parkingAvailable(parkingAvailable) +.gasCompensation(gasCompensation) +.managers(managers) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createAssignment( + workforceId: workforceId, + roleId: roleId, + shiftId: shiftId, +); +CreateAssignmentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String workforceId = ...; +String roleId = ...; +String shiftId = ...; + +final ref = ExampleConnector.instance.createAssignment( + workforceId: workforceId, + roleId: roleId, + shiftId: shiftId, +).ref(); +ref.execute(); +``` + + +### UpdateAssignment +#### Required Arguments +```dart +String id = ...; +String roleId = ...; +String shiftId = ...; +ExampleConnector.instance.updateAssignment( + id: id, + roleId: roleId, + shiftId: shiftId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For UpdateAssignment, we created `UpdateAssignmentBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateAssignmentVariablesBuilder { + ... + UpdateAssignmentVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateAssignmentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateAssignmentVariablesBuilder instructions(String? t) { + _instructions.value = t; + return this; + } + UpdateAssignmentVariablesBuilder status(AssignmentStatus? t) { + _status.value = t; + return this; + } + UpdateAssignmentVariablesBuilder tipsAvailable(bool? t) { + _tipsAvailable.value = t; + return this; + } + UpdateAssignmentVariablesBuilder travelTime(bool? t) { + _travelTime.value = t; + return this; + } + UpdateAssignmentVariablesBuilder mealProvided(bool? t) { + _mealProvided.value = t; + return this; + } + UpdateAssignmentVariablesBuilder parkingAvailable(bool? t) { + _parkingAvailable.value = t; + return this; + } + UpdateAssignmentVariablesBuilder gasCompensation(bool? t) { + _gasCompensation.value = t; + return this; + } + UpdateAssignmentVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateAssignment( + id: id, + roleId: roleId, + shiftId: shiftId, +) +.title(title) +.description(description) +.instructions(instructions) +.status(status) +.tipsAvailable(tipsAvailable) +.travelTime(travelTime) +.mealProvided(mealProvided) +.parkingAvailable(parkingAvailable) +.gasCompensation(gasCompensation) +.managers(managers) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateAssignment( + id: id, + roleId: roleId, + shiftId: shiftId, +); +UpdateAssignmentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; +String roleId = ...; +String shiftId = ...; + +final ref = ExampleConnector.instance.updateAssignment( + id: id, + roleId: roleId, + shiftId: shiftId, +).ref(); +ref.execute(); +``` + + +### DeleteAssignment +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteAssignment( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteAssignment( + id: id, +); +DeleteAssignmentData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteAssignment( + id: id, +).ref(); +ref.execute(); +``` + + +### createBenefitsData +#### Required Arguments +```dart +String vendorBenefitPlanId = ...; +String staffId = ...; +int current = ...; +ExampleConnector.instance.createBenefitsData( + vendorBenefitPlanId: vendorBenefitPlanId, + staffId: staffId, + current: current, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createBenefitsData( + vendorBenefitPlanId: vendorBenefitPlanId, + staffId: staffId, + current: current, +); +createBenefitsDataData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorBenefitPlanId = ...; +String staffId = ...; +int current = ...; + +final ref = ExampleConnector.instance.createBenefitsData( + vendorBenefitPlanId: vendorBenefitPlanId, + staffId: staffId, + current: current, +).ref(); +ref.execute(); +``` + + +### updateBenefitsData +#### Required Arguments +```dart +String staffId = ...; +String vendorBenefitPlanId = ...; +ExampleConnector.instance.updateBenefitsData( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateBenefitsData, we created `updateBenefitsDataBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateBenefitsDataVariablesBuilder { + ... + UpdateBenefitsDataVariablesBuilder current(int? t) { + _current.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateBenefitsData( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +) +.current(current) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateBenefitsData( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +); +updateBenefitsDataData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String vendorBenefitPlanId = ...; + +final ref = ExampleConnector.instance.updateBenefitsData( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +).ref(); +ref.execute(); +``` + + +### deleteBenefitsData +#### Required Arguments +```dart +String staffId = ...; +String vendorBenefitPlanId = ...; +ExampleConnector.instance.deleteBenefitsData( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteBenefitsData( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +); +deleteBenefitsDataData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String vendorBenefitPlanId = ...; + +final ref = ExampleConnector.instance.deleteBenefitsData( + staffId: staffId, + vendorBenefitPlanId: vendorBenefitPlanId, +).ref(); +ref.execute(); +``` + + +### createCustomRateCard +#### Required Arguments +```dart +String name = ...; +ExampleConnector.instance.createCustomRateCard( + name: name, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createCustomRateCard, we created `createCustomRateCardBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateCustomRateCardVariablesBuilder { + ... + CreateCustomRateCardVariablesBuilder baseBook(String? t) { + _baseBook.value = t; + return this; + } + CreateCustomRateCardVariablesBuilder discount(double? t) { + _discount.value = t; + return this; + } + CreateCustomRateCardVariablesBuilder isDefault(bool? t) { + _isDefault.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createCustomRateCard( + name: name, +) +.baseBook(baseBook) +.discount(discount) +.isDefault(isDefault) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createCustomRateCard( + name: name, +); +createCustomRateCardData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; + +final ref = ExampleConnector.instance.createCustomRateCard( + name: name, +).ref(); +ref.execute(); +``` + + +### updateCustomRateCard +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateCustomRateCard( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateCustomRateCard, we created `updateCustomRateCardBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateCustomRateCardVariablesBuilder { + ... + UpdateCustomRateCardVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateCustomRateCardVariablesBuilder baseBook(String? t) { + _baseBook.value = t; + return this; + } + UpdateCustomRateCardVariablesBuilder discount(double? t) { + _discount.value = t; + return this; + } + UpdateCustomRateCardVariablesBuilder isDefault(bool? t) { + _isDefault.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateCustomRateCard( + id: id, +) +.name(name) +.baseBook(baseBook) +.discount(discount) +.isDefault(isDefault) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateCustomRateCard( + id: id, +); +updateCustomRateCardData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateCustomRateCard( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteCustomRateCard +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteCustomRateCard( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteCustomRateCard( + id: id, +); +deleteCustomRateCardData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteCustomRateCard( + id: id, +).ref(); +ref.execute(); +``` + + +### createRoleCategory +#### Required Arguments +```dart +String roleName = ...; +RoleCategoryType category = ...; +ExampleConnector.instance.createRoleCategory( + roleName: roleName, + category: category, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createRoleCategory( + roleName: roleName, + category: category, +); +createRoleCategoryData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String roleName = ...; +RoleCategoryType category = ...; + +final ref = ExampleConnector.instance.createRoleCategory( + roleName: roleName, + category: category, +).ref(); +ref.execute(); +``` + + +### updateRoleCategory +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateRoleCategory( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateRoleCategory, we created `updateRoleCategoryBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateRoleCategoryVariablesBuilder { + ... + UpdateRoleCategoryVariablesBuilder roleName(String? t) { + _roleName.value = t; + return this; + } + UpdateRoleCategoryVariablesBuilder category(RoleCategoryType? t) { + _category.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateRoleCategory( + id: id, +) +.roleName(roleName) +.category(category) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateRoleCategory( + id: id, +); +updateRoleCategoryData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateRoleCategory( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteRoleCategory +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteRoleCategory( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteRoleCategory( + id: id, +); +deleteRoleCategoryData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteRoleCategory( + id: id, +).ref(); +ref.execute(); +``` + + +### createStaffCourse +#### Required Arguments +```dart +String staffId = ...; +String courseId = ...; +ExampleConnector.instance.createStaffCourse( + staffId: staffId, + courseId: courseId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createStaffCourse, we created `createStaffCourseBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateStaffCourseVariablesBuilder { + ... + CreateStaffCourseVariablesBuilder progressPercent(int? t) { + _progressPercent.value = t; + return this; + } + CreateStaffCourseVariablesBuilder completed(bool? t) { + _completed.value = t; + return this; + } + CreateStaffCourseVariablesBuilder completedAt(Timestamp? t) { + _completedAt.value = t; + return this; + } + CreateStaffCourseVariablesBuilder startedAt(Timestamp? t) { + _startedAt.value = t; + return this; + } + CreateStaffCourseVariablesBuilder lastAccessedAt(Timestamp? t) { + _lastAccessedAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createStaffCourse( + staffId: staffId, + courseId: courseId, +) +.progressPercent(progressPercent) +.completed(completed) +.completedAt(completedAt) +.startedAt(startedAt) +.lastAccessedAt(lastAccessedAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createStaffCourse( + staffId: staffId, + courseId: courseId, +); +createStaffCourseData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String staffId = ...; +String courseId = ...; + +final ref = ExampleConnector.instance.createStaffCourse( + staffId: staffId, + courseId: courseId, +).ref(); +ref.execute(); +``` + + +### updateStaffCourse +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateStaffCourse( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateStaffCourse, we created `updateStaffCourseBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateStaffCourseVariablesBuilder { + ... + UpdateStaffCourseVariablesBuilder progressPercent(int? t) { + _progressPercent.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder completed(bool? t) { + _completed.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder completedAt(Timestamp? t) { + _completedAt.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder startedAt(Timestamp? t) { + _startedAt.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder lastAccessedAt(Timestamp? t) { + _lastAccessedAt.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateStaffCourse( + id: id, +) +.progressPercent(progressPercent) +.completed(completed) +.completedAt(completedAt) +.startedAt(startedAt) +.lastAccessedAt(lastAccessedAt) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateStaffCourse( + id: id, +); +updateStaffCourseData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateStaffCourse( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteStaffCourse +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteStaffCourse( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteStaffCourse( + id: id, +); +deleteStaffCourseData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteStaffCourse( + id: id, +).ref(); +ref.execute(); +``` + + +### createAccount +#### Required Arguments +```dart +String bank = ...; +AccountType type = ...; +String last4 = ...; +String ownerId = ...; +ExampleConnector.instance.createAccount( + bank: bank, + type: type, + last4: last4, + ownerId: ownerId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createAccount, we created `createAccountBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateAccountVariablesBuilder { + ... + CreateAccountVariablesBuilder isPrimary(bool? t) { + _isPrimary.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createAccount( + bank: bank, + type: type, + last4: last4, + ownerId: ownerId, +) +.isPrimary(isPrimary) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createAccount( + bank: bank, + type: type, + last4: last4, + ownerId: ownerId, +); +createAccountData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String bank = ...; +AccountType type = ...; +String last4 = ...; +String ownerId = ...; + +final ref = ExampleConnector.instance.createAccount( + bank: bank, + type: type, + last4: last4, + ownerId: ownerId, +).ref(); +ref.execute(); +``` + + +### updateAccount +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateAccount( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateAccount, we created `updateAccountBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateAccountVariablesBuilder { + ... + UpdateAccountVariablesBuilder bank(String? t) { + _bank.value = t; + return this; + } + UpdateAccountVariablesBuilder type(AccountType? t) { + _type.value = t; + return this; + } + UpdateAccountVariablesBuilder last4(String? t) { + _last4.value = t; + return this; + } + UpdateAccountVariablesBuilder isPrimary(bool? t) { + _isPrimary.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateAccount( + id: id, +) +.bank(bank) +.type(type) +.last4(last4) +.isPrimary(isPrimary) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateAccount( + id: id, +); +updateAccountData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateAccount( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteAccount +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteAccount( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteAccount( + id: id, +); +deleteAccountData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteAccount( + id: id, +).ref(); +ref.execute(); +``` + + +### createCourse +#### Required Arguments +```dart +String categoryId = ...; +ExampleConnector.instance.createCourse( + categoryId: categoryId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createCourse, we created `createCourseBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateCourseVariablesBuilder { + ... + + CreateCourseVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + CreateCourseVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateCourseVariablesBuilder thumbnailUrl(String? t) { + _thumbnailUrl.value = t; + return this; + } + CreateCourseVariablesBuilder durationMinutes(int? t) { + _durationMinutes.value = t; + return this; + } + CreateCourseVariablesBuilder xpReward(int? t) { + _xpReward.value = t; + return this; + } + CreateCourseVariablesBuilder levelRequired(String? t) { + _levelRequired.value = t; + return this; + } + CreateCourseVariablesBuilder isCertification(bool? t) { + _isCertification.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createCourse( + categoryId: categoryId, +) +.title(title) +.description(description) +.thumbnailUrl(thumbnailUrl) +.durationMinutes(durationMinutes) +.xpReward(xpReward) +.levelRequired(levelRequired) +.isCertification(isCertification) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createCourse( + categoryId: categoryId, +); +createCourseData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String categoryId = ...; + +final ref = ExampleConnector.instance.createCourse( + categoryId: categoryId, +).ref(); +ref.execute(); +``` + + +### updateCourse +#### Required Arguments +```dart +String id = ...; +String categoryId = ...; +ExampleConnector.instance.updateCourse( + id: id, + categoryId: categoryId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateCourse, we created `updateCourseBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateCourseVariablesBuilder { + ... + UpdateCourseVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateCourseVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateCourseVariablesBuilder thumbnailUrl(String? t) { + _thumbnailUrl.value = t; + return this; + } + UpdateCourseVariablesBuilder durationMinutes(int? t) { + _durationMinutes.value = t; + return this; + } + UpdateCourseVariablesBuilder xpReward(int? t) { + _xpReward.value = t; + return this; + } + UpdateCourseVariablesBuilder levelRequired(String? t) { + _levelRequired.value = t; + return this; + } + UpdateCourseVariablesBuilder isCertification(bool? t) { + _isCertification.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateCourse( + id: id, + categoryId: categoryId, +) +.title(title) +.description(description) +.thumbnailUrl(thumbnailUrl) +.durationMinutes(durationMinutes) +.xpReward(xpReward) +.levelRequired(levelRequired) +.isCertification(isCertification) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateCourse( + id: id, + categoryId: categoryId, +); +updateCourseData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; +String categoryId = ...; + +final ref = ExampleConnector.instance.updateCourse( + id: id, + categoryId: categoryId, +).ref(); +ref.execute(); +``` + + +### deleteCourse +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteCourse( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteCourse( + id: id, +); +deleteCourseData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteCourse( + id: id, +).ref(); +ref.execute(); +``` + + +### createEmergencyContact +#### Required Arguments +```dart +String name = ...; +String phone = ...; +RelationshipType relationship = ...; +String staffId = ...; +ExampleConnector.instance.createEmergencyContact( + name: name, + phone: phone, + relationship: relationship, + staffId: staffId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createEmergencyContact( + name: name, + phone: phone, + relationship: relationship, + staffId: staffId, +); +createEmergencyContactData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; +String phone = ...; +RelationshipType relationship = ...; +String staffId = ...; + +final ref = ExampleConnector.instance.createEmergencyContact( + name: name, + phone: phone, + relationship: relationship, + staffId: staffId, +).ref(); +ref.execute(); +``` + + +### updateEmergencyContact +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateEmergencyContact( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateEmergencyContact, we created `updateEmergencyContactBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateEmergencyContactVariablesBuilder { + ... + UpdateEmergencyContactVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateEmergencyContactVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateEmergencyContactVariablesBuilder relationship(RelationshipType? t) { + _relationship.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateEmergencyContact( + id: id, +) +.name(name) +.phone(phone) +.relationship(relationship) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateEmergencyContact( + id: id, +); +updateEmergencyContactData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateEmergencyContact( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteEmergencyContact +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteEmergencyContact( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteEmergencyContact( + id: id, +); +deleteEmergencyContactData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteEmergencyContact( + id: id, +).ref(); +ref.execute(); +``` + + +### createInvoiceTemplate +#### Required Arguments +```dart +String name = ...; +String ownerId = ...; +ExampleConnector.instance.createInvoiceTemplate( + name: name, + ownerId: ownerId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createInvoiceTemplate, we created `createInvoiceTemplateBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateInvoiceTemplateVariablesBuilder { + ... + CreateInvoiceTemplateVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder paymentTerms(InovicePaymentTermsTemp? t) { + _paymentTerms.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder invoiceNumber(String? t) { + _invoiceNumber.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder issueDate(Timestamp? t) { + _issueDate.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder amount(double? t) { + _amount.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createInvoiceTemplate( + name: name, + ownerId: ownerId, +) +.vendorId(vendorId) +.businessId(businessId) +.orderId(orderId) +.paymentTerms(paymentTerms) +.invoiceNumber(invoiceNumber) +.issueDate(issueDate) +.dueDate(dueDate) +.hub(hub) +.managerName(managerName) +.vendorNumber(vendorNumber) +.roles(roles) +.charges(charges) +.otherCharges(otherCharges) +.subtotal(subtotal) +.amount(amount) +.notes(notes) +.staffCount(staffCount) +.chargesCount(chargesCount) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createInvoiceTemplate( + name: name, + ownerId: ownerId, +); +createInvoiceTemplateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; +String ownerId = ...; + +final ref = ExampleConnector.instance.createInvoiceTemplate( + name: name, + ownerId: ownerId, +).ref(); +ref.execute(); +``` + + +### updateInvoiceTemplate +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateInvoiceTemplate( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateInvoiceTemplate, we created `updateInvoiceTemplateBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateInvoiceTemplateVariablesBuilder { + ... + UpdateInvoiceTemplateVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder paymentTerms(InovicePaymentTermsTemp? t) { + _paymentTerms.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder invoiceNumber(String? t) { + _invoiceNumber.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder issueDate(Timestamp? t) { + _issueDate.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder amount(double? t) { + _amount.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateInvoiceTemplate( + id: id, +) +.name(name) +.ownerId(ownerId) +.vendorId(vendorId) +.businessId(businessId) +.orderId(orderId) +.paymentTerms(paymentTerms) +.invoiceNumber(invoiceNumber) +.issueDate(issueDate) +.dueDate(dueDate) +.hub(hub) +.managerName(managerName) +.vendorNumber(vendorNumber) +.roles(roles) +.charges(charges) +.otherCharges(otherCharges) +.subtotal(subtotal) +.amount(amount) +.notes(notes) +.staffCount(staffCount) +.chargesCount(chargesCount) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateInvoiceTemplate( + id: id, +); +updateInvoiceTemplateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateInvoiceTemplate( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteInvoiceTemplate +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteInvoiceTemplate( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteInvoiceTemplate( + id: id, +); +deleteInvoiceTemplateData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteInvoiceTemplate( + id: id, +).ref(); +ref.execute(); +``` + + +### createRole +#### Required Arguments +```dart +String name = ...; +double costPerHour = ...; +String vendorId = ...; +String roleCategoryId = ...; +ExampleConnector.instance.createRole( + name: name, + costPerHour: costPerHour, + vendorId: vendorId, + roleCategoryId: roleCategoryId, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createRole( + name: name, + costPerHour: costPerHour, + vendorId: vendorId, + roleCategoryId: roleCategoryId, +); +createRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String name = ...; +double costPerHour = ...; +String vendorId = ...; +String roleCategoryId = ...; + +final ref = ExampleConnector.instance.createRole( + name: name, + costPerHour: costPerHour, + vendorId: vendorId, + roleCategoryId: roleCategoryId, +).ref(); +ref.execute(); +``` + + +### updateRole +#### Required Arguments +```dart +String id = ...; +String roleCategoryId = ...; +ExampleConnector.instance.updateRole( + id: id, + roleCategoryId: roleCategoryId, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateRole, we created `updateRoleBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateRoleVariablesBuilder { + ... + UpdateRoleVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateRoleVariablesBuilder costPerHour(double? t) { + _costPerHour.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateRole( + id: id, + roleCategoryId: roleCategoryId, +) +.name(name) +.costPerHour(costPerHour) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateRole( + id: id, + roleCategoryId: roleCategoryId, +); +updateRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; +String roleCategoryId = ...; + +final ref = ExampleConnector.instance.updateRole( + id: id, + roleCategoryId: roleCategoryId, +).ref(); +ref.execute(); +``` + + +### deleteRole +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteRole( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteRole( + id: id, +); +deleteRoleData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteRole( + id: id, +).ref(); +ref.execute(); +``` + + +### createOrder +#### Required Arguments +```dart +String vendorId = ...; +String businessId = ...; +OrderType orderType = ...; +ExampleConnector.instance.createOrder( + vendorId: vendorId, + businessId: businessId, + orderType: orderType, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For createOrder, we created `createOrderBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class CreateOrderVariablesBuilder { + ... + CreateOrderVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + CreateOrderVariablesBuilder status(OrderStatus? t) { + _status.value = t; + return this; + } + CreateOrderVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + CreateOrderVariablesBuilder startDate(Timestamp? t) { + _startDate.value = t; + return this; + } + CreateOrderVariablesBuilder endDate(Timestamp? t) { + _endDate.value = t; + return this; + } + CreateOrderVariablesBuilder duration(OrderDuration? t) { + _duration.value = t; + return this; + } + CreateOrderVariablesBuilder lunchBreak(int? t) { + _lunchBreak.value = t; + return this; + } + CreateOrderVariablesBuilder total(double? t) { + _total.value = t; + return this; + } + CreateOrderVariablesBuilder eventName(String? t) { + _eventName.value = t; + return this; + } + CreateOrderVariablesBuilder assignedStaff(AnyValue? t) { + _assignedStaff.value = t; + return this; + } + CreateOrderVariablesBuilder shifts(AnyValue? t) { + _shifts.value = t; + return this; + } + CreateOrderVariablesBuilder requested(int? t) { + _requested.value = t; + return this; + } + CreateOrderVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + CreateOrderVariablesBuilder recurringDays(AnyValue? t) { + _recurringDays.value = t; + return this; + } + CreateOrderVariablesBuilder permanentStartDate(Timestamp? t) { + _permanentStartDate.value = t; + return this; + } + CreateOrderVariablesBuilder permanentDays(AnyValue? t) { + _permanentDays.value = t; + return this; + } + CreateOrderVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + CreateOrderVariablesBuilder detectedConflicts(AnyValue? t) { + _detectedConflicts.value = t; + return this; + } + CreateOrderVariablesBuilder poReference(String? t) { + _poReference.value = t; + return this; + } + + ... +} +ExampleConnector.instance.createOrder( + vendorId: vendorId, + businessId: businessId, + orderType: orderType, +) +.location(location) +.status(status) +.date(date) +.startDate(startDate) +.endDate(endDate) +.duration(duration) +.lunchBreak(lunchBreak) +.total(total) +.eventName(eventName) +.assignedStaff(assignedStaff) +.shifts(shifts) +.requested(requested) +.hub(hub) +.recurringDays(recurringDays) +.permanentStartDate(permanentStartDate) +.permanentDays(permanentDays) +.notes(notes) +.detectedConflicts(detectedConflicts) +.poReference(poReference) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.createOrder( + vendorId: vendorId, + businessId: businessId, + orderType: orderType, +); +createOrderData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String vendorId = ...; +String businessId = ...; +OrderType orderType = ...; + +final ref = ExampleConnector.instance.createOrder( + vendorId: vendorId, + businessId: businessId, + orderType: orderType, +).ref(); +ref.execute(); +``` + + +### updateOrder +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.updateOrder( + id: id, +).execute(); +``` + +#### Optional Arguments +We return a builder for each query. For updateOrder, we created `updateOrderBuilder`. For queries and mutations with optional parameters, we return a builder class. +The builder pattern allows Data Connect to distinguish between fields that haven't been set and fields that have been set to null. A field can be set by calling its respective setter method like below: +```dart +class UpdateOrderVariablesBuilder { + ... + UpdateOrderVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateOrderVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateOrderVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + UpdateOrderVariablesBuilder status(OrderStatus? t) { + _status.value = t; + return this; + } + UpdateOrderVariablesBuilder startDate(Timestamp? t) { + _startDate.value = t; + return this; + } + UpdateOrderVariablesBuilder endDate(Timestamp? t) { + _endDate.value = t; + return this; + } + UpdateOrderVariablesBuilder total(double? t) { + _total.value = t; + return this; + } + UpdateOrderVariablesBuilder eventName(String? t) { + _eventName.value = t; + return this; + } + UpdateOrderVariablesBuilder assignedStaff(AnyValue? t) { + _assignedStaff.value = t; + return this; + } + UpdateOrderVariablesBuilder shifts(AnyValue? t) { + _shifts.value = t; + return this; + } + UpdateOrderVariablesBuilder requested(int? t) { + _requested.value = t; + return this; + } + UpdateOrderVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + UpdateOrderVariablesBuilder recurringDays(AnyValue? t) { + _recurringDays.value = t; + return this; + } + UpdateOrderVariablesBuilder permanentDays(AnyValue? t) { + _permanentDays.value = t; + return this; + } + UpdateOrderVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + UpdateOrderVariablesBuilder detectedConflicts(AnyValue? t) { + _detectedConflicts.value = t; + return this; + } + UpdateOrderVariablesBuilder poReference(String? t) { + _poReference.value = t; + return this; + } + + ... +} +ExampleConnector.instance.updateOrder( + id: id, +) +.vendorId(vendorId) +.businessId(businessId) +.location(location) +.status(status) +.startDate(startDate) +.endDate(endDate) +.total(total) +.eventName(eventName) +.assignedStaff(assignedStaff) +.shifts(shifts) +.requested(requested) +.hub(hub) +.recurringDays(recurringDays) +.permanentDays(permanentDays) +.notes(notes) +.detectedConflicts(detectedConflicts) +.poReference(poReference) +.execute(); +``` + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.updateOrder( + id: id, +); +updateOrderData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.updateOrder( + id: id, +).ref(); +ref.execute(); +``` + + +### deleteOrder +#### Required Arguments +```dart +String id = ...; +ExampleConnector.instance.deleteOrder( + id: id, +).execute(); +``` + + + +#### Return Type +`execute()` returns a `OperationResult` +```dart +/// Result of an Operation Request (query/mutation). +class OperationResult { + OperationResult(this.dataConnect, this.data, this.ref); + Data data; + OperationRef ref; + FirebaseDataConnect dataConnect; +} + +final result = await ExampleConnector.instance.deleteOrder( + id: id, +); +deleteOrderData data = result.data; +final ref = result.ref; +``` + +#### Getting the Ref +Each builder returns an `execute` function, which is a helper function that creates a `Ref` object, and executes the underlying operation. +An example of how to use the `Ref` object is shown below: +```dart +String id = ...; + +final ref = ExampleConnector.instance.deleteOrder( + id: id, +).ref(); +ref.execute(); +``` + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/accept_invite_by_code.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/accept_invite_by_code.dart new file mode 100644 index 00000000..62eedb2c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/accept_invite_by_code.dart @@ -0,0 +1,88 @@ +part of 'generated.dart'; + +class AcceptInviteByCodeVariablesBuilder { + String inviteCode; + + final FirebaseDataConnect _dataConnect; + AcceptInviteByCodeVariablesBuilder(this._dataConnect, {required this.inviteCode,}); + Deserializer dataDeserializer = (dynamic json) => AcceptInviteByCodeData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (AcceptInviteByCodeVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + AcceptInviteByCodeVariables vars= AcceptInviteByCodeVariables(inviteCode: inviteCode,); + return _dataConnect.mutation("acceptInviteByCode", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class AcceptInviteByCodeData { + final int teamMember_updateMany; + AcceptInviteByCodeData.fromJson(dynamic json): + + teamMember_updateMany = nativeFromJson(json['teamMember_updateMany']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final AcceptInviteByCodeData otherTyped = other as AcceptInviteByCodeData; + return teamMember_updateMany == otherTyped.teamMember_updateMany; + + } + @override + int get hashCode => teamMember_updateMany.hashCode; + + + Map toJson() { + Map json = {}; + json['teamMember_updateMany'] = nativeToJson(teamMember_updateMany); + return json; + } + + AcceptInviteByCodeData({ + required this.teamMember_updateMany, + }); +} + +@immutable +class AcceptInviteByCodeVariables { + final String inviteCode; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + AcceptInviteByCodeVariables.fromJson(Map json): + + inviteCode = nativeFromJson(json['inviteCode']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final AcceptInviteByCodeVariables otherTyped = other as AcceptInviteByCodeVariables; + return inviteCode == otherTyped.inviteCode; + + } + @override + int get hashCode => inviteCode.hashCode; + + + Map toJson() { + Map json = {}; + json['inviteCode'] = nativeToJson(inviteCode); + return json; + } + + AcceptInviteByCodeVariables({ + required this.inviteCode, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/cancel_invite_by_code.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/cancel_invite_by_code.dart new file mode 100644 index 00000000..5ca855a8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/cancel_invite_by_code.dart @@ -0,0 +1,88 @@ +part of 'generated.dart'; + +class CancelInviteByCodeVariablesBuilder { + String inviteCode; + + final FirebaseDataConnect _dataConnect; + CancelInviteByCodeVariablesBuilder(this._dataConnect, {required this.inviteCode,}); + Deserializer dataDeserializer = (dynamic json) => CancelInviteByCodeData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CancelInviteByCodeVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CancelInviteByCodeVariables vars= CancelInviteByCodeVariables(inviteCode: inviteCode,); + return _dataConnect.mutation("cancelInviteByCode", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CancelInviteByCodeData { + final int teamMember_updateMany; + CancelInviteByCodeData.fromJson(dynamic json): + + teamMember_updateMany = nativeFromJson(json['teamMember_updateMany']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CancelInviteByCodeData otherTyped = other as CancelInviteByCodeData; + return teamMember_updateMany == otherTyped.teamMember_updateMany; + + } + @override + int get hashCode => teamMember_updateMany.hashCode; + + + Map toJson() { + Map json = {}; + json['teamMember_updateMany'] = nativeToJson(teamMember_updateMany); + return json; + } + + CancelInviteByCodeData({ + required this.teamMember_updateMany, + }); +} + +@immutable +class CancelInviteByCodeVariables { + final String inviteCode; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CancelInviteByCodeVariables.fromJson(Map json): + + inviteCode = nativeFromJson(json['inviteCode']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CancelInviteByCodeVariables otherTyped = other as CancelInviteByCodeVariables; + return inviteCode == otherTyped.inviteCode; + + } + @override + int get hashCode => inviteCode.hashCode; + + + Map toJson() { + Map json = {}; + json['inviteCode'] = nativeToJson(inviteCode); + return json; + } + + CancelInviteByCodeVariables({ + required this.inviteCode, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_account.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_account.dart new file mode 100644 index 00000000..c1bc9a4d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_account.dart @@ -0,0 +1,163 @@ +part of 'generated.dart'; + +class CreateAccountVariablesBuilder { + String bank; + AccountType type; + String last4; + Optional _isPrimary = Optional.optional(nativeFromJson, nativeToJson); + String ownerId; + + final FirebaseDataConnect _dataConnect; CreateAccountVariablesBuilder isPrimary(bool? t) { + _isPrimary.value = t; + return this; + } + + CreateAccountVariablesBuilder(this._dataConnect, {required this.bank,required this.type,required this.last4,required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => CreateAccountData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateAccountVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateAccountVariables vars= CreateAccountVariables(bank: bank,type: type,last4: last4,isPrimary: _isPrimary,ownerId: ownerId,); + return _dataConnect.mutation("createAccount", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateAccountAccountInsert { + final String id; + CreateAccountAccountInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAccountAccountInsert otherTyped = other as CreateAccountAccountInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateAccountAccountInsert({ + required this.id, + }); +} + +@immutable +class CreateAccountData { + final CreateAccountAccountInsert account_insert; + CreateAccountData.fromJson(dynamic json): + + account_insert = CreateAccountAccountInsert.fromJson(json['account_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAccountData otherTyped = other as CreateAccountData; + return account_insert == otherTyped.account_insert; + + } + @override + int get hashCode => account_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['account_insert'] = account_insert.toJson(); + return json; + } + + CreateAccountData({ + required this.account_insert, + }); +} + +@immutable +class CreateAccountVariables { + final String bank; + final AccountType type; + final String last4; + late final OptionalisPrimary; + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateAccountVariables.fromJson(Map json): + + bank = nativeFromJson(json['bank']), + type = AccountType.values.byName(json['type']), + last4 = nativeFromJson(json['last4']), + ownerId = nativeFromJson(json['ownerId']) { + + + + + + isPrimary = Optional.optional(nativeFromJson, nativeToJson); + isPrimary.value = json['isPrimary'] == null ? null : nativeFromJson(json['isPrimary']); + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAccountVariables otherTyped = other as CreateAccountVariables; + return bank == otherTyped.bank && + type == otherTyped.type && + last4 == otherTyped.last4 && + isPrimary == otherTyped.isPrimary && + ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => Object.hashAll([bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode]); + + + Map toJson() { + Map json = {}; + json['bank'] = nativeToJson(bank); + json['type'] = + type.name + ; + json['last4'] = nativeToJson(last4); + if(isPrimary.state == OptionalState.set) { + json['isPrimary'] = isPrimary.toJson(); + } + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + CreateAccountVariables({ + required this.bank, + required this.type, + required this.last4, + required this.isPrimary, + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_activity_log.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_activity_log.dart new file mode 100644 index 00000000..223fce9b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_activity_log.dart @@ -0,0 +1,245 @@ +part of 'generated.dart'; + +class CreateActivityLogVariablesBuilder { + String userId; + Timestamp date; + Optional _hourStart = Optional.optional(nativeFromJson, nativeToJson); + Optional _hourEnd = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalhours = Optional.optional(nativeFromJson, nativeToJson); + Optional _iconType = Optional.optional((data) => ActivityIconType.values.byName(data), enumSerializer); + Optional _iconColor = Optional.optional(nativeFromJson, nativeToJson); + String title; + String description; + Optional _isRead = Optional.optional(nativeFromJson, nativeToJson); + ActivityType activityType; + + final FirebaseDataConnect _dataConnect; CreateActivityLogVariablesBuilder hourStart(String? t) { + _hourStart.value = t; + return this; + } + CreateActivityLogVariablesBuilder hourEnd(String? t) { + _hourEnd.value = t; + return this; + } + CreateActivityLogVariablesBuilder totalhours(String? t) { + _totalhours.value = t; + return this; + } + CreateActivityLogVariablesBuilder iconType(ActivityIconType? t) { + _iconType.value = t; + return this; + } + CreateActivityLogVariablesBuilder iconColor(String? t) { + _iconColor.value = t; + return this; + } + CreateActivityLogVariablesBuilder isRead(bool? t) { + _isRead.value = t; + return this; + } + + CreateActivityLogVariablesBuilder(this._dataConnect, {required this.userId,required this.date,required this.title,required this.description,required this.activityType,}); + Deserializer dataDeserializer = (dynamic json) => CreateActivityLogData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateActivityLogVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateActivityLogVariables vars= CreateActivityLogVariables(userId: userId,date: date,hourStart: _hourStart,hourEnd: _hourEnd,totalhours: _totalhours,iconType: _iconType,iconColor: _iconColor,title: title,description: description,isRead: _isRead,activityType: activityType,); + return _dataConnect.mutation("createActivityLog", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateActivityLogActivityLogInsert { + final String id; + CreateActivityLogActivityLogInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateActivityLogActivityLogInsert otherTyped = other as CreateActivityLogActivityLogInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateActivityLogActivityLogInsert({ + required this.id, + }); +} + +@immutable +class CreateActivityLogData { + final CreateActivityLogActivityLogInsert activityLog_insert; + CreateActivityLogData.fromJson(dynamic json): + + activityLog_insert = CreateActivityLogActivityLogInsert.fromJson(json['activityLog_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateActivityLogData otherTyped = other as CreateActivityLogData; + return activityLog_insert == otherTyped.activityLog_insert; + + } + @override + int get hashCode => activityLog_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['activityLog_insert'] = activityLog_insert.toJson(); + return json; + } + + CreateActivityLogData({ + required this.activityLog_insert, + }); +} + +@immutable +class CreateActivityLogVariables { + final String userId; + final Timestamp date; + late final OptionalhourStart; + late final OptionalhourEnd; + late final Optionaltotalhours; + late final OptionaliconType; + late final OptionaliconColor; + final String title; + final String description; + late final OptionalisRead; + final ActivityType activityType; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateActivityLogVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']), + date = Timestamp.fromJson(json['date']), + title = nativeFromJson(json['title']), + description = nativeFromJson(json['description']), + activityType = ActivityType.values.byName(json['activityType']) { + + + + + hourStart = Optional.optional(nativeFromJson, nativeToJson); + hourStart.value = json['hourStart'] == null ? null : nativeFromJson(json['hourStart']); + + + hourEnd = Optional.optional(nativeFromJson, nativeToJson); + hourEnd.value = json['hourEnd'] == null ? null : nativeFromJson(json['hourEnd']); + + + totalhours = Optional.optional(nativeFromJson, nativeToJson); + totalhours.value = json['totalhours'] == null ? null : nativeFromJson(json['totalhours']); + + + iconType = Optional.optional((data) => ActivityIconType.values.byName(data), enumSerializer); + iconType.value = json['iconType'] == null ? null : ActivityIconType.values.byName(json['iconType']); + + + iconColor = Optional.optional(nativeFromJson, nativeToJson); + iconColor.value = json['iconColor'] == null ? null : nativeFromJson(json['iconColor']); + + + + + isRead = Optional.optional(nativeFromJson, nativeToJson); + isRead.value = json['isRead'] == null ? null : nativeFromJson(json['isRead']); + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateActivityLogVariables otherTyped = other as CreateActivityLogVariables; + return userId == otherTyped.userId && + date == otherTyped.date && + hourStart == otherTyped.hourStart && + hourEnd == otherTyped.hourEnd && + totalhours == otherTyped.totalhours && + iconType == otherTyped.iconType && + iconColor == otherTyped.iconColor && + title == otherTyped.title && + description == otherTyped.description && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, date.hashCode, hourStart.hashCode, hourEnd.hashCode, totalhours.hashCode, iconType.hashCode, iconColor.hashCode, title.hashCode, description.hashCode, isRead.hashCode, activityType.hashCode]); + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + json['date'] = date.toJson(); + if(hourStart.state == OptionalState.set) { + json['hourStart'] = hourStart.toJson(); + } + if(hourEnd.state == OptionalState.set) { + json['hourEnd'] = hourEnd.toJson(); + } + if(totalhours.state == OptionalState.set) { + json['totalhours'] = totalhours.toJson(); + } + if(iconType.state == OptionalState.set) { + json['iconType'] = iconType.toJson(); + } + if(iconColor.state == OptionalState.set) { + json['iconColor'] = iconColor.toJson(); + } + json['title'] = nativeToJson(title); + json['description'] = nativeToJson(description); + if(isRead.state == OptionalState.set) { + json['isRead'] = isRead.toJson(); + } + json['activityType'] = + activityType.name + ; + return json; + } + + CreateActivityLogVariables({ + required this.userId, + required this.date, + required this.hourStart, + required this.hourEnd, + required this.totalhours, + required this.iconType, + required this.iconColor, + required this.title, + required this.description, + required this.isRead, + required this.activityType, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_application.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_application.dart new file mode 100644 index 00000000..8b4fd8f1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_application.dart @@ -0,0 +1,187 @@ +part of 'generated.dart'; + +class CreateApplicationVariablesBuilder { + String shiftId; + String staffId; + ApplicationStatus status; + Optional _checkInTime = Optional.optional((json) => json['checkInTime'] = Timestamp.fromJson(json['checkInTime']), defaultSerializer); + Optional _checkOutTime = Optional.optional((json) => json['checkOutTime'] = Timestamp.fromJson(json['checkOutTime']), defaultSerializer); + ApplicationOrigin origin; + String roleId; + + final FirebaseDataConnect _dataConnect; CreateApplicationVariablesBuilder checkInTime(Timestamp? t) { + _checkInTime.value = t; + return this; + } + CreateApplicationVariablesBuilder checkOutTime(Timestamp? t) { + _checkOutTime.value = t; + return this; + } + + CreateApplicationVariablesBuilder(this._dataConnect, {required this.shiftId,required this.staffId,required this.status,required this.origin,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => CreateApplicationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateApplicationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateApplicationVariables vars= CreateApplicationVariables(shiftId: shiftId,staffId: staffId,status: status,checkInTime: _checkInTime,checkOutTime: _checkOutTime,origin: origin,roleId: roleId,); + return _dataConnect.mutation("createApplication", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateApplicationApplicationInsert { + final String id; + CreateApplicationApplicationInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateApplicationApplicationInsert otherTyped = other as CreateApplicationApplicationInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateApplicationApplicationInsert({ + required this.id, + }); +} + +@immutable +class CreateApplicationData { + final CreateApplicationApplicationInsert application_insert; + CreateApplicationData.fromJson(dynamic json): + + application_insert = CreateApplicationApplicationInsert.fromJson(json['application_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateApplicationData otherTyped = other as CreateApplicationData; + return application_insert == otherTyped.application_insert; + + } + @override + int get hashCode => application_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['application_insert'] = application_insert.toJson(); + return json; + } + + CreateApplicationData({ + required this.application_insert, + }); +} + +@immutable +class CreateApplicationVariables { + final String shiftId; + final String staffId; + final ApplicationStatus status; + late final OptionalcheckInTime; + late final OptionalcheckOutTime; + final ApplicationOrigin origin; + final String roleId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateApplicationVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = ApplicationStatus.values.byName(json['status']), + origin = ApplicationOrigin.values.byName(json['origin']), + roleId = nativeFromJson(json['roleId']) { + + + + + + checkInTime = Optional.optional((json) => json['checkInTime'] = Timestamp.fromJson(json['checkInTime']), defaultSerializer); + checkInTime.value = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']); + + + checkOutTime = Optional.optional((json) => json['checkOutTime'] = Timestamp.fromJson(json['checkOutTime']), defaultSerializer); + checkOutTime.value = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']); + + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateApplicationVariables otherTyped = other as CreateApplicationVariables; + return shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + origin == otherTyped.origin && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, staffId.hashCode, status.hashCode, checkInTime.hashCode, checkOutTime.hashCode, origin.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + status.name + ; + if(checkInTime.state == OptionalState.set) { + json['checkInTime'] = checkInTime.toJson(); + } + if(checkOutTime.state == OptionalState.set) { + json['checkOutTime'] = checkOutTime.toJson(); + } + json['origin'] = + origin.name + ; + json['roleId'] = nativeToJson(roleId); + return json; + } + + CreateApplicationVariables({ + required this.shiftId, + required this.staffId, + required this.status, + required this.checkInTime, + required this.checkOutTime, + required this.origin, + required this.roleId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_assignment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_assignment.dart new file mode 100644 index 00000000..b0417afb --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_assignment.dart @@ -0,0 +1,291 @@ +part of 'generated.dart'; + +class CreateAssignmentVariablesBuilder { + String workforceId; + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _instructions = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => AssignmentStatus.values.byName(data), enumSerializer); + Optional _tipsAvailable = Optional.optional(nativeFromJson, nativeToJson); + Optional _travelTime = Optional.optional(nativeFromJson, nativeToJson); + Optional _mealProvided = Optional.optional(nativeFromJson, nativeToJson); + Optional _parkingAvailable = Optional.optional(nativeFromJson, nativeToJson); + Optional _gasCompensation = Optional.optional(nativeFromJson, nativeToJson); + Optional> _managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + String roleId; + String shiftId; + + final FirebaseDataConnect _dataConnect; CreateAssignmentVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + CreateAssignmentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateAssignmentVariablesBuilder instructions(String? t) { + _instructions.value = t; + return this; + } + CreateAssignmentVariablesBuilder status(AssignmentStatus? t) { + _status.value = t; + return this; + } + CreateAssignmentVariablesBuilder tipsAvailable(bool? t) { + _tipsAvailable.value = t; + return this; + } + CreateAssignmentVariablesBuilder travelTime(bool? t) { + _travelTime.value = t; + return this; + } + CreateAssignmentVariablesBuilder mealProvided(bool? t) { + _mealProvided.value = t; + return this; + } + CreateAssignmentVariablesBuilder parkingAvailable(bool? t) { + _parkingAvailable.value = t; + return this; + } + CreateAssignmentVariablesBuilder gasCompensation(bool? t) { + _gasCompensation.value = t; + return this; + } + CreateAssignmentVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + + CreateAssignmentVariablesBuilder(this._dataConnect, {required this.workforceId,required this.roleId,required this.shiftId,}); + Deserializer dataDeserializer = (dynamic json) => CreateAssignmentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateAssignmentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateAssignmentVariables vars= CreateAssignmentVariables(workforceId: workforceId,title: _title,description: _description,instructions: _instructions,status: _status,tipsAvailable: _tipsAvailable,travelTime: _travelTime,mealProvided: _mealProvided,parkingAvailable: _parkingAvailable,gasCompensation: _gasCompensation,managers: _managers,roleId: roleId,shiftId: shiftId,); + return _dataConnect.mutation("CreateAssignment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateAssignmentAssignmentInsert { + final String id; + CreateAssignmentAssignmentInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAssignmentAssignmentInsert otherTyped = other as CreateAssignmentAssignmentInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateAssignmentAssignmentInsert({ + required this.id, + }); +} + +@immutable +class CreateAssignmentData { + final CreateAssignmentAssignmentInsert assignment_insert; + CreateAssignmentData.fromJson(dynamic json): + + assignment_insert = CreateAssignmentAssignmentInsert.fromJson(json['assignment_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAssignmentData otherTyped = other as CreateAssignmentData; + return assignment_insert == otherTyped.assignment_insert; + + } + @override + int get hashCode => assignment_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['assignment_insert'] = assignment_insert.toJson(); + return json; + } + + CreateAssignmentData({ + required this.assignment_insert, + }); +} + +@immutable +class CreateAssignmentVariables { + final String workforceId; + late final Optionaltitle; + late final Optionaldescription; + late final Optionalinstructions; + late final Optionalstatus; + late final OptionaltipsAvailable; + late final OptionaltravelTime; + late final OptionalmealProvided; + late final OptionalparkingAvailable; + late final OptionalgasCompensation; + late final Optional>managers; + final String roleId; + final String shiftId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateAssignmentVariables.fromJson(Map json): + + workforceId = nativeFromJson(json['workforceId']), + roleId = nativeFromJson(json['roleId']), + shiftId = nativeFromJson(json['shiftId']) { + + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + instructions = Optional.optional(nativeFromJson, nativeToJson); + instructions.value = json['instructions'] == null ? null : nativeFromJson(json['instructions']); + + + status = Optional.optional((data) => AssignmentStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : AssignmentStatus.values.byName(json['status']); + + + tipsAvailable = Optional.optional(nativeFromJson, nativeToJson); + tipsAvailable.value = json['tipsAvailable'] == null ? null : nativeFromJson(json['tipsAvailable']); + + + travelTime = Optional.optional(nativeFromJson, nativeToJson); + travelTime.value = json['travelTime'] == null ? null : nativeFromJson(json['travelTime']); + + + mealProvided = Optional.optional(nativeFromJson, nativeToJson); + mealProvided.value = json['mealProvided'] == null ? null : nativeFromJson(json['mealProvided']); + + + parkingAvailable = Optional.optional(nativeFromJson, nativeToJson); + parkingAvailable.value = json['parkingAvailable'] == null ? null : nativeFromJson(json['parkingAvailable']); + + + gasCompensation = Optional.optional(nativeFromJson, nativeToJson); + gasCompensation.value = json['gasCompensation'] == null ? null : nativeFromJson(json['gasCompensation']); + + + managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + managers.value = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(); + + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAssignmentVariables otherTyped = other as CreateAssignmentVariables; + return workforceId == otherTyped.workforceId && + title == otherTyped.title && + description == otherTyped.description && + instructions == otherTyped.instructions && + status == otherTyped.status && + tipsAvailable == otherTyped.tipsAvailable && + travelTime == otherTyped.travelTime && + mealProvided == otherTyped.mealProvided && + parkingAvailable == otherTyped.parkingAvailable && + gasCompensation == otherTyped.gasCompensation && + managers == otherTyped.managers && + roleId == otherTyped.roleId && + shiftId == otherTyped.shiftId; + + } + @override + int get hashCode => Object.hashAll([workforceId.hashCode, title.hashCode, description.hashCode, instructions.hashCode, status.hashCode, tipsAvailable.hashCode, travelTime.hashCode, mealProvided.hashCode, parkingAvailable.hashCode, gasCompensation.hashCode, managers.hashCode, roleId.hashCode, shiftId.hashCode]); + + + Map toJson() { + Map json = {}; + json['workforceId'] = nativeToJson(workforceId); + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(instructions.state == OptionalState.set) { + json['instructions'] = instructions.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(tipsAvailable.state == OptionalState.set) { + json['tipsAvailable'] = tipsAvailable.toJson(); + } + if(travelTime.state == OptionalState.set) { + json['travelTime'] = travelTime.toJson(); + } + if(mealProvided.state == OptionalState.set) { + json['mealProvided'] = mealProvided.toJson(); + } + if(parkingAvailable.state == OptionalState.set) { + json['parkingAvailable'] = parkingAvailable.toJson(); + } + if(gasCompensation.state == OptionalState.set) { + json['gasCompensation'] = gasCompensation.toJson(); + } + if(managers.state == OptionalState.set) { + json['managers'] = managers.toJson(); + } + json['roleId'] = nativeToJson(roleId); + json['shiftId'] = nativeToJson(shiftId); + return json; + } + + CreateAssignmentVariables({ + required this.workforceId, + required this.title, + required this.description, + required this.instructions, + required this.status, + required this.tipsAvailable, + required this.travelTime, + required this.mealProvided, + required this.parkingAvailable, + required this.gasCompensation, + required this.managers, + required this.roleId, + required this.shiftId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_attire_option.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_attire_option.dart new file mode 100644 index 00000000..aaaa0b05 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_attire_option.dart @@ -0,0 +1,192 @@ +part of 'generated.dart'; + +class CreateAttireOptionVariablesBuilder { + String itemId; + String label; + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + Optional _imageUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _isMandatory = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateAttireOptionVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + CreateAttireOptionVariablesBuilder imageUrl(String? t) { + _imageUrl.value = t; + return this; + } + CreateAttireOptionVariablesBuilder isMandatory(bool? t) { + _isMandatory.value = t; + return this; + } + CreateAttireOptionVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + + CreateAttireOptionVariablesBuilder(this._dataConnect, {required this.itemId,required this.label,}); + Deserializer dataDeserializer = (dynamic json) => CreateAttireOptionData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateAttireOptionVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateAttireOptionVariables vars= CreateAttireOptionVariables(itemId: itemId,label: label,icon: _icon,imageUrl: _imageUrl,isMandatory: _isMandatory,vendorId: _vendorId,); + return _dataConnect.mutation("createAttireOption", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateAttireOptionAttireOptionInsert { + final String id; + CreateAttireOptionAttireOptionInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAttireOptionAttireOptionInsert otherTyped = other as CreateAttireOptionAttireOptionInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateAttireOptionAttireOptionInsert({ + required this.id, + }); +} + +@immutable +class CreateAttireOptionData { + final CreateAttireOptionAttireOptionInsert attireOption_insert; + CreateAttireOptionData.fromJson(dynamic json): + + attireOption_insert = CreateAttireOptionAttireOptionInsert.fromJson(json['attireOption_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAttireOptionData otherTyped = other as CreateAttireOptionData; + return attireOption_insert == otherTyped.attireOption_insert; + + } + @override + int get hashCode => attireOption_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['attireOption_insert'] = attireOption_insert.toJson(); + return json; + } + + CreateAttireOptionData({ + required this.attireOption_insert, + }); +} + +@immutable +class CreateAttireOptionVariables { + final String itemId; + final String label; + late final Optionalicon; + late final OptionalimageUrl; + late final OptionalisMandatory; + late final OptionalvendorId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateAttireOptionVariables.fromJson(Map json): + + itemId = nativeFromJson(json['itemId']), + label = nativeFromJson(json['label']) { + + + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + + imageUrl = Optional.optional(nativeFromJson, nativeToJson); + imageUrl.value = json['imageUrl'] == null ? null : nativeFromJson(json['imageUrl']); + + + isMandatory = Optional.optional(nativeFromJson, nativeToJson); + isMandatory.value = json['isMandatory'] == null ? null : nativeFromJson(json['isMandatory']); + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateAttireOptionVariables otherTyped = other as CreateAttireOptionVariables; + return itemId == otherTyped.itemId && + label == otherTyped.label && + icon == otherTyped.icon && + imageUrl == otherTyped.imageUrl && + isMandatory == otherTyped.isMandatory && + vendorId == otherTyped.vendorId; + + } + @override + int get hashCode => Object.hashAll([itemId.hashCode, label.hashCode, icon.hashCode, imageUrl.hashCode, isMandatory.hashCode, vendorId.hashCode]); + + + Map toJson() { + Map json = {}; + json['itemId'] = nativeToJson(itemId); + json['label'] = nativeToJson(label); + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + if(imageUrl.state == OptionalState.set) { + json['imageUrl'] = imageUrl.toJson(); + } + if(isMandatory.state == OptionalState.set) { + json['isMandatory'] = isMandatory.toJson(); + } + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + return json; + } + + CreateAttireOptionVariables({ + required this.itemId, + required this.label, + required this.icon, + required this.imageUrl, + required this.isMandatory, + required this.vendorId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_benefits_data.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_benefits_data.dart new file mode 100644 index 00000000..08e59038 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_benefits_data.dart @@ -0,0 +1,139 @@ +part of 'generated.dart'; + +class CreateBenefitsDataVariablesBuilder { + String vendorBenefitPlanId; + String staffId; + int current; + + final FirebaseDataConnect _dataConnect; + CreateBenefitsDataVariablesBuilder(this._dataConnect, {required this.vendorBenefitPlanId,required this.staffId,required this.current,}); + Deserializer dataDeserializer = (dynamic json) => CreateBenefitsDataData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateBenefitsDataVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateBenefitsDataVariables vars= CreateBenefitsDataVariables(vendorBenefitPlanId: vendorBenefitPlanId,staffId: staffId,current: current,); + return _dataConnect.mutation("createBenefitsData", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateBenefitsDataBenefitsDataInsert { + final String vendorBenefitPlanId; + final String staffId; + CreateBenefitsDataBenefitsDataInsert.fromJson(dynamic json): + + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateBenefitsDataBenefitsDataInsert otherTyped = other as CreateBenefitsDataBenefitsDataInsert; + return vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + staffId == otherTyped.staffId; + + } + @override + int get hashCode => Object.hashAll([vendorBenefitPlanId.hashCode, staffId.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['staffId'] = nativeToJson(staffId); + return json; + } + + CreateBenefitsDataBenefitsDataInsert({ + required this.vendorBenefitPlanId, + required this.staffId, + }); +} + +@immutable +class CreateBenefitsDataData { + final CreateBenefitsDataBenefitsDataInsert benefitsData_insert; + CreateBenefitsDataData.fromJson(dynamic json): + + benefitsData_insert = CreateBenefitsDataBenefitsDataInsert.fromJson(json['benefitsData_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateBenefitsDataData otherTyped = other as CreateBenefitsDataData; + return benefitsData_insert == otherTyped.benefitsData_insert; + + } + @override + int get hashCode => benefitsData_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['benefitsData_insert'] = benefitsData_insert.toJson(); + return json; + } + + CreateBenefitsDataData({ + required this.benefitsData_insert, + }); +} + +@immutable +class CreateBenefitsDataVariables { + final String vendorBenefitPlanId; + final String staffId; + final int current; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateBenefitsDataVariables.fromJson(Map json): + + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + staffId = nativeFromJson(json['staffId']), + current = nativeFromJson(json['current']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateBenefitsDataVariables otherTyped = other as CreateBenefitsDataVariables; + return vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + staffId == otherTyped.staffId && + current == otherTyped.current; + + } + @override + int get hashCode => Object.hashAll([vendorBenefitPlanId.hashCode, staffId.hashCode, current.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['staffId'] = nativeToJson(staffId); + json['current'] = nativeToJson(current); + return json; + } + + CreateBenefitsDataVariables({ + required this.vendorBenefitPlanId, + required this.staffId, + required this.current, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_business.dart new file mode 100644 index 00000000..1deab447 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_business.dart @@ -0,0 +1,300 @@ +part of 'generated.dart'; + +class CreateBusinessVariablesBuilder { + String businessName; + Optional _contactName = Optional.optional(nativeFromJson, nativeToJson); + String userId; + Optional _companyLogoUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _phone = Optional.optional(nativeFromJson, nativeToJson); + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _hubBuilding = Optional.optional(nativeFromJson, nativeToJson); + Optional _address = Optional.optional(nativeFromJson, nativeToJson); + Optional _city = Optional.optional(nativeFromJson, nativeToJson); + Optional _area = Optional.optional((data) => BusinessArea.values.byName(data), enumSerializer); + Optional _sector = Optional.optional((data) => BusinessSector.values.byName(data), enumSerializer); + BusinessRateGroup rateGroup; + BusinessStatus status; + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateBusinessVariablesBuilder contactName(String? t) { + _contactName.value = t; + return this; + } + CreateBusinessVariablesBuilder companyLogoUrl(String? t) { + _companyLogoUrl.value = t; + return this; + } + CreateBusinessVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + CreateBusinessVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateBusinessVariablesBuilder hubBuilding(String? t) { + _hubBuilding.value = t; + return this; + } + CreateBusinessVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + CreateBusinessVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + CreateBusinessVariablesBuilder area(BusinessArea? t) { + _area.value = t; + return this; + } + CreateBusinessVariablesBuilder sector(BusinessSector? t) { + _sector.value = t; + return this; + } + CreateBusinessVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + CreateBusinessVariablesBuilder(this._dataConnect, {required this.businessName,required this.userId,required this.rateGroup,required this.status,}); + Deserializer dataDeserializer = (dynamic json) => CreateBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateBusinessVariables vars= CreateBusinessVariables(businessName: businessName,contactName: _contactName,userId: userId,companyLogoUrl: _companyLogoUrl,phone: _phone,email: _email,hubBuilding: _hubBuilding,address: _address,city: _city,area: _area,sector: _sector,rateGroup: rateGroup,status: status,notes: _notes,); + return _dataConnect.mutation("createBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateBusinessBusinessInsert { + final String id; + CreateBusinessBusinessInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateBusinessBusinessInsert otherTyped = other as CreateBusinessBusinessInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateBusinessBusinessInsert({ + required this.id, + }); +} + +@immutable +class CreateBusinessData { + final CreateBusinessBusinessInsert business_insert; + CreateBusinessData.fromJson(dynamic json): + + business_insert = CreateBusinessBusinessInsert.fromJson(json['business_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateBusinessData otherTyped = other as CreateBusinessData; + return business_insert == otherTyped.business_insert; + + } + @override + int get hashCode => business_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['business_insert'] = business_insert.toJson(); + return json; + } + + CreateBusinessData({ + required this.business_insert, + }); +} + +@immutable +class CreateBusinessVariables { + final String businessName; + late final OptionalcontactName; + final String userId; + late final OptionalcompanyLogoUrl; + late final Optionalphone; + late final Optionalemail; + late final OptionalhubBuilding; + late final Optionaladdress; + late final Optionalcity; + late final Optionalarea; + late final Optionalsector; + final BusinessRateGroup rateGroup; + final BusinessStatus status; + late final Optionalnotes; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateBusinessVariables.fromJson(Map json): + + businessName = nativeFromJson(json['businessName']), + userId = nativeFromJson(json['userId']), + rateGroup = BusinessRateGroup.values.byName(json['rateGroup']), + status = BusinessStatus.values.byName(json['status']) { + + + + contactName = Optional.optional(nativeFromJson, nativeToJson); + contactName.value = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + + + + companyLogoUrl = Optional.optional(nativeFromJson, nativeToJson); + companyLogoUrl.value = json['companyLogoUrl'] == null ? null : nativeFromJson(json['companyLogoUrl']); + + + phone = Optional.optional(nativeFromJson, nativeToJson); + phone.value = json['phone'] == null ? null : nativeFromJson(json['phone']); + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + hubBuilding = Optional.optional(nativeFromJson, nativeToJson); + hubBuilding.value = json['hubBuilding'] == null ? null : nativeFromJson(json['hubBuilding']); + + + address = Optional.optional(nativeFromJson, nativeToJson); + address.value = json['address'] == null ? null : nativeFromJson(json['address']); + + + city = Optional.optional(nativeFromJson, nativeToJson); + city.value = json['city'] == null ? null : nativeFromJson(json['city']); + + + area = Optional.optional((data) => BusinessArea.values.byName(data), enumSerializer); + area.value = json['area'] == null ? null : BusinessArea.values.byName(json['area']); + + + sector = Optional.optional((data) => BusinessSector.values.byName(data), enumSerializer); + sector.value = json['sector'] == null ? null : BusinessSector.values.byName(json['sector']); + + + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateBusinessVariables otherTyped = other as CreateBusinessVariables; + return businessName == otherTyped.businessName && + contactName == otherTyped.contactName && + userId == otherTyped.userId && + companyLogoUrl == otherTyped.companyLogoUrl && + phone == otherTyped.phone && + email == otherTyped.email && + hubBuilding == otherTyped.hubBuilding && + address == otherTyped.address && + city == otherTyped.city && + area == otherTyped.area && + sector == otherTyped.sector && + rateGroup == otherTyped.rateGroup && + status == otherTyped.status && + notes == otherTyped.notes; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, contactName.hashCode, userId.hashCode, companyLogoUrl.hashCode, phone.hashCode, email.hashCode, hubBuilding.hashCode, address.hashCode, city.hashCode, area.hashCode, sector.hashCode, rateGroup.hashCode, status.hashCode, notes.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if(contactName.state == OptionalState.set) { + json['contactName'] = contactName.toJson(); + } + json['userId'] = nativeToJson(userId); + if(companyLogoUrl.state == OptionalState.set) { + json['companyLogoUrl'] = companyLogoUrl.toJson(); + } + if(phone.state == OptionalState.set) { + json['phone'] = phone.toJson(); + } + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(hubBuilding.state == OptionalState.set) { + json['hubBuilding'] = hubBuilding.toJson(); + } + if(address.state == OptionalState.set) { + json['address'] = address.toJson(); + } + if(city.state == OptionalState.set) { + json['city'] = city.toJson(); + } + if(area.state == OptionalState.set) { + json['area'] = area.toJson(); + } + if(sector.state == OptionalState.set) { + json['sector'] = sector.toJson(); + } + json['rateGroup'] = + rateGroup.name + ; + json['status'] = + status.name + ; + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + return json; + } + + CreateBusinessVariables({ + required this.businessName, + required this.contactName, + required this.userId, + required this.companyLogoUrl, + required this.phone, + required this.email, + required this.hubBuilding, + required this.address, + required this.city, + required this.area, + required this.sector, + required this.rateGroup, + required this.status, + required this.notes, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_category.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_category.dart new file mode 100644 index 00000000..407400a5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_category.dart @@ -0,0 +1,147 @@ +part of 'generated.dart'; + +class CreateCategoryVariablesBuilder { + String categoryId; + String label; + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateCategoryVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + + CreateCategoryVariablesBuilder(this._dataConnect, {required this.categoryId,required this.label,}); + Deserializer dataDeserializer = (dynamic json) => CreateCategoryData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateCategoryVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateCategoryVariables vars= CreateCategoryVariables(categoryId: categoryId,label: label,icon: _icon,); + return _dataConnect.mutation("createCategory", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateCategoryCategoryInsert { + final String id; + CreateCategoryCategoryInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCategoryCategoryInsert otherTyped = other as CreateCategoryCategoryInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateCategoryCategoryInsert({ + required this.id, + }); +} + +@immutable +class CreateCategoryData { + final CreateCategoryCategoryInsert category_insert; + CreateCategoryData.fromJson(dynamic json): + + category_insert = CreateCategoryCategoryInsert.fromJson(json['category_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCategoryData otherTyped = other as CreateCategoryData; + return category_insert == otherTyped.category_insert; + + } + @override + int get hashCode => category_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['category_insert'] = category_insert.toJson(); + return json; + } + + CreateCategoryData({ + required this.category_insert, + }); +} + +@immutable +class CreateCategoryVariables { + final String categoryId; + final String label; + late final Optionalicon; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateCategoryVariables.fromJson(Map json): + + categoryId = nativeFromJson(json['categoryId']), + label = nativeFromJson(json['label']) { + + + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCategoryVariables otherTyped = other as CreateCategoryVariables; + return categoryId == otherTyped.categoryId && + label == otherTyped.label && + icon == otherTyped.icon; + + } + @override + int get hashCode => Object.hashAll([categoryId.hashCode, label.hashCode, icon.hashCode]); + + + Map toJson() { + Map json = {}; + json['categoryId'] = nativeToJson(categoryId); + json['label'] = nativeToJson(label); + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + return json; + } + + CreateCategoryVariables({ + required this.categoryId, + required this.label, + required this.icon, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_certificate.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_certificate.dart new file mode 100644 index 00000000..0d6b45e2 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_certificate.dart @@ -0,0 +1,261 @@ +part of 'generated.dart'; + +class CreateCertificateVariablesBuilder { + String name; + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _expiry = Optional.optional((json) => json['expiry'] = Timestamp.fromJson(json['expiry']), defaultSerializer); + CertificateStatus status; + Optional _fileUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + Optional _certificationType = Optional.optional((data) => ComplianceType.values.byName(data), enumSerializer); + Optional _issuer = Optional.optional(nativeFromJson, nativeToJson); + String staffId; + Optional _validationStatus = Optional.optional((data) => ValidationStatus.values.byName(data), enumSerializer); + Optional _certificateNumber = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateCertificateVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateCertificateVariablesBuilder expiry(Timestamp? t) { + _expiry.value = t; + return this; + } + CreateCertificateVariablesBuilder fileUrl(String? t) { + _fileUrl.value = t; + return this; + } + CreateCertificateVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + CreateCertificateVariablesBuilder certificationType(ComplianceType? t) { + _certificationType.value = t; + return this; + } + CreateCertificateVariablesBuilder issuer(String? t) { + _issuer.value = t; + return this; + } + CreateCertificateVariablesBuilder validationStatus(ValidationStatus? t) { + _validationStatus.value = t; + return this; + } + CreateCertificateVariablesBuilder certificateNumber(String? t) { + _certificateNumber.value = t; + return this; + } + + CreateCertificateVariablesBuilder(this._dataConnect, {required this.name,required this.status,required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => CreateCertificateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateCertificateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateCertificateVariables vars= CreateCertificateVariables(name: name,description: _description,expiry: _expiry,status: status,fileUrl: _fileUrl,icon: _icon,certificationType: _certificationType,issuer: _issuer,staffId: staffId,validationStatus: _validationStatus,certificateNumber: _certificateNumber,); + return _dataConnect.mutation("CreateCertificate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateCertificateCertificateInsert { + final String id; + CreateCertificateCertificateInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCertificateCertificateInsert otherTyped = other as CreateCertificateCertificateInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateCertificateCertificateInsert({ + required this.id, + }); +} + +@immutable +class CreateCertificateData { + final CreateCertificateCertificateInsert certificate_insert; + CreateCertificateData.fromJson(dynamic json): + + certificate_insert = CreateCertificateCertificateInsert.fromJson(json['certificate_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCertificateData otherTyped = other as CreateCertificateData; + return certificate_insert == otherTyped.certificate_insert; + + } + @override + int get hashCode => certificate_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['certificate_insert'] = certificate_insert.toJson(); + return json; + } + + CreateCertificateData({ + required this.certificate_insert, + }); +} + +@immutable +class CreateCertificateVariables { + final String name; + late final Optionaldescription; + late final Optionalexpiry; + final CertificateStatus status; + late final OptionalfileUrl; + late final Optionalicon; + late final OptionalcertificationType; + late final Optionalissuer; + final String staffId; + late final OptionalvalidationStatus; + late final OptionalcertificateNumber; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateCertificateVariables.fromJson(Map json): + + name = nativeFromJson(json['name']), + status = CertificateStatus.values.byName(json['status']), + staffId = nativeFromJson(json['staffId']) { + + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + expiry = Optional.optional((json) => json['expiry'] = Timestamp.fromJson(json['expiry']), defaultSerializer); + expiry.value = json['expiry'] == null ? null : Timestamp.fromJson(json['expiry']); + + + + fileUrl = Optional.optional(nativeFromJson, nativeToJson); + fileUrl.value = json['fileUrl'] == null ? null : nativeFromJson(json['fileUrl']); + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + + certificationType = Optional.optional((data) => ComplianceType.values.byName(data), enumSerializer); + certificationType.value = json['certificationType'] == null ? null : ComplianceType.values.byName(json['certificationType']); + + + issuer = Optional.optional(nativeFromJson, nativeToJson); + issuer.value = json['issuer'] == null ? null : nativeFromJson(json['issuer']); + + + + validationStatus = Optional.optional((data) => ValidationStatus.values.byName(data), enumSerializer); + validationStatus.value = json['validationStatus'] == null ? null : ValidationStatus.values.byName(json['validationStatus']); + + + certificateNumber = Optional.optional(nativeFromJson, nativeToJson); + certificateNumber.value = json['certificateNumber'] == null ? null : nativeFromJson(json['certificateNumber']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCertificateVariables otherTyped = other as CreateCertificateVariables; + return name == otherTyped.name && + description == otherTyped.description && + expiry == otherTyped.expiry && + status == otherTyped.status && + fileUrl == otherTyped.fileUrl && + icon == otherTyped.icon && + certificationType == otherTyped.certificationType && + issuer == otherTyped.issuer && + staffId == otherTyped.staffId && + validationStatus == otherTyped.validationStatus && + certificateNumber == otherTyped.certificateNumber; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, description.hashCode, expiry.hashCode, status.hashCode, fileUrl.hashCode, icon.hashCode, certificationType.hashCode, issuer.hashCode, staffId.hashCode, validationStatus.hashCode, certificateNumber.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(expiry.state == OptionalState.set) { + json['expiry'] = expiry.toJson(); + } + json['status'] = + status.name + ; + if(fileUrl.state == OptionalState.set) { + json['fileUrl'] = fileUrl.toJson(); + } + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + if(certificationType.state == OptionalState.set) { + json['certificationType'] = certificationType.toJson(); + } + if(issuer.state == OptionalState.set) { + json['issuer'] = issuer.toJson(); + } + json['staffId'] = nativeToJson(staffId); + if(validationStatus.state == OptionalState.set) { + json['validationStatus'] = validationStatus.toJson(); + } + if(certificateNumber.state == OptionalState.set) { + json['certificateNumber'] = certificateNumber.toJson(); + } + return json; + } + + CreateCertificateVariables({ + required this.name, + required this.description, + required this.expiry, + required this.status, + required this.fileUrl, + required this.icon, + required this.certificationType, + required this.issuer, + required this.staffId, + required this.validationStatus, + required this.certificateNumber, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_client_feedback.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_client_feedback.dart new file mode 100644 index 00000000..407a98ae --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_client_feedback.dart @@ -0,0 +1,192 @@ +part of 'generated.dart'; + +class CreateClientFeedbackVariablesBuilder { + String businessId; + String vendorId; + Optional _rating = Optional.optional(nativeFromJson, nativeToJson); + Optional _comment = Optional.optional(nativeFromJson, nativeToJson); + Optional _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + Optional _createdBy = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateClientFeedbackVariablesBuilder rating(int? t) { + _rating.value = t; + return this; + } + CreateClientFeedbackVariablesBuilder comment(String? t) { + _comment.value = t; + return this; + } + CreateClientFeedbackVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + CreateClientFeedbackVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + CreateClientFeedbackVariablesBuilder(this._dataConnect, {required this.businessId,required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => CreateClientFeedbackData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateClientFeedbackVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateClientFeedbackVariables vars= CreateClientFeedbackVariables(businessId: businessId,vendorId: vendorId,rating: _rating,comment: _comment,date: _date,createdBy: _createdBy,); + return _dataConnect.mutation("createClientFeedback", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateClientFeedbackClientFeedbackInsert { + final String id; + CreateClientFeedbackClientFeedbackInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateClientFeedbackClientFeedbackInsert otherTyped = other as CreateClientFeedbackClientFeedbackInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateClientFeedbackClientFeedbackInsert({ + required this.id, + }); +} + +@immutable +class CreateClientFeedbackData { + final CreateClientFeedbackClientFeedbackInsert clientFeedback_insert; + CreateClientFeedbackData.fromJson(dynamic json): + + clientFeedback_insert = CreateClientFeedbackClientFeedbackInsert.fromJson(json['clientFeedback_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateClientFeedbackData otherTyped = other as CreateClientFeedbackData; + return clientFeedback_insert == otherTyped.clientFeedback_insert; + + } + @override + int get hashCode => clientFeedback_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['clientFeedback_insert'] = clientFeedback_insert.toJson(); + return json; + } + + CreateClientFeedbackData({ + required this.clientFeedback_insert, + }); +} + +@immutable +class CreateClientFeedbackVariables { + final String businessId; + final String vendorId; + late final Optionalrating; + late final Optionalcomment; + late final Optionaldate; + late final OptionalcreatedBy; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateClientFeedbackVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']) { + + + + + rating = Optional.optional(nativeFromJson, nativeToJson); + rating.value = json['rating'] == null ? null : nativeFromJson(json['rating']); + + + comment = Optional.optional(nativeFromJson, nativeToJson); + comment.value = json['comment'] == null ? null : nativeFromJson(json['comment']); + + + date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']); + + + createdBy = Optional.optional(nativeFromJson, nativeToJson); + createdBy.value = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateClientFeedbackVariables otherTyped = other as CreateClientFeedbackVariables; + return businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if(rating.state == OptionalState.set) { + json['rating'] = rating.toJson(); + } + if(comment.state == OptionalState.set) { + json['comment'] = comment.toJson(); + } + if(date.state == OptionalState.set) { + json['date'] = date.toJson(); + } + if(createdBy.state == OptionalState.set) { + json['createdBy'] = createdBy.toJson(); + } + return json; + } + + CreateClientFeedbackVariables({ + required this.businessId, + required this.vendorId, + required this.rating, + required this.comment, + required this.date, + required this.createdBy, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_conversation.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_conversation.dart new file mode 100644 index 00000000..edbdbfbd --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_conversation.dart @@ -0,0 +1,223 @@ +part of 'generated.dart'; + +class CreateConversationVariablesBuilder { + Optional _subject = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => ConversationStatus.values.byName(data), enumSerializer); + Optional _conversationType = Optional.optional((data) => ConversationType.values.byName(data), enumSerializer); + Optional _isGroup = Optional.optional(nativeFromJson, nativeToJson); + Optional _groupName = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastMessage = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastMessageAt = Optional.optional((json) => json['lastMessageAt'] = Timestamp.fromJson(json['lastMessageAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; + CreateConversationVariablesBuilder subject(String? t) { + _subject.value = t; + return this; + } + CreateConversationVariablesBuilder status(ConversationStatus? t) { + _status.value = t; + return this; + } + CreateConversationVariablesBuilder conversationType(ConversationType? t) { + _conversationType.value = t; + return this; + } + CreateConversationVariablesBuilder isGroup(bool? t) { + _isGroup.value = t; + return this; + } + CreateConversationVariablesBuilder groupName(String? t) { + _groupName.value = t; + return this; + } + CreateConversationVariablesBuilder lastMessage(String? t) { + _lastMessage.value = t; + return this; + } + CreateConversationVariablesBuilder lastMessageAt(Timestamp? t) { + _lastMessageAt.value = t; + return this; + } + + CreateConversationVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => CreateConversationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateConversationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateConversationVariables vars= CreateConversationVariables(subject: _subject,status: _status,conversationType: _conversationType,isGroup: _isGroup,groupName: _groupName,lastMessage: _lastMessage,lastMessageAt: _lastMessageAt,); + return _dataConnect.mutation("createConversation", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateConversationConversationInsert { + final String id; + CreateConversationConversationInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateConversationConversationInsert otherTyped = other as CreateConversationConversationInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateConversationConversationInsert({ + required this.id, + }); +} + +@immutable +class CreateConversationData { + final CreateConversationConversationInsert conversation_insert; + CreateConversationData.fromJson(dynamic json): + + conversation_insert = CreateConversationConversationInsert.fromJson(json['conversation_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateConversationData otherTyped = other as CreateConversationData; + return conversation_insert == otherTyped.conversation_insert; + + } + @override + int get hashCode => conversation_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['conversation_insert'] = conversation_insert.toJson(); + return json; + } + + CreateConversationData({ + required this.conversation_insert, + }); +} + +@immutable +class CreateConversationVariables { + late final Optionalsubject; + late final Optionalstatus; + late final OptionalconversationType; + late final OptionalisGroup; + late final OptionalgroupName; + late final OptionallastMessage; + late final OptionallastMessageAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateConversationVariables.fromJson(Map json) { + + + subject = Optional.optional(nativeFromJson, nativeToJson); + subject.value = json['subject'] == null ? null : nativeFromJson(json['subject']); + + + status = Optional.optional((data) => ConversationStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : ConversationStatus.values.byName(json['status']); + + + conversationType = Optional.optional((data) => ConversationType.values.byName(data), enumSerializer); + conversationType.value = json['conversationType'] == null ? null : ConversationType.values.byName(json['conversationType']); + + + isGroup = Optional.optional(nativeFromJson, nativeToJson); + isGroup.value = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']); + + + groupName = Optional.optional(nativeFromJson, nativeToJson); + groupName.value = json['groupName'] == null ? null : nativeFromJson(json['groupName']); + + + lastMessage = Optional.optional(nativeFromJson, nativeToJson); + lastMessage.value = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']); + + + lastMessageAt = Optional.optional((json) => json['lastMessageAt'] = Timestamp.fromJson(json['lastMessageAt']), defaultSerializer); + lastMessageAt.value = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateConversationVariables otherTyped = other as CreateConversationVariables; + return subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt; + + } + @override + int get hashCode => Object.hashAll([subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode]); + + + Map toJson() { + Map json = {}; + if(subject.state == OptionalState.set) { + json['subject'] = subject.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(conversationType.state == OptionalState.set) { + json['conversationType'] = conversationType.toJson(); + } + if(isGroup.state == OptionalState.set) { + json['isGroup'] = isGroup.toJson(); + } + if(groupName.state == OptionalState.set) { + json['groupName'] = groupName.toJson(); + } + if(lastMessage.state == OptionalState.set) { + json['lastMessage'] = lastMessage.toJson(); + } + if(lastMessageAt.state == OptionalState.set) { + json['lastMessageAt'] = lastMessageAt.toJson(); + } + return json; + } + + CreateConversationVariables({ + required this.subject, + required this.status, + required this.conversationType, + required this.isGroup, + required this.groupName, + required this.lastMessage, + required this.lastMessageAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_course.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_course.dart new file mode 100644 index 00000000..40892dad --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_course.dart @@ -0,0 +1,231 @@ +part of 'generated.dart'; + +class CreateCourseVariablesBuilder { + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _thumbnailUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _durationMinutes = Optional.optional(nativeFromJson, nativeToJson); + Optional _xpReward = Optional.optional(nativeFromJson, nativeToJson); + String categoryId; + Optional _levelRequired = Optional.optional(nativeFromJson, nativeToJson); + Optional _isCertification = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + CreateCourseVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + CreateCourseVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateCourseVariablesBuilder thumbnailUrl(String? t) { + _thumbnailUrl.value = t; + return this; + } + CreateCourseVariablesBuilder durationMinutes(int? t) { + _durationMinutes.value = t; + return this; + } + CreateCourseVariablesBuilder xpReward(int? t) { + _xpReward.value = t; + return this; + } + CreateCourseVariablesBuilder levelRequired(String? t) { + _levelRequired.value = t; + return this; + } + CreateCourseVariablesBuilder isCertification(bool? t) { + _isCertification.value = t; + return this; + } + + CreateCourseVariablesBuilder(this._dataConnect, {required this.categoryId,}); + Deserializer dataDeserializer = (dynamic json) => CreateCourseData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateCourseVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateCourseVariables vars= CreateCourseVariables(title: _title,description: _description,thumbnailUrl: _thumbnailUrl,durationMinutes: _durationMinutes,xpReward: _xpReward,categoryId: categoryId,levelRequired: _levelRequired,isCertification: _isCertification,); + return _dataConnect.mutation("createCourse", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateCourseCourseInsert { + final String id; + CreateCourseCourseInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCourseCourseInsert otherTyped = other as CreateCourseCourseInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateCourseCourseInsert({ + required this.id, + }); +} + +@immutable +class CreateCourseData { + final CreateCourseCourseInsert course_insert; + CreateCourseData.fromJson(dynamic json): + + course_insert = CreateCourseCourseInsert.fromJson(json['course_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCourseData otherTyped = other as CreateCourseData; + return course_insert == otherTyped.course_insert; + + } + @override + int get hashCode => course_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['course_insert'] = course_insert.toJson(); + return json; + } + + CreateCourseData({ + required this.course_insert, + }); +} + +@immutable +class CreateCourseVariables { + late final Optionaltitle; + late final Optionaldescription; + late final OptionalthumbnailUrl; + late final OptionaldurationMinutes; + late final OptionalxpReward; + final String categoryId; + late final OptionallevelRequired; + late final OptionalisCertification; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateCourseVariables.fromJson(Map json): + + categoryId = nativeFromJson(json['categoryId']) { + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + thumbnailUrl = Optional.optional(nativeFromJson, nativeToJson); + thumbnailUrl.value = json['thumbnailUrl'] == null ? null : nativeFromJson(json['thumbnailUrl']); + + + durationMinutes = Optional.optional(nativeFromJson, nativeToJson); + durationMinutes.value = json['durationMinutes'] == null ? null : nativeFromJson(json['durationMinutes']); + + + xpReward = Optional.optional(nativeFromJson, nativeToJson); + xpReward.value = json['xpReward'] == null ? null : nativeFromJson(json['xpReward']); + + + + levelRequired = Optional.optional(nativeFromJson, nativeToJson); + levelRequired.value = json['levelRequired'] == null ? null : nativeFromJson(json['levelRequired']); + + + isCertification = Optional.optional(nativeFromJson, nativeToJson); + isCertification.value = json['isCertification'] == null ? null : nativeFromJson(json['isCertification']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCourseVariables otherTyped = other as CreateCourseVariables; + return title == otherTyped.title && + description == otherTyped.description && + thumbnailUrl == otherTyped.thumbnailUrl && + durationMinutes == otherTyped.durationMinutes && + xpReward == otherTyped.xpReward && + categoryId == otherTyped.categoryId && + levelRequired == otherTyped.levelRequired && + isCertification == otherTyped.isCertification; + + } + @override + int get hashCode => Object.hashAll([title.hashCode, description.hashCode, thumbnailUrl.hashCode, durationMinutes.hashCode, xpReward.hashCode, categoryId.hashCode, levelRequired.hashCode, isCertification.hashCode]); + + + Map toJson() { + Map json = {}; + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(thumbnailUrl.state == OptionalState.set) { + json['thumbnailUrl'] = thumbnailUrl.toJson(); + } + if(durationMinutes.state == OptionalState.set) { + json['durationMinutes'] = durationMinutes.toJson(); + } + if(xpReward.state == OptionalState.set) { + json['xpReward'] = xpReward.toJson(); + } + json['categoryId'] = nativeToJson(categoryId); + if(levelRequired.state == OptionalState.set) { + json['levelRequired'] = levelRequired.toJson(); + } + if(isCertification.state == OptionalState.set) { + json['isCertification'] = isCertification.toJson(); + } + return json; + } + + CreateCourseVariables({ + required this.title, + required this.description, + required this.thumbnailUrl, + required this.durationMinutes, + required this.xpReward, + required this.categoryId, + required this.levelRequired, + required this.isCertification, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_custom_rate_card.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_custom_rate_card.dart new file mode 100644 index 00000000..28ac8eb7 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_custom_rate_card.dart @@ -0,0 +1,170 @@ +part of 'generated.dart'; + +class CreateCustomRateCardVariablesBuilder { + String name; + Optional _baseBook = Optional.optional(nativeFromJson, nativeToJson); + Optional _discount = Optional.optional(nativeFromJson, nativeToJson); + Optional _isDefault = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateCustomRateCardVariablesBuilder baseBook(String? t) { + _baseBook.value = t; + return this; + } + CreateCustomRateCardVariablesBuilder discount(double? t) { + _discount.value = t; + return this; + } + CreateCustomRateCardVariablesBuilder isDefault(bool? t) { + _isDefault.value = t; + return this; + } + + CreateCustomRateCardVariablesBuilder(this._dataConnect, {required this.name,}); + Deserializer dataDeserializer = (dynamic json) => CreateCustomRateCardData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateCustomRateCardVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateCustomRateCardVariables vars= CreateCustomRateCardVariables(name: name,baseBook: _baseBook,discount: _discount,isDefault: _isDefault,); + return _dataConnect.mutation("createCustomRateCard", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateCustomRateCardCustomRateCardInsert { + final String id; + CreateCustomRateCardCustomRateCardInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCustomRateCardCustomRateCardInsert otherTyped = other as CreateCustomRateCardCustomRateCardInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateCustomRateCardCustomRateCardInsert({ + required this.id, + }); +} + +@immutable +class CreateCustomRateCardData { + final CreateCustomRateCardCustomRateCardInsert customRateCard_insert; + CreateCustomRateCardData.fromJson(dynamic json): + + customRateCard_insert = CreateCustomRateCardCustomRateCardInsert.fromJson(json['customRateCard_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCustomRateCardData otherTyped = other as CreateCustomRateCardData; + return customRateCard_insert == otherTyped.customRateCard_insert; + + } + @override + int get hashCode => customRateCard_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['customRateCard_insert'] = customRateCard_insert.toJson(); + return json; + } + + CreateCustomRateCardData({ + required this.customRateCard_insert, + }); +} + +@immutable +class CreateCustomRateCardVariables { + final String name; + late final OptionalbaseBook; + late final Optionaldiscount; + late final OptionalisDefault; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateCustomRateCardVariables.fromJson(Map json): + + name = nativeFromJson(json['name']) { + + + + baseBook = Optional.optional(nativeFromJson, nativeToJson); + baseBook.value = json['baseBook'] == null ? null : nativeFromJson(json['baseBook']); + + + discount = Optional.optional(nativeFromJson, nativeToJson); + discount.value = json['discount'] == null ? null : nativeFromJson(json['discount']); + + + isDefault = Optional.optional(nativeFromJson, nativeToJson); + isDefault.value = json['isDefault'] == null ? null : nativeFromJson(json['isDefault']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateCustomRateCardVariables otherTyped = other as CreateCustomRateCardVariables; + return name == otherTyped.name && + baseBook == otherTyped.baseBook && + discount == otherTyped.discount && + isDefault == otherTyped.isDefault; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, baseBook.hashCode, discount.hashCode, isDefault.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + if(baseBook.state == OptionalState.set) { + json['baseBook'] = baseBook.toJson(); + } + if(discount.state == OptionalState.set) { + json['discount'] = discount.toJson(); + } + if(isDefault.state == OptionalState.set) { + json['isDefault'] = isDefault.toJson(); + } + return json; + } + + CreateCustomRateCardVariables({ + required this.name, + required this.baseBook, + required this.discount, + required this.isDefault, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_document.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_document.dart new file mode 100644 index 00000000..1e8735c0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_document.dart @@ -0,0 +1,149 @@ +part of 'generated.dart'; + +class CreateDocumentVariablesBuilder { + DocumentType documentType; + String name; + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateDocumentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + + CreateDocumentVariablesBuilder(this._dataConnect, {required this.documentType,required this.name,}); + Deserializer dataDeserializer = (dynamic json) => CreateDocumentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateDocumentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateDocumentVariables vars= CreateDocumentVariables(documentType: documentType,name: name,description: _description,); + return _dataConnect.mutation("createDocument", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateDocumentDocumentInsert { + final String id; + CreateDocumentDocumentInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateDocumentDocumentInsert otherTyped = other as CreateDocumentDocumentInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateDocumentDocumentInsert({ + required this.id, + }); +} + +@immutable +class CreateDocumentData { + final CreateDocumentDocumentInsert document_insert; + CreateDocumentData.fromJson(dynamic json): + + document_insert = CreateDocumentDocumentInsert.fromJson(json['document_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateDocumentData otherTyped = other as CreateDocumentData; + return document_insert == otherTyped.document_insert; + + } + @override + int get hashCode => document_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['document_insert'] = document_insert.toJson(); + return json; + } + + CreateDocumentData({ + required this.document_insert, + }); +} + +@immutable +class CreateDocumentVariables { + final DocumentType documentType; + final String name; + late final Optionaldescription; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateDocumentVariables.fromJson(Map json): + + documentType = DocumentType.values.byName(json['documentType']), + name = nativeFromJson(json['name']) { + + + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateDocumentVariables otherTyped = other as CreateDocumentVariables; + return documentType == otherTyped.documentType && + name == otherTyped.name && + description == otherTyped.description; + + } + @override + int get hashCode => Object.hashAll([documentType.hashCode, name.hashCode, description.hashCode]); + + + Map toJson() { + Map json = {}; + json['documentType'] = + documentType.name + ; + json['name'] = nativeToJson(name); + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + return json; + } + + CreateDocumentVariables({ + required this.documentType, + required this.name, + required this.description, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_emergency_contact.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_emergency_contact.dart new file mode 100644 index 00000000..f843e41f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_emergency_contact.dart @@ -0,0 +1,142 @@ +part of 'generated.dart'; + +class CreateEmergencyContactVariablesBuilder { + String name; + String phone; + RelationshipType relationship; + String staffId; + + final FirebaseDataConnect _dataConnect; + CreateEmergencyContactVariablesBuilder(this._dataConnect, {required this.name,required this.phone,required this.relationship,required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => CreateEmergencyContactData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateEmergencyContactVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateEmergencyContactVariables vars= CreateEmergencyContactVariables(name: name,phone: phone,relationship: relationship,staffId: staffId,); + return _dataConnect.mutation("createEmergencyContact", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateEmergencyContactEmergencyContactInsert { + final String id; + CreateEmergencyContactEmergencyContactInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateEmergencyContactEmergencyContactInsert otherTyped = other as CreateEmergencyContactEmergencyContactInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateEmergencyContactEmergencyContactInsert({ + required this.id, + }); +} + +@immutable +class CreateEmergencyContactData { + final CreateEmergencyContactEmergencyContactInsert emergencyContact_insert; + CreateEmergencyContactData.fromJson(dynamic json): + + emergencyContact_insert = CreateEmergencyContactEmergencyContactInsert.fromJson(json['emergencyContact_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateEmergencyContactData otherTyped = other as CreateEmergencyContactData; + return emergencyContact_insert == otherTyped.emergencyContact_insert; + + } + @override + int get hashCode => emergencyContact_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['emergencyContact_insert'] = emergencyContact_insert.toJson(); + return json; + } + + CreateEmergencyContactData({ + required this.emergencyContact_insert, + }); +} + +@immutable +class CreateEmergencyContactVariables { + final String name; + final String phone; + final RelationshipType relationship; + final String staffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateEmergencyContactVariables.fromJson(Map json): + + name = nativeFromJson(json['name']), + phone = nativeFromJson(json['phone']), + relationship = RelationshipType.values.byName(json['relationship']), + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateEmergencyContactVariables otherTyped = other as CreateEmergencyContactVariables; + return name == otherTyped.name && + phone == otherTyped.phone && + relationship == otherTyped.relationship && + staffId == otherTyped.staffId; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, phone.hashCode, relationship.hashCode, staffId.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + json['phone'] = nativeToJson(phone); + json['relationship'] = + relationship.name + ; + json['staffId'] = nativeToJson(staffId); + return json; + } + + CreateEmergencyContactVariables({ + required this.name, + required this.phone, + required this.relationship, + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_faq_data.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_faq_data.dart new file mode 100644 index 00000000..7f57359f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_faq_data.dart @@ -0,0 +1,142 @@ +part of 'generated.dart'; + +class CreateFaqDataVariablesBuilder { + String category; + Optional> _questions = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + + final FirebaseDataConnect _dataConnect; CreateFaqDataVariablesBuilder questions(List? t) { + _questions.value = t; + return this; + } + + CreateFaqDataVariablesBuilder(this._dataConnect, {required this.category,}); + Deserializer dataDeserializer = (dynamic json) => CreateFaqDataData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateFaqDataVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateFaqDataVariables vars= CreateFaqDataVariables(category: category,questions: _questions,); + return _dataConnect.mutation("createFaqData", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateFaqDataFaqDataInsert { + final String id; + CreateFaqDataFaqDataInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateFaqDataFaqDataInsert otherTyped = other as CreateFaqDataFaqDataInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateFaqDataFaqDataInsert({ + required this.id, + }); +} + +@immutable +class CreateFaqDataData { + final CreateFaqDataFaqDataInsert faqData_insert; + CreateFaqDataData.fromJson(dynamic json): + + faqData_insert = CreateFaqDataFaqDataInsert.fromJson(json['faqData_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateFaqDataData otherTyped = other as CreateFaqDataData; + return faqData_insert == otherTyped.faqData_insert; + + } + @override + int get hashCode => faqData_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['faqData_insert'] = faqData_insert.toJson(); + return json; + } + + CreateFaqDataData({ + required this.faqData_insert, + }); +} + +@immutable +class CreateFaqDataVariables { + final String category; + late final Optional>questions; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateFaqDataVariables.fromJson(Map json): + + category = nativeFromJson(json['category']) { + + + + questions = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + questions.value = json['questions'] == null ? null : (json['questions'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateFaqDataVariables otherTyped = other as CreateFaqDataVariables; + return category == otherTyped.category && + questions == otherTyped.questions; + + } + @override + int get hashCode => Object.hashAll([category.hashCode, questions.hashCode]); + + + Map toJson() { + Map json = {}; + json['category'] = nativeToJson(category); + if(questions.state == OptionalState.set) { + json['questions'] = questions.toJson(); + } + return json; + } + + CreateFaqDataVariables({ + required this.category, + required this.questions, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_hub.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_hub.dart new file mode 100644 index 00000000..b418f9bc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_hub.dart @@ -0,0 +1,177 @@ +part of 'generated.dart'; + +class CreateHubVariablesBuilder { + String name; + Optional _locationName = Optional.optional(nativeFromJson, nativeToJson); + Optional _address = Optional.optional(nativeFromJson, nativeToJson); + Optional _nfcTagId = Optional.optional(nativeFromJson, nativeToJson); + String ownerId; + + final FirebaseDataConnect _dataConnect; CreateHubVariablesBuilder locationName(String? t) { + _locationName.value = t; + return this; + } + CreateHubVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + CreateHubVariablesBuilder nfcTagId(String? t) { + _nfcTagId.value = t; + return this; + } + + CreateHubVariablesBuilder(this._dataConnect, {required this.name,required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => CreateHubData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateHubVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateHubVariables vars= CreateHubVariables(name: name,locationName: _locationName,address: _address,nfcTagId: _nfcTagId,ownerId: ownerId,); + return _dataConnect.mutation("createHub", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateHubHubInsert { + final String id; + CreateHubHubInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateHubHubInsert otherTyped = other as CreateHubHubInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateHubHubInsert({ + required this.id, + }); +} + +@immutable +class CreateHubData { + final CreateHubHubInsert hub_insert; + CreateHubData.fromJson(dynamic json): + + hub_insert = CreateHubHubInsert.fromJson(json['hub_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateHubData otherTyped = other as CreateHubData; + return hub_insert == otherTyped.hub_insert; + + } + @override + int get hashCode => hub_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['hub_insert'] = hub_insert.toJson(); + return json; + } + + CreateHubData({ + required this.hub_insert, + }); +} + +@immutable +class CreateHubVariables { + final String name; + late final OptionallocationName; + late final Optionaladdress; + late final OptionalnfcTagId; + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateHubVariables.fromJson(Map json): + + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']) { + + + + locationName = Optional.optional(nativeFromJson, nativeToJson); + locationName.value = json['locationName'] == null ? null : nativeFromJson(json['locationName']); + + + address = Optional.optional(nativeFromJson, nativeToJson); + address.value = json['address'] == null ? null : nativeFromJson(json['address']); + + + nfcTagId = Optional.optional(nativeFromJson, nativeToJson); + nfcTagId.value = json['nfcTagId'] == null ? null : nativeFromJson(json['nfcTagId']); + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateHubVariables otherTyped = other as CreateHubVariables; + return name == otherTyped.name && + locationName == otherTyped.locationName && + address == otherTyped.address && + nfcTagId == otherTyped.nfcTagId && + ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, locationName.hashCode, address.hashCode, nfcTagId.hashCode, ownerId.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + if(locationName.state == OptionalState.set) { + json['locationName'] = locationName.toJson(); + } + if(address.state == OptionalState.set) { + json['address'] = address.toJson(); + } + if(nfcTagId.state == OptionalState.set) { + json['nfcTagId'] = nfcTagId.toJson(); + } + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + CreateHubVariables({ + required this.name, + required this.locationName, + required this.address, + required this.nfcTagId, + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_invoice.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_invoice.dart new file mode 100644 index 00000000..02946656 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_invoice.dart @@ -0,0 +1,341 @@ +part of 'generated.dart'; + +class CreateInvoiceVariablesBuilder { + InvoiceStatus status; + String vendorId; + String businessId; + String orderId; + Optional _paymentTerms = Optional.optional((data) => InovicePaymentTerms.values.byName(data), enumSerializer); + String invoiceNumber; + Timestamp issueDate; + Timestamp dueDate; + Optional _hub = Optional.optional(nativeFromJson, nativeToJson); + Optional _managerName = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _otherCharges = Optional.optional(nativeFromJson, nativeToJson); + Optional _subtotal = Optional.optional(nativeFromJson, nativeToJson); + double amount; + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + Optional _staffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _chargesCount = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateInvoiceVariablesBuilder paymentTerms(InovicePaymentTerms? t) { + _paymentTerms.value = t; + return this; + } + CreateInvoiceVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + CreateInvoiceVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + CreateInvoiceVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + CreateInvoiceVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + CreateInvoiceVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + CreateInvoiceVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + CreateInvoiceVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + CreateInvoiceVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + CreateInvoiceVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + CreateInvoiceVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + + CreateInvoiceVariablesBuilder(this._dataConnect, {required this.status,required this.vendorId,required this.businessId,required this.orderId,required this.invoiceNumber,required this.issueDate,required this.dueDate,required this.amount,}); + Deserializer dataDeserializer = (dynamic json) => CreateInvoiceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateInvoiceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateInvoiceVariables vars= CreateInvoiceVariables(status: status,vendorId: vendorId,businessId: businessId,orderId: orderId,paymentTerms: _paymentTerms,invoiceNumber: invoiceNumber,issueDate: issueDate,dueDate: dueDate,hub: _hub,managerName: _managerName,vendorNumber: _vendorNumber,roles: _roles,charges: _charges,otherCharges: _otherCharges,subtotal: _subtotal,amount: amount,notes: _notes,staffCount: _staffCount,chargesCount: _chargesCount,); + return _dataConnect.mutation("createInvoice", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateInvoiceInvoiceInsert { + final String id; + CreateInvoiceInvoiceInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateInvoiceInvoiceInsert otherTyped = other as CreateInvoiceInvoiceInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateInvoiceInvoiceInsert({ + required this.id, + }); +} + +@immutable +class CreateInvoiceData { + final CreateInvoiceInvoiceInsert invoice_insert; + CreateInvoiceData.fromJson(dynamic json): + + invoice_insert = CreateInvoiceInvoiceInsert.fromJson(json['invoice_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateInvoiceData otherTyped = other as CreateInvoiceData; + return invoice_insert == otherTyped.invoice_insert; + + } + @override + int get hashCode => invoice_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['invoice_insert'] = invoice_insert.toJson(); + return json; + } + + CreateInvoiceData({ + required this.invoice_insert, + }); +} + +@immutable +class CreateInvoiceVariables { + final InvoiceStatus status; + final String vendorId; + final String businessId; + final String orderId; + late final OptionalpaymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + late final Optionalhub; + late final OptionalmanagerName; + late final OptionalvendorNumber; + late final Optionalroles; + late final Optionalcharges; + late final OptionalotherCharges; + late final Optionalsubtotal; + final double amount; + late final Optionalnotes; + late final OptionalstaffCount; + late final OptionalchargesCount; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateInvoiceVariables.fromJson(Map json): + + status = InvoiceStatus.values.byName(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + amount = nativeFromJson(json['amount']) { + + + + + + + paymentTerms = Optional.optional((data) => InovicePaymentTerms.values.byName(data), enumSerializer); + paymentTerms.value = json['paymentTerms'] == null ? null : InovicePaymentTerms.values.byName(json['paymentTerms']); + + + + + + hub = Optional.optional(nativeFromJson, nativeToJson); + hub.value = json['hub'] == null ? null : nativeFromJson(json['hub']); + + + managerName = Optional.optional(nativeFromJson, nativeToJson); + managerName.value = json['managerName'] == null ? null : nativeFromJson(json['managerName']); + + + vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + vendorNumber.value = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']); + + + roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + roles.value = json['roles'] == null ? null : AnyValue.fromJson(json['roles']); + + + charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + charges.value = json['charges'] == null ? null : AnyValue.fromJson(json['charges']); + + + otherCharges = Optional.optional(nativeFromJson, nativeToJson); + otherCharges.value = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']); + + + subtotal = Optional.optional(nativeFromJson, nativeToJson); + subtotal.value = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']); + + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + + staffCount = Optional.optional(nativeFromJson, nativeToJson); + staffCount.value = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']); + + + chargesCount = Optional.optional(nativeFromJson, nativeToJson); + chargesCount.value = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateInvoiceVariables otherTyped = other as CreateInvoiceVariables; + return status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + status.name + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if(paymentTerms.state == OptionalState.set) { + json['paymentTerms'] = paymentTerms.toJson(); + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if(hub.state == OptionalState.set) { + json['hub'] = hub.toJson(); + } + if(managerName.state == OptionalState.set) { + json['managerName'] = managerName.toJson(); + } + if(vendorNumber.state == OptionalState.set) { + json['vendorNumber'] = vendorNumber.toJson(); + } + if(roles.state == OptionalState.set) { + json['roles'] = roles.toJson(); + } + if(charges.state == OptionalState.set) { + json['charges'] = charges.toJson(); + } + if(otherCharges.state == OptionalState.set) { + json['otherCharges'] = otherCharges.toJson(); + } + if(subtotal.state == OptionalState.set) { + json['subtotal'] = subtotal.toJson(); + } + json['amount'] = nativeToJson(amount); + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + if(staffCount.state == OptionalState.set) { + json['staffCount'] = staffCount.toJson(); + } + if(chargesCount.state == OptionalState.set) { + json['chargesCount'] = chargesCount.toJson(); + } + return json; + } + + CreateInvoiceVariables({ + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + required this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + required this.hub, + required this.managerName, + required this.vendorNumber, + required this.roles, + required this.charges, + required this.otherCharges, + required this.subtotal, + required this.amount, + required this.notes, + required this.staffCount, + required this.chargesCount, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_invoice_template.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_invoice_template.dart new file mode 100644 index 00000000..317d2fd7 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_invoice_template.dart @@ -0,0 +1,402 @@ +part of 'generated.dart'; + +class CreateInvoiceTemplateVariablesBuilder { + String name; + String ownerId; + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _businessId = Optional.optional(nativeFromJson, nativeToJson); + Optional _orderId = Optional.optional(nativeFromJson, nativeToJson); + Optional _paymentTerms = Optional.optional((data) => InovicePaymentTermsTemp.values.byName(data), enumSerializer); + Optional _invoiceNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _issueDate = Optional.optional((json) => json['issueDate'] = Timestamp.fromJson(json['issueDate']), defaultSerializer); + Optional _dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + Optional _hub = Optional.optional(nativeFromJson, nativeToJson); + Optional _managerName = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _otherCharges = Optional.optional(nativeFromJson, nativeToJson); + Optional _subtotal = Optional.optional(nativeFromJson, nativeToJson); + Optional _amount = Optional.optional(nativeFromJson, nativeToJson); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + Optional _staffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _chargesCount = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateInvoiceTemplateVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder paymentTerms(InovicePaymentTermsTemp? t) { + _paymentTerms.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder invoiceNumber(String? t) { + _invoiceNumber.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder issueDate(Timestamp? t) { + _issueDate.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder amount(double? t) { + _amount.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + CreateInvoiceTemplateVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + + CreateInvoiceTemplateVariablesBuilder(this._dataConnect, {required this.name,required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => CreateInvoiceTemplateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateInvoiceTemplateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateInvoiceTemplateVariables vars= CreateInvoiceTemplateVariables(name: name,ownerId: ownerId,vendorId: _vendorId,businessId: _businessId,orderId: _orderId,paymentTerms: _paymentTerms,invoiceNumber: _invoiceNumber,issueDate: _issueDate,dueDate: _dueDate,hub: _hub,managerName: _managerName,vendorNumber: _vendorNumber,roles: _roles,charges: _charges,otherCharges: _otherCharges,subtotal: _subtotal,amount: _amount,notes: _notes,staffCount: _staffCount,chargesCount: _chargesCount,); + return _dataConnect.mutation("createInvoiceTemplate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateInvoiceTemplateInvoiceTemplateInsert { + final String id; + CreateInvoiceTemplateInvoiceTemplateInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateInvoiceTemplateInvoiceTemplateInsert otherTyped = other as CreateInvoiceTemplateInvoiceTemplateInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateInvoiceTemplateInvoiceTemplateInsert({ + required this.id, + }); +} + +@immutable +class CreateInvoiceTemplateData { + final CreateInvoiceTemplateInvoiceTemplateInsert invoiceTemplate_insert; + CreateInvoiceTemplateData.fromJson(dynamic json): + + invoiceTemplate_insert = CreateInvoiceTemplateInvoiceTemplateInsert.fromJson(json['invoiceTemplate_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateInvoiceTemplateData otherTyped = other as CreateInvoiceTemplateData; + return invoiceTemplate_insert == otherTyped.invoiceTemplate_insert; + + } + @override + int get hashCode => invoiceTemplate_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['invoiceTemplate_insert'] = invoiceTemplate_insert.toJson(); + return json; + } + + CreateInvoiceTemplateData({ + required this.invoiceTemplate_insert, + }); +} + +@immutable +class CreateInvoiceTemplateVariables { + final String name; + final String ownerId; + late final OptionalvendorId; + late final OptionalbusinessId; + late final OptionalorderId; + late final OptionalpaymentTerms; + late final OptionalinvoiceNumber; + late final OptionalissueDate; + late final OptionaldueDate; + late final Optionalhub; + late final OptionalmanagerName; + late final OptionalvendorNumber; + late final Optionalroles; + late final Optionalcharges; + late final OptionalotherCharges; + late final Optionalsubtotal; + late final Optionalamount; + late final Optionalnotes; + late final OptionalstaffCount; + late final OptionalchargesCount; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateInvoiceTemplateVariables.fromJson(Map json): + + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']) { + + + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + businessId = Optional.optional(nativeFromJson, nativeToJson); + businessId.value = json['businessId'] == null ? null : nativeFromJson(json['businessId']); + + + orderId = Optional.optional(nativeFromJson, nativeToJson); + orderId.value = json['orderId'] == null ? null : nativeFromJson(json['orderId']); + + + paymentTerms = Optional.optional((data) => InovicePaymentTermsTemp.values.byName(data), enumSerializer); + paymentTerms.value = json['paymentTerms'] == null ? null : InovicePaymentTermsTemp.values.byName(json['paymentTerms']); + + + invoiceNumber = Optional.optional(nativeFromJson, nativeToJson); + invoiceNumber.value = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']); + + + issueDate = Optional.optional((json) => json['issueDate'] = Timestamp.fromJson(json['issueDate']), defaultSerializer); + issueDate.value = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']); + + + dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + dueDate.value = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']); + + + hub = Optional.optional(nativeFromJson, nativeToJson); + hub.value = json['hub'] == null ? null : nativeFromJson(json['hub']); + + + managerName = Optional.optional(nativeFromJson, nativeToJson); + managerName.value = json['managerName'] == null ? null : nativeFromJson(json['managerName']); + + + vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + vendorNumber.value = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']); + + + roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + roles.value = json['roles'] == null ? null : AnyValue.fromJson(json['roles']); + + + charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + charges.value = json['charges'] == null ? null : AnyValue.fromJson(json['charges']); + + + otherCharges = Optional.optional(nativeFromJson, nativeToJson); + otherCharges.value = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']); + + + subtotal = Optional.optional(nativeFromJson, nativeToJson); + subtotal.value = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']); + + + amount = Optional.optional(nativeFromJson, nativeToJson); + amount.value = json['amount'] == null ? null : nativeFromJson(json['amount']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + + staffCount = Optional.optional(nativeFromJson, nativeToJson); + staffCount.value = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']); + + + chargesCount = Optional.optional(nativeFromJson, nativeToJson); + chargesCount.value = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateInvoiceTemplateVariables otherTyped = other as CreateInvoiceTemplateVariables; + return name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(businessId.state == OptionalState.set) { + json['businessId'] = businessId.toJson(); + } + if(orderId.state == OptionalState.set) { + json['orderId'] = orderId.toJson(); + } + if(paymentTerms.state == OptionalState.set) { + json['paymentTerms'] = paymentTerms.toJson(); + } + if(invoiceNumber.state == OptionalState.set) { + json['invoiceNumber'] = invoiceNumber.toJson(); + } + if(issueDate.state == OptionalState.set) { + json['issueDate'] = issueDate.toJson(); + } + if(dueDate.state == OptionalState.set) { + json['dueDate'] = dueDate.toJson(); + } + if(hub.state == OptionalState.set) { + json['hub'] = hub.toJson(); + } + if(managerName.state == OptionalState.set) { + json['managerName'] = managerName.toJson(); + } + if(vendorNumber.state == OptionalState.set) { + json['vendorNumber'] = vendorNumber.toJson(); + } + if(roles.state == OptionalState.set) { + json['roles'] = roles.toJson(); + } + if(charges.state == OptionalState.set) { + json['charges'] = charges.toJson(); + } + if(otherCharges.state == OptionalState.set) { + json['otherCharges'] = otherCharges.toJson(); + } + if(subtotal.state == OptionalState.set) { + json['subtotal'] = subtotal.toJson(); + } + if(amount.state == OptionalState.set) { + json['amount'] = amount.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + if(staffCount.state == OptionalState.set) { + json['staffCount'] = staffCount.toJson(); + } + if(chargesCount.state == OptionalState.set) { + json['chargesCount'] = chargesCount.toJson(); + } + return json; + } + + CreateInvoiceTemplateVariables({ + required this.name, + required this.ownerId, + required this.vendorId, + required this.businessId, + required this.orderId, + required this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + required this.hub, + required this.managerName, + required this.vendorNumber, + required this.roles, + required this.charges, + required this.otherCharges, + required this.subtotal, + required this.amount, + required this.notes, + required this.staffCount, + required this.chargesCount, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_level.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_level.dart new file mode 100644 index 00000000..6813ff81 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_level.dart @@ -0,0 +1,162 @@ +part of 'generated.dart'; + +class CreateLevelVariablesBuilder { + String name; + int xpRequired; + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + Optional _colors = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; CreateLevelVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + CreateLevelVariablesBuilder colors(AnyValue? t) { + _colors.value = t; + return this; + } + + CreateLevelVariablesBuilder(this._dataConnect, {required this.name,required this.xpRequired,}); + Deserializer dataDeserializer = (dynamic json) => CreateLevelData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateLevelVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateLevelVariables vars= CreateLevelVariables(name: name,xpRequired: xpRequired,icon: _icon,colors: _colors,); + return _dataConnect.mutation("createLevel", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateLevelLevelInsert { + final String id; + CreateLevelLevelInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateLevelLevelInsert otherTyped = other as CreateLevelLevelInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateLevelLevelInsert({ + required this.id, + }); +} + +@immutable +class CreateLevelData { + final CreateLevelLevelInsert level_insert; + CreateLevelData.fromJson(dynamic json): + + level_insert = CreateLevelLevelInsert.fromJson(json['level_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateLevelData otherTyped = other as CreateLevelData; + return level_insert == otherTyped.level_insert; + + } + @override + int get hashCode => level_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['level_insert'] = level_insert.toJson(); + return json; + } + + CreateLevelData({ + required this.level_insert, + }); +} + +@immutable +class CreateLevelVariables { + final String name; + final int xpRequired; + late final Optionalicon; + late final Optionalcolors; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateLevelVariables.fromJson(Map json): + + name = nativeFromJson(json['name']), + xpRequired = nativeFromJson(json['xpRequired']) { + + + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + + colors = Optional.optional(AnyValue.fromJson, defaultSerializer); + colors.value = json['colors'] == null ? null : AnyValue.fromJson(json['colors']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateLevelVariables otherTyped = other as CreateLevelVariables; + return name == otherTyped.name && + xpRequired == otherTyped.xpRequired && + icon == otherTyped.icon && + colors == otherTyped.colors; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, xpRequired.hashCode, icon.hashCode, colors.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + json['xpRequired'] = nativeToJson(xpRequired); + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + if(colors.state == OptionalState.set) { + json['colors'] = colors.toJson(); + } + return json; + } + + CreateLevelVariables({ + required this.name, + required this.xpRequired, + required this.icon, + required this.colors, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_member_task.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_member_task.dart new file mode 100644 index 00000000..526c491e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_member_task.dart @@ -0,0 +1,133 @@ +part of 'generated.dart'; + +class CreateMemberTaskVariablesBuilder { + String teamMemberId; + String taskId; + + final FirebaseDataConnect _dataConnect; + CreateMemberTaskVariablesBuilder(this._dataConnect, {required this.teamMemberId,required this.taskId,}); + Deserializer dataDeserializer = (dynamic json) => CreateMemberTaskData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateMemberTaskVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateMemberTaskVariables vars= CreateMemberTaskVariables(teamMemberId: teamMemberId,taskId: taskId,); + return _dataConnect.mutation("createMemberTask", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateMemberTaskMemberTaskInsert { + final String teamMemberId; + final String taskId; + CreateMemberTaskMemberTaskInsert.fromJson(dynamic json): + + teamMemberId = nativeFromJson(json['teamMemberId']), + taskId = nativeFromJson(json['taskId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateMemberTaskMemberTaskInsert otherTyped = other as CreateMemberTaskMemberTaskInsert; + return teamMemberId == otherTyped.teamMemberId && + taskId == otherTyped.taskId; + + } + @override + int get hashCode => Object.hashAll([teamMemberId.hashCode, taskId.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamMemberId'] = nativeToJson(teamMemberId); + json['taskId'] = nativeToJson(taskId); + return json; + } + + CreateMemberTaskMemberTaskInsert({ + required this.teamMemberId, + required this.taskId, + }); +} + +@immutable +class CreateMemberTaskData { + final CreateMemberTaskMemberTaskInsert memberTask_insert; + CreateMemberTaskData.fromJson(dynamic json): + + memberTask_insert = CreateMemberTaskMemberTaskInsert.fromJson(json['memberTask_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateMemberTaskData otherTyped = other as CreateMemberTaskData; + return memberTask_insert == otherTyped.memberTask_insert; + + } + @override + int get hashCode => memberTask_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['memberTask_insert'] = memberTask_insert.toJson(); + return json; + } + + CreateMemberTaskData({ + required this.memberTask_insert, + }); +} + +@immutable +class CreateMemberTaskVariables { + final String teamMemberId; + final String taskId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateMemberTaskVariables.fromJson(Map json): + + teamMemberId = nativeFromJson(json['teamMemberId']), + taskId = nativeFromJson(json['taskId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateMemberTaskVariables otherTyped = other as CreateMemberTaskVariables; + return teamMemberId == otherTyped.teamMemberId && + taskId == otherTyped.taskId; + + } + @override + int get hashCode => Object.hashAll([teamMemberId.hashCode, taskId.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamMemberId'] = nativeToJson(teamMemberId); + json['taskId'] = nativeToJson(taskId); + return json; + } + + CreateMemberTaskVariables({ + required this.teamMemberId, + required this.taskId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_message.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_message.dart new file mode 100644 index 00000000..00c46728 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_message.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class CreateMessageVariablesBuilder { + String conversationId; + String senderId; + String content; + Optional _isSystem = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateMessageVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + CreateMessageVariablesBuilder(this._dataConnect, {required this.conversationId,required this.senderId,required this.content,}); + Deserializer dataDeserializer = (dynamic json) => CreateMessageData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateMessageVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateMessageVariables vars= CreateMessageVariables(conversationId: conversationId,senderId: senderId,content: content,isSystem: _isSystem,); + return _dataConnect.mutation("createMessage", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateMessageMessageInsert { + final String id; + CreateMessageMessageInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateMessageMessageInsert otherTyped = other as CreateMessageMessageInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateMessageMessageInsert({ + required this.id, + }); +} + +@immutable +class CreateMessageData { + final CreateMessageMessageInsert message_insert; + CreateMessageData.fromJson(dynamic json): + + message_insert = CreateMessageMessageInsert.fromJson(json['message_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateMessageData otherTyped = other as CreateMessageData; + return message_insert == otherTyped.message_insert; + + } + @override + int get hashCode => message_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['message_insert'] = message_insert.toJson(); + return json; + } + + CreateMessageData({ + required this.message_insert, + }); +} + +@immutable +class CreateMessageVariables { + final String conversationId; + final String senderId; + final String content; + late final OptionalisSystem; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateMessageVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']), + senderId = nativeFromJson(json['senderId']), + content = nativeFromJson(json['content']) { + + + + + + isSystem = Optional.optional(nativeFromJson, nativeToJson); + isSystem.value = json['isSystem'] == null ? null : nativeFromJson(json['isSystem']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateMessageVariables otherTyped = other as CreateMessageVariables; + return conversationId == otherTyped.conversationId && + senderId == otherTyped.senderId && + content == otherTyped.content && + isSystem == otherTyped.isSystem; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, senderId.hashCode, content.hashCode, isSystem.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['senderId'] = nativeToJson(senderId); + json['content'] = nativeToJson(content); + if(isSystem.state == OptionalState.set) { + json['isSystem'] = isSystem.toJson(); + } + return json; + } + + CreateMessageVariables({ + required this.conversationId, + required this.senderId, + required this.content, + required this.isSystem, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_order.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_order.dart new file mode 100644 index 00000000..786e6534 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_order.dart @@ -0,0 +1,426 @@ +part of 'generated.dart'; + +class CreateOrderVariablesBuilder { + String vendorId; + String businessId; + OrderType orderType; + Optional _location = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); + Optional _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + Optional _startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer); + Optional _endDate = Optional.optional((json) => json['endDate'] = Timestamp.fromJson(json['endDate']), defaultSerializer); + Optional _duration = Optional.optional((data) => OrderDuration.values.byName(data), enumSerializer); + Optional _lunchBreak = Optional.optional(nativeFromJson, nativeToJson); + Optional _total = Optional.optional(nativeFromJson, nativeToJson); + Optional _eventName = Optional.optional(nativeFromJson, nativeToJson); + Optional _assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _requested = Optional.optional(nativeFromJson, nativeToJson); + Optional _hub = Optional.optional(nativeFromJson, nativeToJson); + Optional _recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _permanentStartDate = Optional.optional((json) => json['permanentStartDate'] = Timestamp.fromJson(json['permanentStartDate']), defaultSerializer); + Optional _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + Optional _detectedConflicts = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _poReference = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateOrderVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + CreateOrderVariablesBuilder status(OrderStatus? t) { + _status.value = t; + return this; + } + CreateOrderVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + CreateOrderVariablesBuilder startDate(Timestamp? t) { + _startDate.value = t; + return this; + } + CreateOrderVariablesBuilder endDate(Timestamp? t) { + _endDate.value = t; + return this; + } + CreateOrderVariablesBuilder duration(OrderDuration? t) { + _duration.value = t; + return this; + } + CreateOrderVariablesBuilder lunchBreak(int? t) { + _lunchBreak.value = t; + return this; + } + CreateOrderVariablesBuilder total(double? t) { + _total.value = t; + return this; + } + CreateOrderVariablesBuilder eventName(String? t) { + _eventName.value = t; + return this; + } + CreateOrderVariablesBuilder assignedStaff(AnyValue? t) { + _assignedStaff.value = t; + return this; + } + CreateOrderVariablesBuilder shifts(AnyValue? t) { + _shifts.value = t; + return this; + } + CreateOrderVariablesBuilder requested(int? t) { + _requested.value = t; + return this; + } + CreateOrderVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + CreateOrderVariablesBuilder recurringDays(AnyValue? t) { + _recurringDays.value = t; + return this; + } + CreateOrderVariablesBuilder permanentStartDate(Timestamp? t) { + _permanentStartDate.value = t; + return this; + } + CreateOrderVariablesBuilder permanentDays(AnyValue? t) { + _permanentDays.value = t; + return this; + } + CreateOrderVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + CreateOrderVariablesBuilder detectedConflicts(AnyValue? t) { + _detectedConflicts.value = t; + return this; + } + CreateOrderVariablesBuilder poReference(String? t) { + _poReference.value = t; + return this; + } + + CreateOrderVariablesBuilder(this._dataConnect, {required this.vendorId,required this.businessId,required this.orderType,}); + Deserializer dataDeserializer = (dynamic json) => CreateOrderData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateOrderVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateOrderVariables vars= CreateOrderVariables(vendorId: vendorId,businessId: businessId,orderType: orderType,location: _location,status: _status,date: _date,startDate: _startDate,endDate: _endDate,duration: _duration,lunchBreak: _lunchBreak,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,hub: _hub,recurringDays: _recurringDays,permanentStartDate: _permanentStartDate,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,); + return _dataConnect.mutation("createOrder", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateOrderOrderInsert { + final String id; + CreateOrderOrderInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateOrderOrderInsert otherTyped = other as CreateOrderOrderInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateOrderOrderInsert({ + required this.id, + }); +} + +@immutable +class CreateOrderData { + final CreateOrderOrderInsert order_insert; + CreateOrderData.fromJson(dynamic json): + + order_insert = CreateOrderOrderInsert.fromJson(json['order_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateOrderData otherTyped = other as CreateOrderData; + return order_insert == otherTyped.order_insert; + + } + @override + int get hashCode => order_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['order_insert'] = order_insert.toJson(); + return json; + } + + CreateOrderData({ + required this.order_insert, + }); +} + +@immutable +class CreateOrderVariables { + final String vendorId; + final String businessId; + final OrderType orderType; + late final Optionallocation; + late final Optionalstatus; + late final Optionaldate; + late final OptionalstartDate; + late final OptionalendDate; + late final Optionalduration; + late final OptionallunchBreak; + late final Optionaltotal; + late final OptionaleventName; + late final OptionalassignedStaff; + late final Optionalshifts; + late final Optionalrequested; + late final Optionalhub; + late final OptionalrecurringDays; + late final OptionalpermanentStartDate; + late final OptionalpermanentDays; + late final Optionalnotes; + late final OptionaldetectedConflicts; + late final OptionalpoReference; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateOrderVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = OrderType.values.byName(json['orderType']) { + + + + + + location = Optional.optional(nativeFromJson, nativeToJson); + location.value = json['location'] == null ? null : nativeFromJson(json['location']); + + + status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : OrderStatus.values.byName(json['status']); + + + date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']); + + + startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer); + startDate.value = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']); + + + endDate = Optional.optional((json) => json['endDate'] = Timestamp.fromJson(json['endDate']), defaultSerializer); + endDate.value = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']); + + + duration = Optional.optional((data) => OrderDuration.values.byName(data), enumSerializer); + duration.value = json['duration'] == null ? null : OrderDuration.values.byName(json['duration']); + + + lunchBreak = Optional.optional(nativeFromJson, nativeToJson); + lunchBreak.value = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']); + + + total = Optional.optional(nativeFromJson, nativeToJson); + total.value = json['total'] == null ? null : nativeFromJson(json['total']); + + + eventName = Optional.optional(nativeFromJson, nativeToJson); + eventName.value = json['eventName'] == null ? null : nativeFromJson(json['eventName']); + + + assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + assignedStaff.value = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']); + + + shifts = Optional.optional(AnyValue.fromJson, defaultSerializer); + shifts.value = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']); + + + requested = Optional.optional(nativeFromJson, nativeToJson); + requested.value = json['requested'] == null ? null : nativeFromJson(json['requested']); + + + hub = Optional.optional(nativeFromJson, nativeToJson); + hub.value = json['hub'] == null ? null : nativeFromJson(json['hub']); + + + recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']); + + + permanentStartDate = Optional.optional((json) => json['permanentStartDate'] = Timestamp.fromJson(json['permanentStartDate']), defaultSerializer); + permanentStartDate.value = json['permanentStartDate'] == null ? null : Timestamp.fromJson(json['permanentStartDate']); + + + permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + permanentDays.value = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + + detectedConflicts = Optional.optional(AnyValue.fromJson, defaultSerializer); + detectedConflicts.value = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']); + + + poReference = Optional.optional(nativeFromJson, nativeToJson); + poReference.value = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateOrderVariables otherTyped = other as CreateOrderVariables; + return vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + eventName == otherTyped.eventName && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentStartDate == otherTyped.permanentStartDate && + permanentDays == otherTyped.permanentDays && + notes == otherTyped.notes && + detectedConflicts == otherTyped.detectedConflicts && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentStartDate.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderType.name + ; + if(location.state == OptionalState.set) { + json['location'] = location.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(date.state == OptionalState.set) { + json['date'] = date.toJson(); + } + if(startDate.state == OptionalState.set) { + json['startDate'] = startDate.toJson(); + } + if(endDate.state == OptionalState.set) { + json['endDate'] = endDate.toJson(); + } + if(duration.state == OptionalState.set) { + json['duration'] = duration.toJson(); + } + if(lunchBreak.state == OptionalState.set) { + json['lunchBreak'] = lunchBreak.toJson(); + } + if(total.state == OptionalState.set) { + json['total'] = total.toJson(); + } + if(eventName.state == OptionalState.set) { + json['eventName'] = eventName.toJson(); + } + if(assignedStaff.state == OptionalState.set) { + json['assignedStaff'] = assignedStaff.toJson(); + } + if(shifts.state == OptionalState.set) { + json['shifts'] = shifts.toJson(); + } + if(requested.state == OptionalState.set) { + json['requested'] = requested.toJson(); + } + if(hub.state == OptionalState.set) { + json['hub'] = hub.toJson(); + } + if(recurringDays.state == OptionalState.set) { + json['recurringDays'] = recurringDays.toJson(); + } + if(permanentStartDate.state == OptionalState.set) { + json['permanentStartDate'] = permanentStartDate.toJson(); + } + if(permanentDays.state == OptionalState.set) { + json['permanentDays'] = permanentDays.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + if(detectedConflicts.state == OptionalState.set) { + json['detectedConflicts'] = detectedConflicts.toJson(); + } + if(poReference.state == OptionalState.set) { + json['poReference'] = poReference.toJson(); + } + return json; + } + + CreateOrderVariables({ + required this.vendorId, + required this.businessId, + required this.orderType, + required this.location, + required this.status, + required this.date, + required this.startDate, + required this.endDate, + required this.duration, + required this.lunchBreak, + required this.total, + required this.eventName, + required this.assignedStaff, + required this.shifts, + required this.requested, + required this.hub, + required this.recurringDays, + required this.permanentStartDate, + required this.permanentDays, + required this.notes, + required this.detectedConflicts, + required this.poReference, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_recent_payment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_recent_payment.dart new file mode 100644 index 00000000..8ea91831 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_recent_payment.dart @@ -0,0 +1,170 @@ +part of 'generated.dart'; + +class CreateRecentPaymentVariablesBuilder { + Optional _workedTime = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => RecentPaymentStatus.values.byName(data), enumSerializer); + String staffId; + String applicationId; + String invoiceId; + + final FirebaseDataConnect _dataConnect; + CreateRecentPaymentVariablesBuilder workedTime(String? t) { + _workedTime.value = t; + return this; + } + CreateRecentPaymentVariablesBuilder status(RecentPaymentStatus? t) { + _status.value = t; + return this; + } + + CreateRecentPaymentVariablesBuilder(this._dataConnect, {required this.staffId,required this.applicationId,required this.invoiceId,}); + Deserializer dataDeserializer = (dynamic json) => CreateRecentPaymentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateRecentPaymentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateRecentPaymentVariables vars= CreateRecentPaymentVariables(workedTime: _workedTime,status: _status,staffId: staffId,applicationId: applicationId,invoiceId: invoiceId,); + return _dataConnect.mutation("createRecentPayment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateRecentPaymentRecentPaymentInsert { + final String id; + CreateRecentPaymentRecentPaymentInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRecentPaymentRecentPaymentInsert otherTyped = other as CreateRecentPaymentRecentPaymentInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateRecentPaymentRecentPaymentInsert({ + required this.id, + }); +} + +@immutable +class CreateRecentPaymentData { + final CreateRecentPaymentRecentPaymentInsert recentPayment_insert; + CreateRecentPaymentData.fromJson(dynamic json): + + recentPayment_insert = CreateRecentPaymentRecentPaymentInsert.fromJson(json['recentPayment_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRecentPaymentData otherTyped = other as CreateRecentPaymentData; + return recentPayment_insert == otherTyped.recentPayment_insert; + + } + @override + int get hashCode => recentPayment_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayment_insert'] = recentPayment_insert.toJson(); + return json; + } + + CreateRecentPaymentData({ + required this.recentPayment_insert, + }); +} + +@immutable +class CreateRecentPaymentVariables { + late final OptionalworkedTime; + late final Optionalstatus; + final String staffId; + final String applicationId; + final String invoiceId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateRecentPaymentVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']) { + + + workedTime = Optional.optional(nativeFromJson, nativeToJson); + workedTime.value = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']); + + + status = Optional.optional((data) => RecentPaymentStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : RecentPaymentStatus.values.byName(json['status']); + + + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRecentPaymentVariables otherTyped = other as CreateRecentPaymentVariables; + return workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId; + + } + @override + int get hashCode => Object.hashAll([workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode]); + + + Map toJson() { + Map json = {}; + if(workedTime.state == OptionalState.set) { + json['workedTime'] = workedTime.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + return json; + } + + CreateRecentPaymentVariables({ + required this.workedTime, + required this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_role.dart new file mode 100644 index 00000000..23bedc4e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_role.dart @@ -0,0 +1,140 @@ +part of 'generated.dart'; + +class CreateRoleVariablesBuilder { + String name; + double costPerHour; + String vendorId; + String roleCategoryId; + + final FirebaseDataConnect _dataConnect; + CreateRoleVariablesBuilder(this._dataConnect, {required this.name,required this.costPerHour,required this.vendorId,required this.roleCategoryId,}); + Deserializer dataDeserializer = (dynamic json) => CreateRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateRoleVariables vars= CreateRoleVariables(name: name,costPerHour: costPerHour,vendorId: vendorId,roleCategoryId: roleCategoryId,); + return _dataConnect.mutation("createRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateRoleRoleInsert { + final String id; + CreateRoleRoleInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRoleRoleInsert otherTyped = other as CreateRoleRoleInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateRoleRoleInsert({ + required this.id, + }); +} + +@immutable +class CreateRoleData { + final CreateRoleRoleInsert role_insert; + CreateRoleData.fromJson(dynamic json): + + role_insert = CreateRoleRoleInsert.fromJson(json['role_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRoleData otherTyped = other as CreateRoleData; + return role_insert == otherTyped.role_insert; + + } + @override + int get hashCode => role_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['role_insert'] = role_insert.toJson(); + return json; + } + + CreateRoleData({ + required this.role_insert, + }); +} + +@immutable +class CreateRoleVariables { + final String name; + final double costPerHour; + final String vendorId; + final String roleCategoryId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateRoleVariables.fromJson(Map json): + + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']), + vendorId = nativeFromJson(json['vendorId']), + roleCategoryId = nativeFromJson(json['roleCategoryId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRoleVariables otherTyped = other as CreateRoleVariables; + return name == otherTyped.name && + costPerHour == otherTyped.costPerHour && + vendorId == otherTyped.vendorId && + roleCategoryId == otherTyped.roleCategoryId; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, costPerHour.hashCode, vendorId.hashCode, roleCategoryId.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + json['vendorId'] = nativeToJson(vendorId); + json['roleCategoryId'] = nativeToJson(roleCategoryId); + return json; + } + + CreateRoleVariables({ + required this.name, + required this.costPerHour, + required this.vendorId, + required this.roleCategoryId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_role_category.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_role_category.dart new file mode 100644 index 00000000..2be167ee --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_role_category.dart @@ -0,0 +1,130 @@ +part of 'generated.dart'; + +class CreateRoleCategoryVariablesBuilder { + String roleName; + RoleCategoryType category; + + final FirebaseDataConnect _dataConnect; + CreateRoleCategoryVariablesBuilder(this._dataConnect, {required this.roleName,required this.category,}); + Deserializer dataDeserializer = (dynamic json) => CreateRoleCategoryData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateRoleCategoryVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateRoleCategoryVariables vars= CreateRoleCategoryVariables(roleName: roleName,category: category,); + return _dataConnect.mutation("createRoleCategory", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateRoleCategoryRoleCategoryInsert { + final String id; + CreateRoleCategoryRoleCategoryInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRoleCategoryRoleCategoryInsert otherTyped = other as CreateRoleCategoryRoleCategoryInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateRoleCategoryRoleCategoryInsert({ + required this.id, + }); +} + +@immutable +class CreateRoleCategoryData { + final CreateRoleCategoryRoleCategoryInsert roleCategory_insert; + CreateRoleCategoryData.fromJson(dynamic json): + + roleCategory_insert = CreateRoleCategoryRoleCategoryInsert.fromJson(json['roleCategory_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRoleCategoryData otherTyped = other as CreateRoleCategoryData; + return roleCategory_insert == otherTyped.roleCategory_insert; + + } + @override + int get hashCode => roleCategory_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['roleCategory_insert'] = roleCategory_insert.toJson(); + return json; + } + + CreateRoleCategoryData({ + required this.roleCategory_insert, + }); +} + +@immutable +class CreateRoleCategoryVariables { + final String roleName; + final RoleCategoryType category; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateRoleCategoryVariables.fromJson(Map json): + + roleName = nativeFromJson(json['roleName']), + category = RoleCategoryType.values.byName(json['category']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateRoleCategoryVariables otherTyped = other as CreateRoleCategoryVariables; + return roleName == otherTyped.roleName && + category == otherTyped.category; + + } + @override + int get hashCode => Object.hashAll([roleName.hashCode, category.hashCode]); + + + Map toJson() { + Map json = {}; + json['roleName'] = nativeToJson(roleName); + json['category'] = + category.name + ; + return json; + } + + CreateRoleCategoryVariables({ + required this.roleName, + required this.category, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_shift.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_shift.dart new file mode 100644 index 00000000..2f81c6de --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_shift.dart @@ -0,0 +1,389 @@ +part of 'generated.dart'; + +class CreateShiftVariablesBuilder { + String title; + String orderId; + Optional _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + Optional _startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + Optional _endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + Optional _hours = Optional.optional(nativeFromJson, nativeToJson); + Optional _cost = Optional.optional(nativeFromJson, nativeToJson); + Optional _location = Optional.optional(nativeFromJson, nativeToJson); + Optional _locationAddress = Optional.optional(nativeFromJson, nativeToJson); + Optional _latitude = Optional.optional(nativeFromJson, nativeToJson); + Optional _longitude = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); + Optional _workersNeeded = Optional.optional(nativeFromJson, nativeToJson); + Optional _filled = Optional.optional(nativeFromJson, nativeToJson); + Optional _filledAt = Optional.optional((json) => json['filledAt'] = Timestamp.fromJson(json['filledAt']), defaultSerializer); + Optional> _managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + Optional _durationDays = Optional.optional(nativeFromJson, nativeToJson); + Optional _createdBy = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateShiftVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + CreateShiftVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + CreateShiftVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + CreateShiftVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + CreateShiftVariablesBuilder cost(double? t) { + _cost.value = t; + return this; + } + CreateShiftVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + CreateShiftVariablesBuilder locationAddress(String? t) { + _locationAddress.value = t; + return this; + } + CreateShiftVariablesBuilder latitude(double? t) { + _latitude.value = t; + return this; + } + CreateShiftVariablesBuilder longitude(double? t) { + _longitude.value = t; + return this; + } + CreateShiftVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateShiftVariablesBuilder status(ShiftStatus? t) { + _status.value = t; + return this; + } + CreateShiftVariablesBuilder workersNeeded(int? t) { + _workersNeeded.value = t; + return this; + } + CreateShiftVariablesBuilder filled(int? t) { + _filled.value = t; + return this; + } + CreateShiftVariablesBuilder filledAt(Timestamp? t) { + _filledAt.value = t; + return this; + } + CreateShiftVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + CreateShiftVariablesBuilder durationDays(int? t) { + _durationDays.value = t; + return this; + } + CreateShiftVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + CreateShiftVariablesBuilder(this._dataConnect, {required this.title,required this.orderId,}); + Deserializer dataDeserializer = (dynamic json) => CreateShiftData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateShiftVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateShiftVariables vars= CreateShiftVariables(title: title,orderId: orderId,date: _date,startTime: _startTime,endTime: _endTime,hours: _hours,cost: _cost,location: _location,locationAddress: _locationAddress,latitude: _latitude,longitude: _longitude,description: _description,status: _status,workersNeeded: _workersNeeded,filled: _filled,filledAt: _filledAt,managers: _managers,durationDays: _durationDays,createdBy: _createdBy,); + return _dataConnect.mutation("createShift", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateShiftShiftInsert { + final String id; + CreateShiftShiftInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateShiftShiftInsert otherTyped = other as CreateShiftShiftInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateShiftShiftInsert({ + required this.id, + }); +} + +@immutable +class CreateShiftData { + final CreateShiftShiftInsert shift_insert; + CreateShiftData.fromJson(dynamic json): + + shift_insert = CreateShiftShiftInsert.fromJson(json['shift_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateShiftData otherTyped = other as CreateShiftData; + return shift_insert == otherTyped.shift_insert; + + } + @override + int get hashCode => shift_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['shift_insert'] = shift_insert.toJson(); + return json; + } + + CreateShiftData({ + required this.shift_insert, + }); +} + +@immutable +class CreateShiftVariables { + final String title; + final String orderId; + late final Optionaldate; + late final OptionalstartTime; + late final OptionalendTime; + late final Optionalhours; + late final Optionalcost; + late final Optionallocation; + late final OptionallocationAddress; + late final Optionallatitude; + late final Optionallongitude; + late final Optionaldescription; + late final Optionalstatus; + late final OptionalworkersNeeded; + late final Optionalfilled; + late final OptionalfilledAt; + late final Optional>managers; + late final OptionaldurationDays; + late final OptionalcreatedBy; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateShiftVariables.fromJson(Map json): + + title = nativeFromJson(json['title']), + orderId = nativeFromJson(json['orderId']) { + + + + + date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']); + + + startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + startTime.value = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']); + + + endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + endTime.value = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']); + + + hours = Optional.optional(nativeFromJson, nativeToJson); + hours.value = json['hours'] == null ? null : nativeFromJson(json['hours']); + + + cost = Optional.optional(nativeFromJson, nativeToJson); + cost.value = json['cost'] == null ? null : nativeFromJson(json['cost']); + + + location = Optional.optional(nativeFromJson, nativeToJson); + location.value = json['location'] == null ? null : nativeFromJson(json['location']); + + + locationAddress = Optional.optional(nativeFromJson, nativeToJson); + locationAddress.value = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']); + + + latitude = Optional.optional(nativeFromJson, nativeToJson); + latitude.value = json['latitude'] == null ? null : nativeFromJson(json['latitude']); + + + longitude = Optional.optional(nativeFromJson, nativeToJson); + longitude.value = json['longitude'] == null ? null : nativeFromJson(json['longitude']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : ShiftStatus.values.byName(json['status']); + + + workersNeeded = Optional.optional(nativeFromJson, nativeToJson); + workersNeeded.value = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']); + + + filled = Optional.optional(nativeFromJson, nativeToJson); + filled.value = json['filled'] == null ? null : nativeFromJson(json['filled']); + + + filledAt = Optional.optional((json) => json['filledAt'] = Timestamp.fromJson(json['filledAt']), defaultSerializer); + filledAt.value = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']); + + + managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + managers.value = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(); + + + durationDays = Optional.optional(nativeFromJson, nativeToJson); + durationDays.value = json['durationDays'] == null ? null : nativeFromJson(json['durationDays']); + + + createdBy = Optional.optional(nativeFromJson, nativeToJson); + createdBy.value = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateShiftVariables otherTyped = other as CreateShiftVariables; + return title == otherTyped.title && + orderId == otherTyped.orderId && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + cost == otherTyped.cost && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + description == otherTyped.description && + status == otherTyped.status && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + filledAt == otherTyped.filledAt && + managers == otherTyped.managers && + durationDays == otherTyped.durationDays && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['title'] = nativeToJson(title); + json['orderId'] = nativeToJson(orderId); + if(date.state == OptionalState.set) { + json['date'] = date.toJson(); + } + if(startTime.state == OptionalState.set) { + json['startTime'] = startTime.toJson(); + } + if(endTime.state == OptionalState.set) { + json['endTime'] = endTime.toJson(); + } + if(hours.state == OptionalState.set) { + json['hours'] = hours.toJson(); + } + if(cost.state == OptionalState.set) { + json['cost'] = cost.toJson(); + } + if(location.state == OptionalState.set) { + json['location'] = location.toJson(); + } + if(locationAddress.state == OptionalState.set) { + json['locationAddress'] = locationAddress.toJson(); + } + if(latitude.state == OptionalState.set) { + json['latitude'] = latitude.toJson(); + } + if(longitude.state == OptionalState.set) { + json['longitude'] = longitude.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(workersNeeded.state == OptionalState.set) { + json['workersNeeded'] = workersNeeded.toJson(); + } + if(filled.state == OptionalState.set) { + json['filled'] = filled.toJson(); + } + if(filledAt.state == OptionalState.set) { + json['filledAt'] = filledAt.toJson(); + } + if(managers.state == OptionalState.set) { + json['managers'] = managers.toJson(); + } + if(durationDays.state == OptionalState.set) { + json['durationDays'] = durationDays.toJson(); + } + if(createdBy.state == OptionalState.set) { + json['createdBy'] = createdBy.toJson(); + } + return json; + } + + CreateShiftVariables({ + required this.title, + required this.orderId, + required this.date, + required this.startTime, + required this.endTime, + required this.hours, + required this.cost, + required this.location, + required this.locationAddress, + required this.latitude, + required this.longitude, + required this.description, + required this.status, + required this.workersNeeded, + required this.filled, + required this.filledAt, + required this.managers, + required this.durationDays, + required this.createdBy, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_shift_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_shift_role.dart new file mode 100644 index 00000000..8ecf9b74 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_shift_role.dart @@ -0,0 +1,264 @@ +part of 'generated.dart'; + +class CreateShiftRoleVariablesBuilder { + String shiftId; + String roleId; + int count; + Optional _assigned = Optional.optional(nativeFromJson, nativeToJson); + Optional _startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + Optional _endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + Optional _hours = Optional.optional(nativeFromJson, nativeToJson); + Optional _department = Optional.optional(nativeFromJson, nativeToJson); + Optional _uniform = Optional.optional(nativeFromJson, nativeToJson); + Optional _breakType = Optional.optional((data) => BreakDuration.values.byName(data), enumSerializer); + Optional _totalValue = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateShiftRoleVariablesBuilder assigned(int? t) { + _assigned.value = t; + return this; + } + CreateShiftRoleVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + CreateShiftRoleVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + CreateShiftRoleVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + CreateShiftRoleVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + CreateShiftRoleVariablesBuilder uniform(String? t) { + _uniform.value = t; + return this; + } + CreateShiftRoleVariablesBuilder breakType(BreakDuration? t) { + _breakType.value = t; + return this; + } + CreateShiftRoleVariablesBuilder totalValue(double? t) { + _totalValue.value = t; + return this; + } + + CreateShiftRoleVariablesBuilder(this._dataConnect, {required this.shiftId,required this.roleId,required this.count,}); + Deserializer dataDeserializer = (dynamic json) => CreateShiftRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateShiftRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateShiftRoleVariables vars= CreateShiftRoleVariables(shiftId: shiftId,roleId: roleId,count: count,assigned: _assigned,startTime: _startTime,endTime: _endTime,hours: _hours,department: _department,uniform: _uniform,breakType: _breakType,totalValue: _totalValue,); + return _dataConnect.mutation("createShiftRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateShiftRoleShiftRoleInsert { + final String shiftId; + final String roleId; + CreateShiftRoleShiftRoleInsert.fromJson(dynamic json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateShiftRoleShiftRoleInsert otherTyped = other as CreateShiftRoleShiftRoleInsert; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + CreateShiftRoleShiftRoleInsert({ + required this.shiftId, + required this.roleId, + }); +} + +@immutable +class CreateShiftRoleData { + final CreateShiftRoleShiftRoleInsert shiftRole_insert; + CreateShiftRoleData.fromJson(dynamic json): + + shiftRole_insert = CreateShiftRoleShiftRoleInsert.fromJson(json['shiftRole_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateShiftRoleData otherTyped = other as CreateShiftRoleData; + return shiftRole_insert == otherTyped.shiftRole_insert; + + } + @override + int get hashCode => shiftRole_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftRole_insert'] = shiftRole_insert.toJson(); + return json; + } + + CreateShiftRoleData({ + required this.shiftRole_insert, + }); +} + +@immutable +class CreateShiftRoleVariables { + final String shiftId; + final String roleId; + final int count; + late final Optionalassigned; + late final OptionalstartTime; + late final OptionalendTime; + late final Optionalhours; + late final Optionaldepartment; + late final Optionaluniform; + late final OptionalbreakType; + late final OptionaltotalValue; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateShiftRoleVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']) { + + + + + + assigned = Optional.optional(nativeFromJson, nativeToJson); + assigned.value = json['assigned'] == null ? null : nativeFromJson(json['assigned']); + + + startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + startTime.value = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']); + + + endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + endTime.value = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']); + + + hours = Optional.optional(nativeFromJson, nativeToJson); + hours.value = json['hours'] == null ? null : nativeFromJson(json['hours']); + + + department = Optional.optional(nativeFromJson, nativeToJson); + department.value = json['department'] == null ? null : nativeFromJson(json['department']); + + + uniform = Optional.optional(nativeFromJson, nativeToJson); + uniform.value = json['uniform'] == null ? null : nativeFromJson(json['uniform']); + + + breakType = Optional.optional((data) => BreakDuration.values.byName(data), enumSerializer); + breakType.value = json['breakType'] == null ? null : BreakDuration.values.byName(json['breakType']); + + + totalValue = Optional.optional(nativeFromJson, nativeToJson); + totalValue.value = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateShiftRoleVariables otherTyped = other as CreateShiftRoleVariables; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + department == otherTyped.department && + uniform == otherTyped.uniform && + breakType == otherTyped.breakType && + totalValue == otherTyped.totalValue; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, department.hashCode, uniform.hashCode, breakType.hashCode, totalValue.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if(assigned.state == OptionalState.set) { + json['assigned'] = assigned.toJson(); + } + if(startTime.state == OptionalState.set) { + json['startTime'] = startTime.toJson(); + } + if(endTime.state == OptionalState.set) { + json['endTime'] = endTime.toJson(); + } + if(hours.state == OptionalState.set) { + json['hours'] = hours.toJson(); + } + if(department.state == OptionalState.set) { + json['department'] = department.toJson(); + } + if(uniform.state == OptionalState.set) { + json['uniform'] = uniform.toJson(); + } + if(breakType.state == OptionalState.set) { + json['breakType'] = breakType.toJson(); + } + if(totalValue.state == OptionalState.set) { + json['totalValue'] = totalValue.toJson(); + } + return json; + } + + CreateShiftRoleVariables({ + required this.shiftId, + required this.roleId, + required this.count, + required this.assigned, + required this.startTime, + required this.endTime, + required this.hours, + required this.department, + required this.uniform, + required this.breakType, + required this.totalValue, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff.dart new file mode 100644 index 00000000..67fa5264 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff.dart @@ -0,0 +1,597 @@ +part of 'generated.dart'; + +class CreateStaffVariablesBuilder { + String userId; + String fullName; + Optional _level = Optional.optional(nativeFromJson, nativeToJson); + Optional _role = Optional.optional(nativeFromJson, nativeToJson); + Optional _phone = Optional.optional(nativeFromJson, nativeToJson); + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _photoUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalShifts = Optional.optional(nativeFromJson, nativeToJson); + Optional _averageRating = Optional.optional(nativeFromJson, nativeToJson); + Optional _onTimeRate = Optional.optional(nativeFromJson, nativeToJson); + Optional _noShowCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _cancellationCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _reliabilityScore = Optional.optional(nativeFromJson, nativeToJson); + Optional _bio = Optional.optional(nativeFromJson, nativeToJson); + Optional _industries = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _preferredLocations = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson); + Optional _languages = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _itemsAttire = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _xp = Optional.optional(nativeFromJson, nativeToJson); + Optional _badges = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _isRecommended = Optional.optional(nativeFromJson, nativeToJson); + Optional _ownerId = Optional.optional(nativeFromJson, nativeToJson); + Optional _department = Optional.optional((data) => DepartmentType.values.byName(data), enumSerializer); + Optional _hubId = Optional.optional(nativeFromJson, nativeToJson); + Optional _manager = Optional.optional(nativeFromJson, nativeToJson); + Optional _english = Optional.optional((data) => EnglishProficiency.values.byName(data), enumSerializer); + Optional _backgroundCheckStatus = Optional.optional((data) => BackgroundCheckStatus.values.byName(data), enumSerializer); + Optional _employmentType = Optional.optional((data) => EmploymentType.values.byName(data), enumSerializer); + Optional _initial = Optional.optional(nativeFromJson, nativeToJson); + Optional _englishRequired = Optional.optional(nativeFromJson, nativeToJson); + Optional _city = Optional.optional(nativeFromJson, nativeToJson); + Optional _addres = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateStaffVariablesBuilder level(String? t) { + _level.value = t; + return this; + } + CreateStaffVariablesBuilder role(String? t) { + _role.value = t; + return this; + } + CreateStaffVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + CreateStaffVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateStaffVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + CreateStaffVariablesBuilder totalShifts(int? t) { + _totalShifts.value = t; + return this; + } + CreateStaffVariablesBuilder averageRating(double? t) { + _averageRating.value = t; + return this; + } + CreateStaffVariablesBuilder onTimeRate(int? t) { + _onTimeRate.value = t; + return this; + } + CreateStaffVariablesBuilder noShowCount(int? t) { + _noShowCount.value = t; + return this; + } + CreateStaffVariablesBuilder cancellationCount(int? t) { + _cancellationCount.value = t; + return this; + } + CreateStaffVariablesBuilder reliabilityScore(int? t) { + _reliabilityScore.value = t; + return this; + } + CreateStaffVariablesBuilder bio(String? t) { + _bio.value = t; + return this; + } + CreateStaffVariablesBuilder industries(AnyValue? t) { + _industries.value = t; + return this; + } + CreateStaffVariablesBuilder preferredLocations(AnyValue? t) { + _preferredLocations.value = t; + return this; + } + CreateStaffVariablesBuilder maxDistanceMiles(int? t) { + _maxDistanceMiles.value = t; + return this; + } + CreateStaffVariablesBuilder languages(AnyValue? t) { + _languages.value = t; + return this; + } + CreateStaffVariablesBuilder itemsAttire(AnyValue? t) { + _itemsAttire.value = t; + return this; + } + CreateStaffVariablesBuilder xp(int? t) { + _xp.value = t; + return this; + } + CreateStaffVariablesBuilder badges(AnyValue? t) { + _badges.value = t; + return this; + } + CreateStaffVariablesBuilder isRecommended(bool? t) { + _isRecommended.value = t; + return this; + } + CreateStaffVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + CreateStaffVariablesBuilder department(DepartmentType? t) { + _department.value = t; + return this; + } + CreateStaffVariablesBuilder hubId(String? t) { + _hubId.value = t; + return this; + } + CreateStaffVariablesBuilder manager(String? t) { + _manager.value = t; + return this; + } + CreateStaffVariablesBuilder english(EnglishProficiency? t) { + _english.value = t; + return this; + } + CreateStaffVariablesBuilder backgroundCheckStatus(BackgroundCheckStatus? t) { + _backgroundCheckStatus.value = t; + return this; + } + CreateStaffVariablesBuilder employmentType(EmploymentType? t) { + _employmentType.value = t; + return this; + } + CreateStaffVariablesBuilder initial(String? t) { + _initial.value = t; + return this; + } + CreateStaffVariablesBuilder englishRequired(bool? t) { + _englishRequired.value = t; + return this; + } + CreateStaffVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + CreateStaffVariablesBuilder addres(String? t) { + _addres.value = t; + return this; + } + + CreateStaffVariablesBuilder(this._dataConnect, {required this.userId,required this.fullName,}); + Deserializer dataDeserializer = (dynamic json) => CreateStaffData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateStaffVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateStaffVariables vars= CreateStaffVariables(userId: userId,fullName: fullName,level: _level,role: _role,phone: _phone,email: _email,photoUrl: _photoUrl,totalShifts: _totalShifts,averageRating: _averageRating,onTimeRate: _onTimeRate,noShowCount: _noShowCount,cancellationCount: _cancellationCount,reliabilityScore: _reliabilityScore,bio: _bio,industries: _industries,preferredLocations: _preferredLocations,maxDistanceMiles: _maxDistanceMiles,languages: _languages,itemsAttire: _itemsAttire,xp: _xp,badges: _badges,isRecommended: _isRecommended,ownerId: _ownerId,department: _department,hubId: _hubId,manager: _manager,english: _english,backgroundCheckStatus: _backgroundCheckStatus,employmentType: _employmentType,initial: _initial,englishRequired: _englishRequired,city: _city,addres: _addres,); + return _dataConnect.mutation("CreateStaff", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateStaffStaffInsert { + final String id; + CreateStaffStaffInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffStaffInsert otherTyped = other as CreateStaffStaffInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateStaffStaffInsert({ + required this.id, + }); +} + +@immutable +class CreateStaffData { + final CreateStaffStaffInsert staff_insert; + CreateStaffData.fromJson(dynamic json): + + staff_insert = CreateStaffStaffInsert.fromJson(json['staff_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffData otherTyped = other as CreateStaffData; + return staff_insert == otherTyped.staff_insert; + + } + @override + int get hashCode => staff_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['staff_insert'] = staff_insert.toJson(); + return json; + } + + CreateStaffData({ + required this.staff_insert, + }); +} + +@immutable +class CreateStaffVariables { + final String userId; + final String fullName; + late final Optionallevel; + late final Optionalrole; + late final Optionalphone; + late final Optionalemail; + late final OptionalphotoUrl; + late final OptionaltotalShifts; + late final OptionalaverageRating; + late final OptionalonTimeRate; + late final OptionalnoShowCount; + late final OptionalcancellationCount; + late final OptionalreliabilityScore; + late final Optionalbio; + late final Optionalindustries; + late final OptionalpreferredLocations; + late final OptionalmaxDistanceMiles; + late final Optionallanguages; + late final OptionalitemsAttire; + late final Optionalxp; + late final Optionalbadges; + late final OptionalisRecommended; + late final OptionalownerId; + late final Optionaldepartment; + late final OptionalhubId; + late final Optionalmanager; + late final Optionalenglish; + late final OptionalbackgroundCheckStatus; + late final OptionalemploymentType; + late final Optionalinitial; + late final OptionalenglishRequired; + late final Optionalcity; + late final Optionaladdres; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateStaffVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']), + fullName = nativeFromJson(json['fullName']) { + + + + + level = Optional.optional(nativeFromJson, nativeToJson); + level.value = json['level'] == null ? null : nativeFromJson(json['level']); + + + role = Optional.optional(nativeFromJson, nativeToJson); + role.value = json['role'] == null ? null : nativeFromJson(json['role']); + + + phone = Optional.optional(nativeFromJson, nativeToJson); + phone.value = json['phone'] == null ? null : nativeFromJson(json['phone']); + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + photoUrl = Optional.optional(nativeFromJson, nativeToJson); + photoUrl.value = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + + + totalShifts = Optional.optional(nativeFromJson, nativeToJson); + totalShifts.value = json['totalShifts'] == null ? null : nativeFromJson(json['totalShifts']); + + + averageRating = Optional.optional(nativeFromJson, nativeToJson); + averageRating.value = json['averageRating'] == null ? null : nativeFromJson(json['averageRating']); + + + onTimeRate = Optional.optional(nativeFromJson, nativeToJson); + onTimeRate.value = json['onTimeRate'] == null ? null : nativeFromJson(json['onTimeRate']); + + + noShowCount = Optional.optional(nativeFromJson, nativeToJson); + noShowCount.value = json['noShowCount'] == null ? null : nativeFromJson(json['noShowCount']); + + + cancellationCount = Optional.optional(nativeFromJson, nativeToJson); + cancellationCount.value = json['cancellationCount'] == null ? null : nativeFromJson(json['cancellationCount']); + + + reliabilityScore = Optional.optional(nativeFromJson, nativeToJson); + reliabilityScore.value = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']); + + + bio = Optional.optional(nativeFromJson, nativeToJson); + bio.value = json['bio'] == null ? null : nativeFromJson(json['bio']); + + + industries = Optional.optional(AnyValue.fromJson, defaultSerializer); + industries.value = json['industries'] == null ? null : AnyValue.fromJson(json['industries']); + + + preferredLocations = Optional.optional(AnyValue.fromJson, defaultSerializer); + preferredLocations.value = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']); + + + maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson); + maxDistanceMiles.value = json['maxDistanceMiles'] == null ? null : nativeFromJson(json['maxDistanceMiles']); + + + languages = Optional.optional(AnyValue.fromJson, defaultSerializer); + languages.value = json['languages'] == null ? null : AnyValue.fromJson(json['languages']); + + + itemsAttire = Optional.optional(AnyValue.fromJson, defaultSerializer); + itemsAttire.value = json['itemsAttire'] == null ? null : AnyValue.fromJson(json['itemsAttire']); + + + xp = Optional.optional(nativeFromJson, nativeToJson); + xp.value = json['xp'] == null ? null : nativeFromJson(json['xp']); + + + badges = Optional.optional(AnyValue.fromJson, defaultSerializer); + badges.value = json['badges'] == null ? null : AnyValue.fromJson(json['badges']); + + + isRecommended = Optional.optional(nativeFromJson, nativeToJson); + isRecommended.value = json['isRecommended'] == null ? null : nativeFromJson(json['isRecommended']); + + + ownerId = Optional.optional(nativeFromJson, nativeToJson); + ownerId.value = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']); + + + department = Optional.optional((data) => DepartmentType.values.byName(data), enumSerializer); + department.value = json['department'] == null ? null : DepartmentType.values.byName(json['department']); + + + hubId = Optional.optional(nativeFromJson, nativeToJson); + hubId.value = json['hubId'] == null ? null : nativeFromJson(json['hubId']); + + + manager = Optional.optional(nativeFromJson, nativeToJson); + manager.value = json['manager'] == null ? null : nativeFromJson(json['manager']); + + + english = Optional.optional((data) => EnglishProficiency.values.byName(data), enumSerializer); + english.value = json['english'] == null ? null : EnglishProficiency.values.byName(json['english']); + + + backgroundCheckStatus = Optional.optional((data) => BackgroundCheckStatus.values.byName(data), enumSerializer); + backgroundCheckStatus.value = json['backgroundCheckStatus'] == null ? null : BackgroundCheckStatus.values.byName(json['backgroundCheckStatus']); + + + employmentType = Optional.optional((data) => EmploymentType.values.byName(data), enumSerializer); + employmentType.value = json['employmentType'] == null ? null : EmploymentType.values.byName(json['employmentType']); + + + initial = Optional.optional(nativeFromJson, nativeToJson); + initial.value = json['initial'] == null ? null : nativeFromJson(json['initial']); + + + englishRequired = Optional.optional(nativeFromJson, nativeToJson); + englishRequired.value = json['englishRequired'] == null ? null : nativeFromJson(json['englishRequired']); + + + city = Optional.optional(nativeFromJson, nativeToJson); + city.value = json['city'] == null ? null : nativeFromJson(json['city']); + + + addres = Optional.optional(nativeFromJson, nativeToJson); + addres.value = json['addres'] == null ? null : nativeFromJson(json['addres']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffVariables otherTyped = other as CreateStaffVariables; + return userId == otherTyped.userId && + fullName == otherTyped.fullName && + level == otherTyped.level && + role == otherTyped.role && + phone == otherTyped.phone && + email == otherTyped.email && + photoUrl == otherTyped.photoUrl && + totalShifts == otherTyped.totalShifts && + averageRating == otherTyped.averageRating && + onTimeRate == otherTyped.onTimeRate && + noShowCount == otherTyped.noShowCount && + cancellationCount == otherTyped.cancellationCount && + reliabilityScore == otherTyped.reliabilityScore && + bio == otherTyped.bio && + industries == otherTyped.industries && + preferredLocations == otherTyped.preferredLocations && + maxDistanceMiles == otherTyped.maxDistanceMiles && + languages == otherTyped.languages && + itemsAttire == otherTyped.itemsAttire && + xp == otherTyped.xp && + badges == otherTyped.badges && + isRecommended == otherTyped.isRecommended && + ownerId == otherTyped.ownerId && + department == otherTyped.department && + hubId == otherTyped.hubId && + manager == otherTyped.manager && + english == otherTyped.english && + backgroundCheckStatus == otherTyped.backgroundCheckStatus && + employmentType == otherTyped.employmentType && + initial == otherTyped.initial && + englishRequired == otherTyped.englishRequired && + city == otherTyped.city && + addres == otherTyped.addres; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, ownerId.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]); + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + json['fullName'] = nativeToJson(fullName); + if(level.state == OptionalState.set) { + json['level'] = level.toJson(); + } + if(role.state == OptionalState.set) { + json['role'] = role.toJson(); + } + if(phone.state == OptionalState.set) { + json['phone'] = phone.toJson(); + } + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(photoUrl.state == OptionalState.set) { + json['photoUrl'] = photoUrl.toJson(); + } + if(totalShifts.state == OptionalState.set) { + json['totalShifts'] = totalShifts.toJson(); + } + if(averageRating.state == OptionalState.set) { + json['averageRating'] = averageRating.toJson(); + } + if(onTimeRate.state == OptionalState.set) { + json['onTimeRate'] = onTimeRate.toJson(); + } + if(noShowCount.state == OptionalState.set) { + json['noShowCount'] = noShowCount.toJson(); + } + if(cancellationCount.state == OptionalState.set) { + json['cancellationCount'] = cancellationCount.toJson(); + } + if(reliabilityScore.state == OptionalState.set) { + json['reliabilityScore'] = reliabilityScore.toJson(); + } + if(bio.state == OptionalState.set) { + json['bio'] = bio.toJson(); + } + if(industries.state == OptionalState.set) { + json['industries'] = industries.toJson(); + } + if(preferredLocations.state == OptionalState.set) { + json['preferredLocations'] = preferredLocations.toJson(); + } + if(maxDistanceMiles.state == OptionalState.set) { + json['maxDistanceMiles'] = maxDistanceMiles.toJson(); + } + if(languages.state == OptionalState.set) { + json['languages'] = languages.toJson(); + } + if(itemsAttire.state == OptionalState.set) { + json['itemsAttire'] = itemsAttire.toJson(); + } + if(xp.state == OptionalState.set) { + json['xp'] = xp.toJson(); + } + if(badges.state == OptionalState.set) { + json['badges'] = badges.toJson(); + } + if(isRecommended.state == OptionalState.set) { + json['isRecommended'] = isRecommended.toJson(); + } + if(ownerId.state == OptionalState.set) { + json['ownerId'] = ownerId.toJson(); + } + if(department.state == OptionalState.set) { + json['department'] = department.toJson(); + } + if(hubId.state == OptionalState.set) { + json['hubId'] = hubId.toJson(); + } + if(manager.state == OptionalState.set) { + json['manager'] = manager.toJson(); + } + if(english.state == OptionalState.set) { + json['english'] = english.toJson(); + } + if(backgroundCheckStatus.state == OptionalState.set) { + json['backgroundCheckStatus'] = backgroundCheckStatus.toJson(); + } + if(employmentType.state == OptionalState.set) { + json['employmentType'] = employmentType.toJson(); + } + if(initial.state == OptionalState.set) { + json['initial'] = initial.toJson(); + } + if(englishRequired.state == OptionalState.set) { + json['englishRequired'] = englishRequired.toJson(); + } + if(city.state == OptionalState.set) { + json['city'] = city.toJson(); + } + if(addres.state == OptionalState.set) { + json['addres'] = addres.toJson(); + } + return json; + } + + CreateStaffVariables({ + required this.userId, + required this.fullName, + required this.level, + required this.role, + required this.phone, + required this.email, + required this.photoUrl, + required this.totalShifts, + required this.averageRating, + required this.onTimeRate, + required this.noShowCount, + required this.cancellationCount, + required this.reliabilityScore, + required this.bio, + required this.industries, + required this.preferredLocations, + required this.maxDistanceMiles, + required this.languages, + required this.itemsAttire, + required this.xp, + required this.badges, + required this.isRecommended, + required this.ownerId, + required this.department, + required this.hubId, + required this.manager, + required this.english, + required this.backgroundCheckStatus, + required this.employmentType, + required this.initial, + required this.englishRequired, + required this.city, + required this.addres, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_availability.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_availability.dart new file mode 100644 index 00000000..54d2268e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_availability.dart @@ -0,0 +1,187 @@ +part of 'generated.dart'; + +class CreateStaffAvailabilityVariablesBuilder { + String staffId; + DayOfWeek day; + AvailabilitySlot slot; + Optional _status = Optional.optional((data) => AvailabilityStatus.values.byName(data), enumSerializer); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateStaffAvailabilityVariablesBuilder status(AvailabilityStatus? t) { + _status.value = t; + return this; + } + CreateStaffAvailabilityVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + CreateStaffAvailabilityVariablesBuilder(this._dataConnect, {required this.staffId,required this.day,required this.slot,}); + Deserializer dataDeserializer = (dynamic json) => CreateStaffAvailabilityData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateStaffAvailabilityVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateStaffAvailabilityVariables vars= CreateStaffAvailabilityVariables(staffId: staffId,day: day,slot: slot,status: _status,notes: _notes,); + return _dataConnect.mutation("createStaffAvailability", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateStaffAvailabilityStaffAvailabilityInsert { + final String staffId; + final EnumValue day; + final EnumValue slot; + CreateStaffAvailabilityStaffAvailabilityInsert.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + day = dayOfWeekDeserializer(json['day']), + slot = availabilitySlotDeserializer(json['slot']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffAvailabilityStaffAvailabilityInsert otherTyped = other as CreateStaffAvailabilityStaffAvailabilityInsert; + return staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, day.hashCode, slot.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['day'] = + dayOfWeekSerializer(day) + ; + json['slot'] = + availabilitySlotSerializer(slot) + ; + return json; + } + + CreateStaffAvailabilityStaffAvailabilityInsert({ + required this.staffId, + required this.day, + required this.slot, + }); +} + +@immutable +class CreateStaffAvailabilityData { + final CreateStaffAvailabilityStaffAvailabilityInsert staffAvailability_insert; + CreateStaffAvailabilityData.fromJson(dynamic json): + + staffAvailability_insert = CreateStaffAvailabilityStaffAvailabilityInsert.fromJson(json['staffAvailability_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffAvailabilityData otherTyped = other as CreateStaffAvailabilityData; + return staffAvailability_insert == otherTyped.staffAvailability_insert; + + } + @override + int get hashCode => staffAvailability_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['staffAvailability_insert'] = staffAvailability_insert.toJson(); + return json; + } + + CreateStaffAvailabilityData({ + required this.staffAvailability_insert, + }); +} + +@immutable +class CreateStaffAvailabilityVariables { + final String staffId; + final DayOfWeek day; + final AvailabilitySlot slot; + late final Optionalstatus; + late final Optionalnotes; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateStaffAvailabilityVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + day = DayOfWeek.values.byName(json['day']), + slot = AvailabilitySlot.values.byName(json['slot']) { + + + + + + status = Optional.optional((data) => AvailabilityStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : AvailabilityStatus.values.byName(json['status']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffAvailabilityVariables otherTyped = other as CreateStaffAvailabilityVariables; + return staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot && + status == otherTyped.status && + notes == otherTyped.notes; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, day.hashCode, slot.hashCode, status.hashCode, notes.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['day'] = + day.name + ; + json['slot'] = + slot.name + ; + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + return json; + } + + CreateStaffAvailabilityVariables({ + required this.staffId, + required this.day, + required this.slot, + required this.status, + required this.notes, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_availability_stats.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_availability_stats.dart new file mode 100644 index 00000000..2b267e0f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_availability_stats.dart @@ -0,0 +1,230 @@ +part of 'generated.dart'; + +class CreateStaffAvailabilityStatsVariablesBuilder { + String staffId; + Optional _needWorkIndex = Optional.optional(nativeFromJson, nativeToJson); + Optional _utilizationPercentage = Optional.optional(nativeFromJson, nativeToJson); + Optional _predictedAvailabilityScore = Optional.optional(nativeFromJson, nativeToJson); + Optional _scheduledHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + Optional _desiredHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastShiftDate = Optional.optional((json) => json['lastShiftDate'] = Timestamp.fromJson(json['lastShiftDate']), defaultSerializer); + Optional _acceptanceRate = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateStaffAvailabilityStatsVariablesBuilder needWorkIndex(int? t) { + _needWorkIndex.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder utilizationPercentage(int? t) { + _utilizationPercentage.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder predictedAvailabilityScore(int? t) { + _predictedAvailabilityScore.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder scheduledHoursThisPeriod(int? t) { + _scheduledHoursThisPeriod.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder desiredHoursThisPeriod(int? t) { + _desiredHoursThisPeriod.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder lastShiftDate(Timestamp? t) { + _lastShiftDate.value = t; + return this; + } + CreateStaffAvailabilityStatsVariablesBuilder acceptanceRate(int? t) { + _acceptanceRate.value = t; + return this; + } + + CreateStaffAvailabilityStatsVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => CreateStaffAvailabilityStatsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateStaffAvailabilityStatsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateStaffAvailabilityStatsVariables vars= CreateStaffAvailabilityStatsVariables(staffId: staffId,needWorkIndex: _needWorkIndex,utilizationPercentage: _utilizationPercentage,predictedAvailabilityScore: _predictedAvailabilityScore,scheduledHoursThisPeriod: _scheduledHoursThisPeriod,desiredHoursThisPeriod: _desiredHoursThisPeriod,lastShiftDate: _lastShiftDate,acceptanceRate: _acceptanceRate,); + return _dataConnect.mutation("createStaffAvailabilityStats", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateStaffAvailabilityStatsStaffAvailabilityStatsInsert { + final String staffId; + CreateStaffAvailabilityStatsStaffAvailabilityStatsInsert.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffAvailabilityStatsStaffAvailabilityStatsInsert otherTyped = other as CreateStaffAvailabilityStatsStaffAvailabilityStatsInsert; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + CreateStaffAvailabilityStatsStaffAvailabilityStatsInsert({ + required this.staffId, + }); +} + +@immutable +class CreateStaffAvailabilityStatsData { + final CreateStaffAvailabilityStatsStaffAvailabilityStatsInsert staffAvailabilityStats_insert; + CreateStaffAvailabilityStatsData.fromJson(dynamic json): + + staffAvailabilityStats_insert = CreateStaffAvailabilityStatsStaffAvailabilityStatsInsert.fromJson(json['staffAvailabilityStats_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffAvailabilityStatsData otherTyped = other as CreateStaffAvailabilityStatsData; + return staffAvailabilityStats_insert == otherTyped.staffAvailabilityStats_insert; + + } + @override + int get hashCode => staffAvailabilityStats_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['staffAvailabilityStats_insert'] = staffAvailabilityStats_insert.toJson(); + return json; + } + + CreateStaffAvailabilityStatsData({ + required this.staffAvailabilityStats_insert, + }); +} + +@immutable +class CreateStaffAvailabilityStatsVariables { + final String staffId; + late final OptionalneedWorkIndex; + late final OptionalutilizationPercentage; + late final OptionalpredictedAvailabilityScore; + late final OptionalscheduledHoursThisPeriod; + late final OptionaldesiredHoursThisPeriod; + late final OptionallastShiftDate; + late final OptionalacceptanceRate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateStaffAvailabilityStatsVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + needWorkIndex = Optional.optional(nativeFromJson, nativeToJson); + needWorkIndex.value = json['needWorkIndex'] == null ? null : nativeFromJson(json['needWorkIndex']); + + + utilizationPercentage = Optional.optional(nativeFromJson, nativeToJson); + utilizationPercentage.value = json['utilizationPercentage'] == null ? null : nativeFromJson(json['utilizationPercentage']); + + + predictedAvailabilityScore = Optional.optional(nativeFromJson, nativeToJson); + predictedAvailabilityScore.value = json['predictedAvailabilityScore'] == null ? null : nativeFromJson(json['predictedAvailabilityScore']); + + + scheduledHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + scheduledHoursThisPeriod.value = json['scheduledHoursThisPeriod'] == null ? null : nativeFromJson(json['scheduledHoursThisPeriod']); + + + desiredHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + desiredHoursThisPeriod.value = json['desiredHoursThisPeriod'] == null ? null : nativeFromJson(json['desiredHoursThisPeriod']); + + + lastShiftDate = Optional.optional((json) => json['lastShiftDate'] = Timestamp.fromJson(json['lastShiftDate']), defaultSerializer); + lastShiftDate.value = json['lastShiftDate'] == null ? null : Timestamp.fromJson(json['lastShiftDate']); + + + acceptanceRate = Optional.optional(nativeFromJson, nativeToJson); + acceptanceRate.value = json['acceptanceRate'] == null ? null : nativeFromJson(json['acceptanceRate']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffAvailabilityStatsVariables otherTyped = other as CreateStaffAvailabilityStatsVariables; + return staffId == otherTyped.staffId && + needWorkIndex == otherTyped.needWorkIndex && + utilizationPercentage == otherTyped.utilizationPercentage && + predictedAvailabilityScore == otherTyped.predictedAvailabilityScore && + scheduledHoursThisPeriod == otherTyped.scheduledHoursThisPeriod && + desiredHoursThisPeriod == otherTyped.desiredHoursThisPeriod && + lastShiftDate == otherTyped.lastShiftDate && + acceptanceRate == otherTyped.acceptanceRate; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, needWorkIndex.hashCode, utilizationPercentage.hashCode, predictedAvailabilityScore.hashCode, scheduledHoursThisPeriod.hashCode, desiredHoursThisPeriod.hashCode, lastShiftDate.hashCode, acceptanceRate.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(needWorkIndex.state == OptionalState.set) { + json['needWorkIndex'] = needWorkIndex.toJson(); + } + if(utilizationPercentage.state == OptionalState.set) { + json['utilizationPercentage'] = utilizationPercentage.toJson(); + } + if(predictedAvailabilityScore.state == OptionalState.set) { + json['predictedAvailabilityScore'] = predictedAvailabilityScore.toJson(); + } + if(scheduledHoursThisPeriod.state == OptionalState.set) { + json['scheduledHoursThisPeriod'] = scheduledHoursThisPeriod.toJson(); + } + if(desiredHoursThisPeriod.state == OptionalState.set) { + json['desiredHoursThisPeriod'] = desiredHoursThisPeriod.toJson(); + } + if(lastShiftDate.state == OptionalState.set) { + json['lastShiftDate'] = lastShiftDate.toJson(); + } + if(acceptanceRate.state == OptionalState.set) { + json['acceptanceRate'] = acceptanceRate.toJson(); + } + return json; + } + + CreateStaffAvailabilityStatsVariables({ + required this.staffId, + required this.needWorkIndex, + required this.utilizationPercentage, + required this.predictedAvailabilityScore, + required this.scheduledHoursThisPeriod, + required this.desiredHoursThisPeriod, + required this.lastShiftDate, + required this.acceptanceRate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_course.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_course.dart new file mode 100644 index 00000000..5228f652 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_course.dart @@ -0,0 +1,207 @@ +part of 'generated.dart'; + +class CreateStaffCourseVariablesBuilder { + String staffId; + String courseId; + Optional _progressPercent = Optional.optional(nativeFromJson, nativeToJson); + Optional _completed = Optional.optional(nativeFromJson, nativeToJson); + Optional _completedAt = Optional.optional((json) => json['completedAt'] = Timestamp.fromJson(json['completedAt']), defaultSerializer); + Optional _startedAt = Optional.optional((json) => json['startedAt'] = Timestamp.fromJson(json['startedAt']), defaultSerializer); + Optional _lastAccessedAt = Optional.optional((json) => json['lastAccessedAt'] = Timestamp.fromJson(json['lastAccessedAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; CreateStaffCourseVariablesBuilder progressPercent(int? t) { + _progressPercent.value = t; + return this; + } + CreateStaffCourseVariablesBuilder completed(bool? t) { + _completed.value = t; + return this; + } + CreateStaffCourseVariablesBuilder completedAt(Timestamp? t) { + _completedAt.value = t; + return this; + } + CreateStaffCourseVariablesBuilder startedAt(Timestamp? t) { + _startedAt.value = t; + return this; + } + CreateStaffCourseVariablesBuilder lastAccessedAt(Timestamp? t) { + _lastAccessedAt.value = t; + return this; + } + + CreateStaffCourseVariablesBuilder(this._dataConnect, {required this.staffId,required this.courseId,}); + Deserializer dataDeserializer = (dynamic json) => CreateStaffCourseData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateStaffCourseVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateStaffCourseVariables vars= CreateStaffCourseVariables(staffId: staffId,courseId: courseId,progressPercent: _progressPercent,completed: _completed,completedAt: _completedAt,startedAt: _startedAt,lastAccessedAt: _lastAccessedAt,); + return _dataConnect.mutation("createStaffCourse", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateStaffCourseStaffCourseInsert { + final String id; + CreateStaffCourseStaffCourseInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffCourseStaffCourseInsert otherTyped = other as CreateStaffCourseStaffCourseInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateStaffCourseStaffCourseInsert({ + required this.id, + }); +} + +@immutable +class CreateStaffCourseData { + final CreateStaffCourseStaffCourseInsert staffCourse_insert; + CreateStaffCourseData.fromJson(dynamic json): + + staffCourse_insert = CreateStaffCourseStaffCourseInsert.fromJson(json['staffCourse_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffCourseData otherTyped = other as CreateStaffCourseData; + return staffCourse_insert == otherTyped.staffCourse_insert; + + } + @override + int get hashCode => staffCourse_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['staffCourse_insert'] = staffCourse_insert.toJson(); + return json; + } + + CreateStaffCourseData({ + required this.staffCourse_insert, + }); +} + +@immutable +class CreateStaffCourseVariables { + final String staffId; + final String courseId; + late final OptionalprogressPercent; + late final Optionalcompleted; + late final OptionalcompletedAt; + late final OptionalstartedAt; + late final OptionallastAccessedAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateStaffCourseVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + courseId = nativeFromJson(json['courseId']) { + + + + + progressPercent = Optional.optional(nativeFromJson, nativeToJson); + progressPercent.value = json['progressPercent'] == null ? null : nativeFromJson(json['progressPercent']); + + + completed = Optional.optional(nativeFromJson, nativeToJson); + completed.value = json['completed'] == null ? null : nativeFromJson(json['completed']); + + + completedAt = Optional.optional((json) => json['completedAt'] = Timestamp.fromJson(json['completedAt']), defaultSerializer); + completedAt.value = json['completedAt'] == null ? null : Timestamp.fromJson(json['completedAt']); + + + startedAt = Optional.optional((json) => json['startedAt'] = Timestamp.fromJson(json['startedAt']), defaultSerializer); + startedAt.value = json['startedAt'] == null ? null : Timestamp.fromJson(json['startedAt']); + + + lastAccessedAt = Optional.optional((json) => json['lastAccessedAt'] = Timestamp.fromJson(json['lastAccessedAt']), defaultSerializer); + lastAccessedAt.value = json['lastAccessedAt'] == null ? null : Timestamp.fromJson(json['lastAccessedAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffCourseVariables otherTyped = other as CreateStaffCourseVariables; + return staffId == otherTyped.staffId && + courseId == otherTyped.courseId && + progressPercent == otherTyped.progressPercent && + completed == otherTyped.completed && + completedAt == otherTyped.completedAt && + startedAt == otherTyped.startedAt && + lastAccessedAt == otherTyped.lastAccessedAt; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, courseId.hashCode, progressPercent.hashCode, completed.hashCode, completedAt.hashCode, startedAt.hashCode, lastAccessedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['courseId'] = nativeToJson(courseId); + if(progressPercent.state == OptionalState.set) { + json['progressPercent'] = progressPercent.toJson(); + } + if(completed.state == OptionalState.set) { + json['completed'] = completed.toJson(); + } + if(completedAt.state == OptionalState.set) { + json['completedAt'] = completedAt.toJson(); + } + if(startedAt.state == OptionalState.set) { + json['startedAt'] = startedAt.toJson(); + } + if(lastAccessedAt.state == OptionalState.set) { + json['lastAccessedAt'] = lastAccessedAt.toJson(); + } + return json; + } + + CreateStaffCourseVariables({ + required this.staffId, + required this.courseId, + required this.progressPercent, + required this.completed, + required this.completedAt, + required this.startedAt, + required this.lastAccessedAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_document.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_document.dart new file mode 100644 index 00000000..58af2e49 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_document.dart @@ -0,0 +1,183 @@ +part of 'generated.dart'; + +class CreateStaffDocumentVariablesBuilder { + String staffId; + String staffName; + String documentId; + DocumentStatus status; + Optional _documentUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _expiryDate = Optional.optional((json) => json['expiryDate'] = Timestamp.fromJson(json['expiryDate']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; CreateStaffDocumentVariablesBuilder documentUrl(String? t) { + _documentUrl.value = t; + return this; + } + CreateStaffDocumentVariablesBuilder expiryDate(Timestamp? t) { + _expiryDate.value = t; + return this; + } + + CreateStaffDocumentVariablesBuilder(this._dataConnect, {required this.staffId,required this.staffName,required this.documentId,required this.status,}); + Deserializer dataDeserializer = (dynamic json) => CreateStaffDocumentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateStaffDocumentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateStaffDocumentVariables vars= CreateStaffDocumentVariables(staffId: staffId,staffName: staffName,documentId: documentId,status: status,documentUrl: _documentUrl,expiryDate: _expiryDate,); + return _dataConnect.mutation("createStaffDocument", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateStaffDocumentStaffDocumentInsert { + final String staffId; + final String documentId; + CreateStaffDocumentStaffDocumentInsert.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + documentId = nativeFromJson(json['documentId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffDocumentStaffDocumentInsert otherTyped = other as CreateStaffDocumentStaffDocumentInsert; + return staffId == otherTyped.staffId && + documentId == otherTyped.documentId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, documentId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['documentId'] = nativeToJson(documentId); + return json; + } + + CreateStaffDocumentStaffDocumentInsert({ + required this.staffId, + required this.documentId, + }); +} + +@immutable +class CreateStaffDocumentData { + final CreateStaffDocumentStaffDocumentInsert staffDocument_insert; + CreateStaffDocumentData.fromJson(dynamic json): + + staffDocument_insert = CreateStaffDocumentStaffDocumentInsert.fromJson(json['staffDocument_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffDocumentData otherTyped = other as CreateStaffDocumentData; + return staffDocument_insert == otherTyped.staffDocument_insert; + + } + @override + int get hashCode => staffDocument_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['staffDocument_insert'] = staffDocument_insert.toJson(); + return json; + } + + CreateStaffDocumentData({ + required this.staffDocument_insert, + }); +} + +@immutable +class CreateStaffDocumentVariables { + final String staffId; + final String staffName; + final String documentId; + final DocumentStatus status; + late final OptionaldocumentUrl; + late final OptionalexpiryDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateStaffDocumentVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + staffName = nativeFromJson(json['staffName']), + documentId = nativeFromJson(json['documentId']), + status = DocumentStatus.values.byName(json['status']) { + + + + + + + documentUrl = Optional.optional(nativeFromJson, nativeToJson); + documentUrl.value = json['documentUrl'] == null ? null : nativeFromJson(json['documentUrl']); + + + expiryDate = Optional.optional((json) => json['expiryDate'] = Timestamp.fromJson(json['expiryDate']), defaultSerializer); + expiryDate.value = json['expiryDate'] == null ? null : Timestamp.fromJson(json['expiryDate']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffDocumentVariables otherTyped = other as CreateStaffDocumentVariables; + return staffId == otherTyped.staffId && + staffName == otherTyped.staffName && + documentId == otherTyped.documentId && + status == otherTyped.status && + documentUrl == otherTyped.documentUrl && + expiryDate == otherTyped.expiryDate; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, staffName.hashCode, documentId.hashCode, status.hashCode, documentUrl.hashCode, expiryDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['staffName'] = nativeToJson(staffName); + json['documentId'] = nativeToJson(documentId); + json['status'] = + status.name + ; + if(documentUrl.state == OptionalState.set) { + json['documentUrl'] = documentUrl.toJson(); + } + if(expiryDate.state == OptionalState.set) { + json['expiryDate'] = expiryDate.toJson(); + } + return json; + } + + CreateStaffDocumentVariables({ + required this.staffId, + required this.staffName, + required this.documentId, + required this.status, + required this.documentUrl, + required this.expiryDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_role.dart new file mode 100644 index 00000000..321b96e0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_staff_role.dart @@ -0,0 +1,152 @@ +part of 'generated.dart'; + +class CreateStaffRoleVariablesBuilder { + String staffId; + String roleId; + Optional _roleType = Optional.optional((data) => RoleType.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; CreateStaffRoleVariablesBuilder roleType(RoleType? t) { + _roleType.value = t; + return this; + } + + CreateStaffRoleVariablesBuilder(this._dataConnect, {required this.staffId,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => CreateStaffRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateStaffRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateStaffRoleVariables vars= CreateStaffRoleVariables(staffId: staffId,roleId: roleId,roleType: _roleType,); + return _dataConnect.mutation("createStaffRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateStaffRoleStaffRoleInsert { + final String staffId; + final String roleId; + CreateStaffRoleStaffRoleInsert.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffRoleStaffRoleInsert otherTyped = other as CreateStaffRoleStaffRoleInsert; + return staffId == otherTyped.staffId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + CreateStaffRoleStaffRoleInsert({ + required this.staffId, + required this.roleId, + }); +} + +@immutable +class CreateStaffRoleData { + final CreateStaffRoleStaffRoleInsert staffRole_insert; + CreateStaffRoleData.fromJson(dynamic json): + + staffRole_insert = CreateStaffRoleStaffRoleInsert.fromJson(json['staffRole_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffRoleData otherTyped = other as CreateStaffRoleData; + return staffRole_insert == otherTyped.staffRole_insert; + + } + @override + int get hashCode => staffRole_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['staffRole_insert'] = staffRole_insert.toJson(); + return json; + } + + CreateStaffRoleData({ + required this.staffRole_insert, + }); +} + +@immutable +class CreateStaffRoleVariables { + final String staffId; + final String roleId; + late final OptionalroleType; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateStaffRoleVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']) { + + + + + roleType = Optional.optional((data) => RoleType.values.byName(data), enumSerializer); + roleType.value = json['roleType'] == null ? null : RoleType.values.byName(json['roleType']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateStaffRoleVariables otherTyped = other as CreateStaffRoleVariables; + return staffId == otherTyped.staffId && + roleId == otherTyped.roleId && + roleType == otherTyped.roleType; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, roleId.hashCode, roleType.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + if(roleType.state == OptionalState.set) { + json['roleType'] = roleType.toJson(); + } + return json; + } + + CreateStaffRoleVariables({ + required this.staffId, + required this.roleId, + required this.roleType, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_task.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_task.dart new file mode 100644 index 00000000..74d80bc4 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_task.dart @@ -0,0 +1,255 @@ +part of 'generated.dart'; + +class CreateTaskVariablesBuilder { + String taskName; + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + TaskPriority priority; + TaskStatus status; + Optional _dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + Optional _progress = Optional.optional(nativeFromJson, nativeToJson); + Optional _orderIndex = Optional.optional(nativeFromJson, nativeToJson); + Optional _commentCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _attachmentCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _files = Optional.optional(AnyValue.fromJson, defaultSerializer); + String ownerId; + + final FirebaseDataConnect _dataConnect; CreateTaskVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateTaskVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + CreateTaskVariablesBuilder progress(int? t) { + _progress.value = t; + return this; + } + CreateTaskVariablesBuilder orderIndex(int? t) { + _orderIndex.value = t; + return this; + } + CreateTaskVariablesBuilder commentCount(int? t) { + _commentCount.value = t; + return this; + } + CreateTaskVariablesBuilder attachmentCount(int? t) { + _attachmentCount.value = t; + return this; + } + CreateTaskVariablesBuilder files(AnyValue? t) { + _files.value = t; + return this; + } + + CreateTaskVariablesBuilder(this._dataConnect, {required this.taskName,required this.priority,required this.status,required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => CreateTaskData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateTaskVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateTaskVariables vars= CreateTaskVariables(taskName: taskName,description: _description,priority: priority,status: status,dueDate: _dueDate,progress: _progress,orderIndex: _orderIndex,commentCount: _commentCount,attachmentCount: _attachmentCount,files: _files,ownerId: ownerId,); + return _dataConnect.mutation("createTask", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateTaskTaskInsert { + final String id; + CreateTaskTaskInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaskTaskInsert otherTyped = other as CreateTaskTaskInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateTaskTaskInsert({ + required this.id, + }); +} + +@immutable +class CreateTaskData { + final CreateTaskTaskInsert task_insert; + CreateTaskData.fromJson(dynamic json): + + task_insert = CreateTaskTaskInsert.fromJson(json['task_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaskData otherTyped = other as CreateTaskData; + return task_insert == otherTyped.task_insert; + + } + @override + int get hashCode => task_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['task_insert'] = task_insert.toJson(); + return json; + } + + CreateTaskData({ + required this.task_insert, + }); +} + +@immutable +class CreateTaskVariables { + final String taskName; + late final Optionaldescription; + final TaskPriority priority; + final TaskStatus status; + late final OptionaldueDate; + late final Optionalprogress; + late final OptionalorderIndex; + late final OptionalcommentCount; + late final OptionalattachmentCount; + late final Optionalfiles; + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateTaskVariables.fromJson(Map json): + + taskName = nativeFromJson(json['taskName']), + priority = TaskPriority.values.byName(json['priority']), + status = TaskStatus.values.byName(json['status']), + ownerId = nativeFromJson(json['ownerId']) { + + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + + + dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + dueDate.value = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']); + + + progress = Optional.optional(nativeFromJson, nativeToJson); + progress.value = json['progress'] == null ? null : nativeFromJson(json['progress']); + + + orderIndex = Optional.optional(nativeFromJson, nativeToJson); + orderIndex.value = json['orderIndex'] == null ? null : nativeFromJson(json['orderIndex']); + + + commentCount = Optional.optional(nativeFromJson, nativeToJson); + commentCount.value = json['commentCount'] == null ? null : nativeFromJson(json['commentCount']); + + + attachmentCount = Optional.optional(nativeFromJson, nativeToJson); + attachmentCount.value = json['attachmentCount'] == null ? null : nativeFromJson(json['attachmentCount']); + + + files = Optional.optional(AnyValue.fromJson, defaultSerializer); + files.value = json['files'] == null ? null : AnyValue.fromJson(json['files']); + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaskVariables otherTyped = other as CreateTaskVariables; + return taskName == otherTyped.taskName && + description == otherTyped.description && + priority == otherTyped.priority && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + orderIndex == otherTyped.orderIndex && + commentCount == otherTyped.commentCount && + attachmentCount == otherTyped.attachmentCount && + files == otherTyped.files && + ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => Object.hashAll([taskName.hashCode, description.hashCode, priority.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, orderIndex.hashCode, commentCount.hashCode, attachmentCount.hashCode, files.hashCode, ownerId.hashCode]); + + + Map toJson() { + Map json = {}; + json['taskName'] = nativeToJson(taskName); + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + json['priority'] = + priority.name + ; + json['status'] = + status.name + ; + if(dueDate.state == OptionalState.set) { + json['dueDate'] = dueDate.toJson(); + } + if(progress.state == OptionalState.set) { + json['progress'] = progress.toJson(); + } + if(orderIndex.state == OptionalState.set) { + json['orderIndex'] = orderIndex.toJson(); + } + if(commentCount.state == OptionalState.set) { + json['commentCount'] = commentCount.toJson(); + } + if(attachmentCount.state == OptionalState.set) { + json['attachmentCount'] = attachmentCount.toJson(); + } + if(files.state == OptionalState.set) { + json['files'] = files.toJson(); + } + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + CreateTaskVariables({ + required this.taskName, + required this.description, + required this.priority, + required this.status, + required this.dueDate, + required this.progress, + required this.orderIndex, + required this.commentCount, + required this.attachmentCount, + required this.files, + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_task_comment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_task_comment.dart new file mode 100644 index 00000000..e17ba79f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_task_comment.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class CreateTaskCommentVariablesBuilder { + String taskId; + String teamMemberId; + String comment; + Optional _isSystem = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateTaskCommentVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + CreateTaskCommentVariablesBuilder(this._dataConnect, {required this.taskId,required this.teamMemberId,required this.comment,}); + Deserializer dataDeserializer = (dynamic json) => CreateTaskCommentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateTaskCommentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateTaskCommentVariables vars= CreateTaskCommentVariables(taskId: taskId,teamMemberId: teamMemberId,comment: comment,isSystem: _isSystem,); + return _dataConnect.mutation("createTaskComment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateTaskCommentTaskCommentInsert { + final String id; + CreateTaskCommentTaskCommentInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaskCommentTaskCommentInsert otherTyped = other as CreateTaskCommentTaskCommentInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateTaskCommentTaskCommentInsert({ + required this.id, + }); +} + +@immutable +class CreateTaskCommentData { + final CreateTaskCommentTaskCommentInsert taskComment_insert; + CreateTaskCommentData.fromJson(dynamic json): + + taskComment_insert = CreateTaskCommentTaskCommentInsert.fromJson(json['taskComment_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaskCommentData otherTyped = other as CreateTaskCommentData; + return taskComment_insert == otherTyped.taskComment_insert; + + } + @override + int get hashCode => taskComment_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['taskComment_insert'] = taskComment_insert.toJson(); + return json; + } + + CreateTaskCommentData({ + required this.taskComment_insert, + }); +} + +@immutable +class CreateTaskCommentVariables { + final String taskId; + final String teamMemberId; + final String comment; + late final OptionalisSystem; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateTaskCommentVariables.fromJson(Map json): + + taskId = nativeFromJson(json['taskId']), + teamMemberId = nativeFromJson(json['teamMemberId']), + comment = nativeFromJson(json['comment']) { + + + + + + isSystem = Optional.optional(nativeFromJson, nativeToJson); + isSystem.value = json['isSystem'] == null ? null : nativeFromJson(json['isSystem']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaskCommentVariables otherTyped = other as CreateTaskCommentVariables; + return taskId == otherTyped.taskId && + teamMemberId == otherTyped.teamMemberId && + comment == otherTyped.comment && + isSystem == otherTyped.isSystem; + + } + @override + int get hashCode => Object.hashAll([taskId.hashCode, teamMemberId.hashCode, comment.hashCode, isSystem.hashCode]); + + + Map toJson() { + Map json = {}; + json['taskId'] = nativeToJson(taskId); + json['teamMemberId'] = nativeToJson(teamMemberId); + json['comment'] = nativeToJson(comment); + if(isSystem.state == OptionalState.set) { + json['isSystem'] = isSystem.toJson(); + } + return json; + } + + CreateTaskCommentVariables({ + required this.taskId, + required this.teamMemberId, + required this.comment, + required this.isSystem, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_tax_form.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_tax_form.dart new file mode 100644 index 00000000..62723cd5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_tax_form.dart @@ -0,0 +1,201 @@ +part of 'generated.dart'; + +class CreateTaxFormVariablesBuilder { + TaxFormType formType; + String title; + Optional _subtitle = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer); + String staffId; + Optional _formData = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; CreateTaxFormVariablesBuilder subtitle(String? t) { + _subtitle.value = t; + return this; + } + CreateTaxFormVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateTaxFormVariablesBuilder status(TaxFormStatus? t) { + _status.value = t; + return this; + } + CreateTaxFormVariablesBuilder formData(AnyValue? t) { + _formData.value = t; + return this; + } + + CreateTaxFormVariablesBuilder(this._dataConnect, {required this.formType,required this.title,required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => CreateTaxFormData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateTaxFormVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateTaxFormVariables vars= CreateTaxFormVariables(formType: formType,title: title,subtitle: _subtitle,description: _description,status: _status,staffId: staffId,formData: _formData,); + return _dataConnect.mutation("createTaxForm", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateTaxFormTaxFormInsert { + final String id; + CreateTaxFormTaxFormInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaxFormTaxFormInsert otherTyped = other as CreateTaxFormTaxFormInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateTaxFormTaxFormInsert({ + required this.id, + }); +} + +@immutable +class CreateTaxFormData { + final CreateTaxFormTaxFormInsert taxForm_insert; + CreateTaxFormData.fromJson(dynamic json): + + taxForm_insert = CreateTaxFormTaxFormInsert.fromJson(json['taxForm_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaxFormData otherTyped = other as CreateTaxFormData; + return taxForm_insert == otherTyped.taxForm_insert; + + } + @override + int get hashCode => taxForm_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['taxForm_insert'] = taxForm_insert.toJson(); + return json; + } + + CreateTaxFormData({ + required this.taxForm_insert, + }); +} + +@immutable +class CreateTaxFormVariables { + final TaxFormType formType; + final String title; + late final Optionalsubtitle; + late final Optionaldescription; + late final Optionalstatus; + final String staffId; + late final OptionalformData; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateTaxFormVariables.fromJson(Map json): + + formType = TaxFormType.values.byName(json['formType']), + title = nativeFromJson(json['title']), + staffId = nativeFromJson(json['staffId']) { + + + + + subtitle = Optional.optional(nativeFromJson, nativeToJson); + subtitle.value = json['subtitle'] == null ? null : nativeFromJson(json['subtitle']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : TaxFormStatus.values.byName(json['status']); + + + + formData = Optional.optional(AnyValue.fromJson, defaultSerializer); + formData.value = json['formData'] == null ? null : AnyValue.fromJson(json['formData']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTaxFormVariables otherTyped = other as CreateTaxFormVariables; + return formType == otherTyped.formType && + title == otherTyped.title && + subtitle == otherTyped.subtitle && + description == otherTyped.description && + status == otherTyped.status && + staffId == otherTyped.staffId && + formData == otherTyped.formData; + + } + @override + int get hashCode => Object.hashAll([formType.hashCode, title.hashCode, subtitle.hashCode, description.hashCode, status.hashCode, staffId.hashCode, formData.hashCode]); + + + Map toJson() { + Map json = {}; + json['formType'] = + formType.name + ; + json['title'] = nativeToJson(title); + if(subtitle.state == OptionalState.set) { + json['subtitle'] = subtitle.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + json['staffId'] = nativeToJson(staffId); + if(formData.state == OptionalState.set) { + json['formData'] = formData.toJson(); + } + return json; + } + + CreateTaxFormVariables({ + required this.formType, + required this.title, + required this.subtitle, + required this.description, + required this.status, + required this.staffId, + required this.formData, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_team.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team.dart new file mode 100644 index 00000000..f179e58d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team.dart @@ -0,0 +1,296 @@ +part of 'generated.dart'; + +class CreateTeamVariablesBuilder { + String teamName; + String ownerId; + String ownerName; + String ownerRole; + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _companyLogo = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalMembers = Optional.optional(nativeFromJson, nativeToJson); + Optional _activeMembers = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalHubs = Optional.optional(nativeFromJson, nativeToJson); + Optional _departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _favoriteStaffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _blockedStaffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _favoriteStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _blockedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; CreateTeamVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateTeamVariablesBuilder companyLogo(String? t) { + _companyLogo.value = t; + return this; + } + CreateTeamVariablesBuilder totalMembers(int? t) { + _totalMembers.value = t; + return this; + } + CreateTeamVariablesBuilder activeMembers(int? t) { + _activeMembers.value = t; + return this; + } + CreateTeamVariablesBuilder totalHubs(int? t) { + _totalHubs.value = t; + return this; + } + CreateTeamVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + CreateTeamVariablesBuilder favoriteStaffCount(int? t) { + _favoriteStaffCount.value = t; + return this; + } + CreateTeamVariablesBuilder blockedStaffCount(int? t) { + _blockedStaffCount.value = t; + return this; + } + CreateTeamVariablesBuilder favoriteStaff(AnyValue? t) { + _favoriteStaff.value = t; + return this; + } + CreateTeamVariablesBuilder blockedStaff(AnyValue? t) { + _blockedStaff.value = t; + return this; + } + + CreateTeamVariablesBuilder(this._dataConnect, {required this.teamName,required this.ownerId,required this.ownerName,required this.ownerRole,}); + Deserializer dataDeserializer = (dynamic json) => CreateTeamData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateTeamVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateTeamVariables vars= CreateTeamVariables(teamName: teamName,ownerId: ownerId,ownerName: ownerName,ownerRole: ownerRole,email: _email,companyLogo: _companyLogo,totalMembers: _totalMembers,activeMembers: _activeMembers,totalHubs: _totalHubs,departments: _departments,favoriteStaffCount: _favoriteStaffCount,blockedStaffCount: _blockedStaffCount,favoriteStaff: _favoriteStaff,blockedStaff: _blockedStaff,); + return _dataConnect.mutation("createTeam", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateTeamTeamInsert { + final String id; + CreateTeamTeamInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamTeamInsert otherTyped = other as CreateTeamTeamInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateTeamTeamInsert({ + required this.id, + }); +} + +@immutable +class CreateTeamData { + final CreateTeamTeamInsert team_insert; + CreateTeamData.fromJson(dynamic json): + + team_insert = CreateTeamTeamInsert.fromJson(json['team_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamData otherTyped = other as CreateTeamData; + return team_insert == otherTyped.team_insert; + + } + @override + int get hashCode => team_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['team_insert'] = team_insert.toJson(); + return json; + } + + CreateTeamData({ + required this.team_insert, + }); +} + +@immutable +class CreateTeamVariables { + final String teamName; + final String ownerId; + final String ownerName; + final String ownerRole; + late final Optionalemail; + late final OptionalcompanyLogo; + late final OptionaltotalMembers; + late final OptionalactiveMembers; + late final OptionaltotalHubs; + late final Optionaldepartments; + late final OptionalfavoriteStaffCount; + late final OptionalblockedStaffCount; + late final OptionalfavoriteStaff; + late final OptionalblockedStaff; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateTeamVariables.fromJson(Map json): + + teamName = nativeFromJson(json['teamName']), + ownerId = nativeFromJson(json['ownerId']), + ownerName = nativeFromJson(json['ownerName']), + ownerRole = nativeFromJson(json['ownerRole']) { + + + + + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + companyLogo = Optional.optional(nativeFromJson, nativeToJson); + companyLogo.value = json['companyLogo'] == null ? null : nativeFromJson(json['companyLogo']); + + + totalMembers = Optional.optional(nativeFromJson, nativeToJson); + totalMembers.value = json['totalMembers'] == null ? null : nativeFromJson(json['totalMembers']); + + + activeMembers = Optional.optional(nativeFromJson, nativeToJson); + activeMembers.value = json['activeMembers'] == null ? null : nativeFromJson(json['activeMembers']); + + + totalHubs = Optional.optional(nativeFromJson, nativeToJson); + totalHubs.value = json['totalHubs'] == null ? null : nativeFromJson(json['totalHubs']); + + + departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + departments.value = json['departments'] == null ? null : AnyValue.fromJson(json['departments']); + + + favoriteStaffCount = Optional.optional(nativeFromJson, nativeToJson); + favoriteStaffCount.value = json['favoriteStaffCount'] == null ? null : nativeFromJson(json['favoriteStaffCount']); + + + blockedStaffCount = Optional.optional(nativeFromJson, nativeToJson); + blockedStaffCount.value = json['blockedStaffCount'] == null ? null : nativeFromJson(json['blockedStaffCount']); + + + favoriteStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + favoriteStaff.value = json['favoriteStaff'] == null ? null : AnyValue.fromJson(json['favoriteStaff']); + + + blockedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + blockedStaff.value = json['blockedStaff'] == null ? null : AnyValue.fromJson(json['blockedStaff']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamVariables otherTyped = other as CreateTeamVariables; + return teamName == otherTyped.teamName && + ownerId == otherTyped.ownerId && + ownerName == otherTyped.ownerName && + ownerRole == otherTyped.ownerRole && + email == otherTyped.email && + companyLogo == otherTyped.companyLogo && + totalMembers == otherTyped.totalMembers && + activeMembers == otherTyped.activeMembers && + totalHubs == otherTyped.totalHubs && + departments == otherTyped.departments && + favoriteStaffCount == otherTyped.favoriteStaffCount && + blockedStaffCount == otherTyped.blockedStaffCount && + favoriteStaff == otherTyped.favoriteStaff && + blockedStaff == otherTyped.blockedStaff; + + } + @override + int get hashCode => Object.hashAll([teamName.hashCode, ownerId.hashCode, ownerName.hashCode, ownerRole.hashCode, email.hashCode, companyLogo.hashCode, totalMembers.hashCode, activeMembers.hashCode, totalHubs.hashCode, departments.hashCode, favoriteStaffCount.hashCode, blockedStaffCount.hashCode, favoriteStaff.hashCode, blockedStaff.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamName'] = nativeToJson(teamName); + json['ownerId'] = nativeToJson(ownerId); + json['ownerName'] = nativeToJson(ownerName); + json['ownerRole'] = nativeToJson(ownerRole); + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(companyLogo.state == OptionalState.set) { + json['companyLogo'] = companyLogo.toJson(); + } + if(totalMembers.state == OptionalState.set) { + json['totalMembers'] = totalMembers.toJson(); + } + if(activeMembers.state == OptionalState.set) { + json['activeMembers'] = activeMembers.toJson(); + } + if(totalHubs.state == OptionalState.set) { + json['totalHubs'] = totalHubs.toJson(); + } + if(departments.state == OptionalState.set) { + json['departments'] = departments.toJson(); + } + if(favoriteStaffCount.state == OptionalState.set) { + json['favoriteStaffCount'] = favoriteStaffCount.toJson(); + } + if(blockedStaffCount.state == OptionalState.set) { + json['blockedStaffCount'] = blockedStaffCount.toJson(); + } + if(favoriteStaff.state == OptionalState.set) { + json['favoriteStaff'] = favoriteStaff.toJson(); + } + if(blockedStaff.state == OptionalState.set) { + json['blockedStaff'] = blockedStaff.toJson(); + } + return json; + } + + CreateTeamVariables({ + required this.teamName, + required this.ownerId, + required this.ownerName, + required this.ownerRole, + required this.email, + required this.companyLogo, + required this.totalMembers, + required this.activeMembers, + required this.totalHubs, + required this.departments, + required this.favoriteStaffCount, + required this.blockedStaffCount, + required this.favoriteStaff, + required this.blockedStaff, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_hub.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_hub.dart new file mode 100644 index 00000000..05034b67 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_hub.dart @@ -0,0 +1,197 @@ +part of 'generated.dart'; + +class CreateTeamHubVariablesBuilder { + String teamId; + String hubName; + String address; + String city; + String state; + String zipCode; + String managerName; + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; CreateTeamHubVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateTeamHubVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + + CreateTeamHubVariablesBuilder(this._dataConnect, {required this.teamId,required this.hubName,required this.address,required this.city,required this.state,required this.zipCode,required this.managerName,}); + Deserializer dataDeserializer = (dynamic json) => CreateTeamHubData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateTeamHubVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateTeamHubVariables vars= CreateTeamHubVariables(teamId: teamId,hubName: hubName,address: address,city: city,state: state,zipCode: zipCode,managerName: managerName,isActive: _isActive,departments: _departments,); + return _dataConnect.mutation("createTeamHub", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateTeamHubTeamHubInsert { + final String id; + CreateTeamHubTeamHubInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamHubTeamHubInsert otherTyped = other as CreateTeamHubTeamHubInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateTeamHubTeamHubInsert({ + required this.id, + }); +} + +@immutable +class CreateTeamHubData { + final CreateTeamHubTeamHubInsert teamHub_insert; + CreateTeamHubData.fromJson(dynamic json): + + teamHub_insert = CreateTeamHubTeamHubInsert.fromJson(json['teamHub_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamHubData otherTyped = other as CreateTeamHubData; + return teamHub_insert == otherTyped.teamHub_insert; + + } + @override + int get hashCode => teamHub_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['teamHub_insert'] = teamHub_insert.toJson(); + return json; + } + + CreateTeamHubData({ + required this.teamHub_insert, + }); +} + +@immutable +class CreateTeamHubVariables { + final String teamId; + final String hubName; + final String address; + final String city; + final String state; + final String zipCode; + final String managerName; + late final OptionalisActive; + late final Optionaldepartments; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateTeamHubVariables.fromJson(Map json): + + teamId = nativeFromJson(json['teamId']), + hubName = nativeFromJson(json['hubName']), + address = nativeFromJson(json['address']), + city = nativeFromJson(json['city']), + state = nativeFromJson(json['state']), + zipCode = nativeFromJson(json['zipCode']), + managerName = nativeFromJson(json['managerName']) { + + + + + + + + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + departments.value = json['departments'] == null ? null : AnyValue.fromJson(json['departments']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamHubVariables otherTyped = other as CreateTeamHubVariables; + return teamId == otherTyped.teamId && + hubName == otherTyped.hubName && + address == otherTyped.address && + city == otherTyped.city && + state == otherTyped.state && + zipCode == otherTyped.zipCode && + managerName == otherTyped.managerName && + isActive == otherTyped.isActive && + departments == otherTyped.departments; + + } + @override + int get hashCode => Object.hashAll([teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamId'] = nativeToJson(teamId); + json['hubName'] = nativeToJson(hubName); + json['address'] = nativeToJson(address); + json['city'] = nativeToJson(city); + json['state'] = nativeToJson(state); + json['zipCode'] = nativeToJson(zipCode); + json['managerName'] = nativeToJson(managerName); + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(departments.state == OptionalState.set) { + json['departments'] = departments.toJson(); + } + return json; + } + + CreateTeamHubVariables({ + required this.teamId, + required this.hubName, + required this.address, + required this.city, + required this.state, + required this.zipCode, + required this.managerName, + required this.isActive, + required this.departments, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_hud_department.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_hud_department.dart new file mode 100644 index 00000000..b1cd4d32 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_hud_department.dart @@ -0,0 +1,147 @@ +part of 'generated.dart'; + +class CreateTeamHudDepartmentVariablesBuilder { + String name; + Optional _costCenter = Optional.optional(nativeFromJson, nativeToJson); + String teamHubId; + + final FirebaseDataConnect _dataConnect; CreateTeamHudDepartmentVariablesBuilder costCenter(String? t) { + _costCenter.value = t; + return this; + } + + CreateTeamHudDepartmentVariablesBuilder(this._dataConnect, {required this.name,required this.teamHubId,}); + Deserializer dataDeserializer = (dynamic json) => CreateTeamHudDepartmentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateTeamHudDepartmentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateTeamHudDepartmentVariables vars= CreateTeamHudDepartmentVariables(name: name,costCenter: _costCenter,teamHubId: teamHubId,); + return _dataConnect.mutation("createTeamHudDepartment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateTeamHudDepartmentTeamHudDepartmentInsert { + final String id; + CreateTeamHudDepartmentTeamHudDepartmentInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamHudDepartmentTeamHudDepartmentInsert otherTyped = other as CreateTeamHudDepartmentTeamHudDepartmentInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateTeamHudDepartmentTeamHudDepartmentInsert({ + required this.id, + }); +} + +@immutable +class CreateTeamHudDepartmentData { + final CreateTeamHudDepartmentTeamHudDepartmentInsert teamHudDepartment_insert; + CreateTeamHudDepartmentData.fromJson(dynamic json): + + teamHudDepartment_insert = CreateTeamHudDepartmentTeamHudDepartmentInsert.fromJson(json['teamHudDepartment_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamHudDepartmentData otherTyped = other as CreateTeamHudDepartmentData; + return teamHudDepartment_insert == otherTyped.teamHudDepartment_insert; + + } + @override + int get hashCode => teamHudDepartment_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['teamHudDepartment_insert'] = teamHudDepartment_insert.toJson(); + return json; + } + + CreateTeamHudDepartmentData({ + required this.teamHudDepartment_insert, + }); +} + +@immutable +class CreateTeamHudDepartmentVariables { + final String name; + late final OptionalcostCenter; + final String teamHubId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateTeamHudDepartmentVariables.fromJson(Map json): + + name = nativeFromJson(json['name']), + teamHubId = nativeFromJson(json['teamHubId']) { + + + + costCenter = Optional.optional(nativeFromJson, nativeToJson); + costCenter.value = json['costCenter'] == null ? null : nativeFromJson(json['costCenter']); + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamHudDepartmentVariables otherTyped = other as CreateTeamHudDepartmentVariables; + return name == otherTyped.name && + costCenter == otherTyped.costCenter && + teamHubId == otherTyped.teamHubId; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, costCenter.hashCode, teamHubId.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + if(costCenter.state == OptionalState.set) { + json['costCenter'] = costCenter.toJson(); + } + json['teamHubId'] = nativeToJson(teamHubId); + return json; + } + + CreateTeamHudDepartmentVariables({ + required this.name, + required this.costCenter, + required this.teamHubId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_member.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_member.dart new file mode 100644 index 00000000..273877e3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_team_member.dart @@ -0,0 +1,216 @@ +part of 'generated.dart'; + +class CreateTeamMemberVariablesBuilder { + String teamId; + TeamMemberRole role; + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _department = Optional.optional(nativeFromJson, nativeToJson); + Optional _teamHubId = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + String userId; + Optional _inviteStatus = Optional.optional((data) => TeamMemberInviteStatus.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; CreateTeamMemberVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + CreateTeamMemberVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + CreateTeamMemberVariablesBuilder teamHubId(String? t) { + _teamHubId.value = t; + return this; + } + CreateTeamMemberVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateTeamMemberVariablesBuilder inviteStatus(TeamMemberInviteStatus? t) { + _inviteStatus.value = t; + return this; + } + + CreateTeamMemberVariablesBuilder(this._dataConnect, {required this.teamId,required this.role,required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => CreateTeamMemberData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateTeamMemberVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateTeamMemberVariables vars= CreateTeamMemberVariables(teamId: teamId,role: role,title: _title,department: _department,teamHubId: _teamHubId,isActive: _isActive,userId: userId,inviteStatus: _inviteStatus,); + return _dataConnect.mutation("createTeamMember", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateTeamMemberTeamMemberInsert { + final String id; + CreateTeamMemberTeamMemberInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamMemberTeamMemberInsert otherTyped = other as CreateTeamMemberTeamMemberInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateTeamMemberTeamMemberInsert({ + required this.id, + }); +} + +@immutable +class CreateTeamMemberData { + final CreateTeamMemberTeamMemberInsert teamMember_insert; + CreateTeamMemberData.fromJson(dynamic json): + + teamMember_insert = CreateTeamMemberTeamMemberInsert.fromJson(json['teamMember_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamMemberData otherTyped = other as CreateTeamMemberData; + return teamMember_insert == otherTyped.teamMember_insert; + + } + @override + int get hashCode => teamMember_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['teamMember_insert'] = teamMember_insert.toJson(); + return json; + } + + CreateTeamMemberData({ + required this.teamMember_insert, + }); +} + +@immutable +class CreateTeamMemberVariables { + final String teamId; + final TeamMemberRole role; + late final Optionaltitle; + late final Optionaldepartment; + late final OptionalteamHubId; + late final OptionalisActive; + final String userId; + late final OptionalinviteStatus; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateTeamMemberVariables.fromJson(Map json): + + teamId = nativeFromJson(json['teamId']), + role = TeamMemberRole.values.byName(json['role']), + userId = nativeFromJson(json['userId']) { + + + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + department = Optional.optional(nativeFromJson, nativeToJson); + department.value = json['department'] == null ? null : nativeFromJson(json['department']); + + + teamHubId = Optional.optional(nativeFromJson, nativeToJson); + teamHubId.value = json['teamHubId'] == null ? null : nativeFromJson(json['teamHubId']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + + inviteStatus = Optional.optional((data) => TeamMemberInviteStatus.values.byName(data), enumSerializer); + inviteStatus.value = json['inviteStatus'] == null ? null : TeamMemberInviteStatus.values.byName(json['inviteStatus']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateTeamMemberVariables otherTyped = other as CreateTeamMemberVariables; + return teamId == otherTyped.teamId && + role == otherTyped.role && + title == otherTyped.title && + department == otherTyped.department && + teamHubId == otherTyped.teamHubId && + isActive == otherTyped.isActive && + userId == otherTyped.userId && + inviteStatus == otherTyped.inviteStatus; + + } + @override + int get hashCode => Object.hashAll([teamId.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, userId.hashCode, inviteStatus.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamId'] = nativeToJson(teamId); + json['role'] = + role.name + ; + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(department.state == OptionalState.set) { + json['department'] = department.toJson(); + } + if(teamHubId.state == OptionalState.set) { + json['teamHubId'] = teamHubId.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + json['userId'] = nativeToJson(userId); + if(inviteStatus.state == OptionalState.set) { + json['inviteStatus'] = inviteStatus.toJson(); + } + return json; + } + + CreateTeamMemberVariables({ + required this.teamId, + required this.role, + required this.title, + required this.department, + required this.teamHubId, + required this.isActive, + required this.userId, + required this.inviteStatus, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_user.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_user.dart new file mode 100644 index 00000000..4bd0d2f5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_user.dart @@ -0,0 +1,194 @@ +part of 'generated.dart'; + +class CreateUserVariablesBuilder { + String id; + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _fullName = Optional.optional(nativeFromJson, nativeToJson); + UserBaseRole role; + Optional _userRole = Optional.optional(nativeFromJson, nativeToJson); + Optional _photoUrl = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateUserVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateUserVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + CreateUserVariablesBuilder userRole(String? t) { + _userRole.value = t; + return this; + } + CreateUserVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + + CreateUserVariablesBuilder(this._dataConnect, {required this.id,required this.role,}); + Deserializer dataDeserializer = (dynamic json) => CreateUserData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateUserVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateUserVariables vars= CreateUserVariables(id: id,email: _email,fullName: _fullName,role: role,userRole: _userRole,photoUrl: _photoUrl,); + return _dataConnect.mutation("CreateUser", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateUserUserInsert { + final String id; + CreateUserUserInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateUserUserInsert otherTyped = other as CreateUserUserInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateUserUserInsert({ + required this.id, + }); +} + +@immutable +class CreateUserData { + final CreateUserUserInsert user_insert; + CreateUserData.fromJson(dynamic json): + + user_insert = CreateUserUserInsert.fromJson(json['user_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateUserData otherTyped = other as CreateUserData; + return user_insert == otherTyped.user_insert; + + } + @override + int get hashCode => user_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['user_insert'] = user_insert.toJson(); + return json; + } + + CreateUserData({ + required this.user_insert, + }); +} + +@immutable +class CreateUserVariables { + final String id; + late final Optionalemail; + late final OptionalfullName; + final UserBaseRole role; + late final OptionaluserRole; + late final OptionalphotoUrl; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateUserVariables.fromJson(Map json): + + id = nativeFromJson(json['id']), + role = UserBaseRole.values.byName(json['role']) { + + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + fullName = Optional.optional(nativeFromJson, nativeToJson); + fullName.value = json['fullName'] == null ? null : nativeFromJson(json['fullName']); + + + + userRole = Optional.optional(nativeFromJson, nativeToJson); + userRole.value = json['userRole'] == null ? null : nativeFromJson(json['userRole']); + + + photoUrl = Optional.optional(nativeFromJson, nativeToJson); + photoUrl.value = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateUserVariables otherTyped = other as CreateUserVariables; + return id == otherTyped.id && + email == otherTyped.email && + fullName == otherTyped.fullName && + role == otherTyped.role && + userRole == otherTyped.userRole && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, email.hashCode, fullName.hashCode, role.hashCode, userRole.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(fullName.state == OptionalState.set) { + json['fullName'] = fullName.toJson(); + } + json['role'] = + role.name + ; + if(userRole.state == OptionalState.set) { + json['userRole'] = userRole.toJson(); + } + if(photoUrl.state == OptionalState.set) { + json['photoUrl'] = photoUrl.toJson(); + } + return json; + } + + CreateUserVariables({ + required this.id, + required this.email, + required this.fullName, + required this.role, + required this.userRole, + required this.photoUrl, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_user_conversation.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_user_conversation.dart new file mode 100644 index 00000000..40cb1a70 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_user_conversation.dart @@ -0,0 +1,167 @@ +part of 'generated.dart'; + +class CreateUserConversationVariablesBuilder { + String conversationId; + String userId; + Optional _unreadCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastReadAt = Optional.optional((json) => json['lastReadAt'] = Timestamp.fromJson(json['lastReadAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; CreateUserConversationVariablesBuilder unreadCount(int? t) { + _unreadCount.value = t; + return this; + } + CreateUserConversationVariablesBuilder lastReadAt(Timestamp? t) { + _lastReadAt.value = t; + return this; + } + + CreateUserConversationVariablesBuilder(this._dataConnect, {required this.conversationId,required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => CreateUserConversationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateUserConversationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateUserConversationVariables vars= CreateUserConversationVariables(conversationId: conversationId,userId: userId,unreadCount: _unreadCount,lastReadAt: _lastReadAt,); + return _dataConnect.mutation("createUserConversation", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateUserConversationUserConversationInsert { + final String conversationId; + final String userId; + CreateUserConversationUserConversationInsert.fromJson(dynamic json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateUserConversationUserConversationInsert otherTyped = other as CreateUserConversationUserConversationInsert; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + return json; + } + + CreateUserConversationUserConversationInsert({ + required this.conversationId, + required this.userId, + }); +} + +@immutable +class CreateUserConversationData { + final CreateUserConversationUserConversationInsert userConversation_insert; + CreateUserConversationData.fromJson(dynamic json): + + userConversation_insert = CreateUserConversationUserConversationInsert.fromJson(json['userConversation_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateUserConversationData otherTyped = other as CreateUserConversationData; + return userConversation_insert == otherTyped.userConversation_insert; + + } + @override + int get hashCode => userConversation_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['userConversation_insert'] = userConversation_insert.toJson(); + return json; + } + + CreateUserConversationData({ + required this.userConversation_insert, + }); +} + +@immutable +class CreateUserConversationVariables { + final String conversationId; + final String userId; + late final OptionalunreadCount; + late final OptionallastReadAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateUserConversationVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']) { + + + + + unreadCount = Optional.optional(nativeFromJson, nativeToJson); + unreadCount.value = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']); + + + lastReadAt = Optional.optional((json) => json['lastReadAt'] = Timestamp.fromJson(json['lastReadAt']), defaultSerializer); + lastReadAt.value = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateUserConversationVariables otherTyped = other as CreateUserConversationVariables; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if(unreadCount.state == OptionalState.set) { + json['unreadCount'] = unreadCount.toJson(); + } + if(lastReadAt.state == OptionalState.set) { + json['lastReadAt'] = lastReadAt.toJson(); + } + return json; + } + + CreateUserConversationVariables({ + required this.conversationId, + required this.userId, + required this.unreadCount, + required this.lastReadAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor.dart new file mode 100644 index 00000000..28dcd037 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor.dart @@ -0,0 +1,402 @@ +part of 'generated.dart'; + +class CreateVendorVariablesBuilder { + String userId; + String companyName; + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _phone = Optional.optional(nativeFromJson, nativeToJson); + Optional _photoUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _address = Optional.optional(nativeFromJson, nativeToJson); + Optional _billingAddress = Optional.optional(nativeFromJson, nativeToJson); + Optional _timezone = Optional.optional(nativeFromJson, nativeToJson); + Optional _legalName = Optional.optional(nativeFromJson, nativeToJson); + Optional _doingBusinessAs = Optional.optional(nativeFromJson, nativeToJson); + Optional _region = Optional.optional(nativeFromJson, nativeToJson); + Optional _state = Optional.optional(nativeFromJson, nativeToJson); + Optional _city = Optional.optional(nativeFromJson, nativeToJson); + Optional _serviceSpecialty = Optional.optional(nativeFromJson, nativeToJson); + Optional _approvalStatus = Optional.optional((data) => ApprovalStatus.values.byName(data), enumSerializer); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _markup = Optional.optional(nativeFromJson, nativeToJson); + Optional _fee = Optional.optional(nativeFromJson, nativeToJson); + Optional _csat = Optional.optional(nativeFromJson, nativeToJson); + Optional _tier = Optional.optional((data) => VendorTier.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; CreateVendorVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + CreateVendorVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + CreateVendorVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + CreateVendorVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + CreateVendorVariablesBuilder billingAddress(String? t) { + _billingAddress.value = t; + return this; + } + CreateVendorVariablesBuilder timezone(String? t) { + _timezone.value = t; + return this; + } + CreateVendorVariablesBuilder legalName(String? t) { + _legalName.value = t; + return this; + } + CreateVendorVariablesBuilder doingBusinessAs(String? t) { + _doingBusinessAs.value = t; + return this; + } + CreateVendorVariablesBuilder region(String? t) { + _region.value = t; + return this; + } + CreateVendorVariablesBuilder state(String? t) { + _state.value = t; + return this; + } + CreateVendorVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + CreateVendorVariablesBuilder serviceSpecialty(String? t) { + _serviceSpecialty.value = t; + return this; + } + CreateVendorVariablesBuilder approvalStatus(ApprovalStatus? t) { + _approvalStatus.value = t; + return this; + } + CreateVendorVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateVendorVariablesBuilder markup(double? t) { + _markup.value = t; + return this; + } + CreateVendorVariablesBuilder fee(double? t) { + _fee.value = t; + return this; + } + CreateVendorVariablesBuilder csat(double? t) { + _csat.value = t; + return this; + } + CreateVendorVariablesBuilder tier(VendorTier? t) { + _tier.value = t; + return this; + } + + CreateVendorVariablesBuilder(this._dataConnect, {required this.userId,required this.companyName,}); + Deserializer dataDeserializer = (dynamic json) => CreateVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateVendorVariables vars= CreateVendorVariables(userId: userId,companyName: companyName,email: _email,phone: _phone,photoUrl: _photoUrl,address: _address,billingAddress: _billingAddress,timezone: _timezone,legalName: _legalName,doingBusinessAs: _doingBusinessAs,region: _region,state: _state,city: _city,serviceSpecialty: _serviceSpecialty,approvalStatus: _approvalStatus,isActive: _isActive,markup: _markup,fee: _fee,csat: _csat,tier: _tier,); + return _dataConnect.mutation("createVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateVendorVendorInsert { + final String id; + CreateVendorVendorInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorVendorInsert otherTyped = other as CreateVendorVendorInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateVendorVendorInsert({ + required this.id, + }); +} + +@immutable +class CreateVendorData { + final CreateVendorVendorInsert vendor_insert; + CreateVendorData.fromJson(dynamic json): + + vendor_insert = CreateVendorVendorInsert.fromJson(json['vendor_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorData otherTyped = other as CreateVendorData; + return vendor_insert == otherTyped.vendor_insert; + + } + @override + int get hashCode => vendor_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['vendor_insert'] = vendor_insert.toJson(); + return json; + } + + CreateVendorData({ + required this.vendor_insert, + }); +} + +@immutable +class CreateVendorVariables { + final String userId; + final String companyName; + late final Optionalemail; + late final Optionalphone; + late final OptionalphotoUrl; + late final Optionaladdress; + late final OptionalbillingAddress; + late final Optionaltimezone; + late final OptionallegalName; + late final OptionaldoingBusinessAs; + late final Optionalregion; + late final Optionalstate; + late final Optionalcity; + late final OptionalserviceSpecialty; + late final OptionalapprovalStatus; + late final OptionalisActive; + late final Optionalmarkup; + late final Optionalfee; + late final Optionalcsat; + late final Optionaltier; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateVendorVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']), + companyName = nativeFromJson(json['companyName']) { + + + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + phone = Optional.optional(nativeFromJson, nativeToJson); + phone.value = json['phone'] == null ? null : nativeFromJson(json['phone']); + + + photoUrl = Optional.optional(nativeFromJson, nativeToJson); + photoUrl.value = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + + + address = Optional.optional(nativeFromJson, nativeToJson); + address.value = json['address'] == null ? null : nativeFromJson(json['address']); + + + billingAddress = Optional.optional(nativeFromJson, nativeToJson); + billingAddress.value = json['billingAddress'] == null ? null : nativeFromJson(json['billingAddress']); + + + timezone = Optional.optional(nativeFromJson, nativeToJson); + timezone.value = json['timezone'] == null ? null : nativeFromJson(json['timezone']); + + + legalName = Optional.optional(nativeFromJson, nativeToJson); + legalName.value = json['legalName'] == null ? null : nativeFromJson(json['legalName']); + + + doingBusinessAs = Optional.optional(nativeFromJson, nativeToJson); + doingBusinessAs.value = json['doingBusinessAs'] == null ? null : nativeFromJson(json['doingBusinessAs']); + + + region = Optional.optional(nativeFromJson, nativeToJson); + region.value = json['region'] == null ? null : nativeFromJson(json['region']); + + + state = Optional.optional(nativeFromJson, nativeToJson); + state.value = json['state'] == null ? null : nativeFromJson(json['state']); + + + city = Optional.optional(nativeFromJson, nativeToJson); + city.value = json['city'] == null ? null : nativeFromJson(json['city']); + + + serviceSpecialty = Optional.optional(nativeFromJson, nativeToJson); + serviceSpecialty.value = json['serviceSpecialty'] == null ? null : nativeFromJson(json['serviceSpecialty']); + + + approvalStatus = Optional.optional((data) => ApprovalStatus.values.byName(data), enumSerializer); + approvalStatus.value = json['approvalStatus'] == null ? null : ApprovalStatus.values.byName(json['approvalStatus']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + markup = Optional.optional(nativeFromJson, nativeToJson); + markup.value = json['markup'] == null ? null : nativeFromJson(json['markup']); + + + fee = Optional.optional(nativeFromJson, nativeToJson); + fee.value = json['fee'] == null ? null : nativeFromJson(json['fee']); + + + csat = Optional.optional(nativeFromJson, nativeToJson); + csat.value = json['csat'] == null ? null : nativeFromJson(json['csat']); + + + tier = Optional.optional((data) => VendorTier.values.byName(data), enumSerializer); + tier.value = json['tier'] == null ? null : VendorTier.values.byName(json['tier']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorVariables otherTyped = other as CreateVendorVariables; + return userId == otherTyped.userId && + companyName == otherTyped.companyName && + email == otherTyped.email && + phone == otherTyped.phone && + photoUrl == otherTyped.photoUrl && + address == otherTyped.address && + billingAddress == otherTyped.billingAddress && + timezone == otherTyped.timezone && + legalName == otherTyped.legalName && + doingBusinessAs == otherTyped.doingBusinessAs && + region == otherTyped.region && + state == otherTyped.state && + city == otherTyped.city && + serviceSpecialty == otherTyped.serviceSpecialty && + approvalStatus == otherTyped.approvalStatus && + isActive == otherTyped.isActive && + markup == otherTyped.markup && + fee == otherTyped.fee && + csat == otherTyped.csat && + tier == otherTyped.tier; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, companyName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode, address.hashCode, billingAddress.hashCode, timezone.hashCode, legalName.hashCode, doingBusinessAs.hashCode, region.hashCode, state.hashCode, city.hashCode, serviceSpecialty.hashCode, approvalStatus.hashCode, isActive.hashCode, markup.hashCode, fee.hashCode, csat.hashCode, tier.hashCode]); + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + json['companyName'] = nativeToJson(companyName); + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(phone.state == OptionalState.set) { + json['phone'] = phone.toJson(); + } + if(photoUrl.state == OptionalState.set) { + json['photoUrl'] = photoUrl.toJson(); + } + if(address.state == OptionalState.set) { + json['address'] = address.toJson(); + } + if(billingAddress.state == OptionalState.set) { + json['billingAddress'] = billingAddress.toJson(); + } + if(timezone.state == OptionalState.set) { + json['timezone'] = timezone.toJson(); + } + if(legalName.state == OptionalState.set) { + json['legalName'] = legalName.toJson(); + } + if(doingBusinessAs.state == OptionalState.set) { + json['doingBusinessAs'] = doingBusinessAs.toJson(); + } + if(region.state == OptionalState.set) { + json['region'] = region.toJson(); + } + if(state.state == OptionalState.set) { + json['state'] = state.toJson(); + } + if(city.state == OptionalState.set) { + json['city'] = city.toJson(); + } + if(serviceSpecialty.state == OptionalState.set) { + json['serviceSpecialty'] = serviceSpecialty.toJson(); + } + if(approvalStatus.state == OptionalState.set) { + json['approvalStatus'] = approvalStatus.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(markup.state == OptionalState.set) { + json['markup'] = markup.toJson(); + } + if(fee.state == OptionalState.set) { + json['fee'] = fee.toJson(); + } + if(csat.state == OptionalState.set) { + json['csat'] = csat.toJson(); + } + if(tier.state == OptionalState.set) { + json['tier'] = tier.toJson(); + } + return json; + } + + CreateVendorVariables({ + required this.userId, + required this.companyName, + required this.email, + required this.phone, + required this.photoUrl, + required this.address, + required this.billingAddress, + required this.timezone, + required this.legalName, + required this.doingBusinessAs, + required this.region, + required this.state, + required this.city, + required this.serviceSpecialty, + required this.approvalStatus, + required this.isActive, + required this.markup, + required this.fee, + required this.csat, + required this.tier, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor_benefit_plan.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor_benefit_plan.dart new file mode 100644 index 00000000..8b3bb46d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor_benefit_plan.dart @@ -0,0 +1,207 @@ +part of 'generated.dart'; + +class CreateVendorBenefitPlanVariablesBuilder { + String vendorId; + String title; + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _requestLabel = Optional.optional(nativeFromJson, nativeToJson); + Optional _total = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _createdBy = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateVendorBenefitPlanVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder requestLabel(String? t) { + _requestLabel.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder total(int? t) { + _total.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateVendorBenefitPlanVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + CreateVendorBenefitPlanVariablesBuilder(this._dataConnect, {required this.vendorId,required this.title,}); + Deserializer dataDeserializer = (dynamic json) => CreateVendorBenefitPlanData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateVendorBenefitPlanVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateVendorBenefitPlanVariables vars= CreateVendorBenefitPlanVariables(vendorId: vendorId,title: title,description: _description,requestLabel: _requestLabel,total: _total,isActive: _isActive,createdBy: _createdBy,); + return _dataConnect.mutation("createVendorBenefitPlan", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateVendorBenefitPlanVendorBenefitPlanInsert { + final String id; + CreateVendorBenefitPlanVendorBenefitPlanInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorBenefitPlanVendorBenefitPlanInsert otherTyped = other as CreateVendorBenefitPlanVendorBenefitPlanInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateVendorBenefitPlanVendorBenefitPlanInsert({ + required this.id, + }); +} + +@immutable +class CreateVendorBenefitPlanData { + final CreateVendorBenefitPlanVendorBenefitPlanInsert vendorBenefitPlan_insert; + CreateVendorBenefitPlanData.fromJson(dynamic json): + + vendorBenefitPlan_insert = CreateVendorBenefitPlanVendorBenefitPlanInsert.fromJson(json['vendorBenefitPlan_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorBenefitPlanData otherTyped = other as CreateVendorBenefitPlanData; + return vendorBenefitPlan_insert == otherTyped.vendorBenefitPlan_insert; + + } + @override + int get hashCode => vendorBenefitPlan_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlan_insert'] = vendorBenefitPlan_insert.toJson(); + return json; + } + + CreateVendorBenefitPlanData({ + required this.vendorBenefitPlan_insert, + }); +} + +@immutable +class CreateVendorBenefitPlanVariables { + final String vendorId; + final String title; + late final Optionaldescription; + late final OptionalrequestLabel; + late final Optionaltotal; + late final OptionalisActive; + late final OptionalcreatedBy; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateVendorBenefitPlanVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']) { + + + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + requestLabel = Optional.optional(nativeFromJson, nativeToJson); + requestLabel.value = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']); + + + total = Optional.optional(nativeFromJson, nativeToJson); + total.value = json['total'] == null ? null : nativeFromJson(json['total']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + createdBy = Optional.optional(nativeFromJson, nativeToJson); + createdBy.value = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorBenefitPlanVariables otherTyped = other as CreateVendorBenefitPlanVariables; + return vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(requestLabel.state == OptionalState.set) { + json['requestLabel'] = requestLabel.toJson(); + } + if(total.state == OptionalState.set) { + json['total'] = total.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(createdBy.state == OptionalState.set) { + json['createdBy'] = createdBy.toJson(); + } + return json; + } + + CreateVendorBenefitPlanVariables({ + required this.vendorId, + required this.title, + required this.description, + required this.requestLabel, + required this.total, + required this.isActive, + required this.createdBy, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor_rate.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor_rate.dart new file mode 100644 index 00000000..52085bbc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_vendor_rate.dart @@ -0,0 +1,245 @@ +part of 'generated.dart'; + +class CreateVendorRateVariablesBuilder { + String vendorId; + Optional _roleName = Optional.optional(nativeFromJson, nativeToJson); + Optional _category = Optional.optional((data) => CategoryType.values.byName(data), enumSerializer); + Optional _clientRate = Optional.optional(nativeFromJson, nativeToJson); + Optional _employeeWage = Optional.optional(nativeFromJson, nativeToJson); + Optional _markupPercentage = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorFeePercentage = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; CreateVendorRateVariablesBuilder roleName(String? t) { + _roleName.value = t; + return this; + } + CreateVendorRateVariablesBuilder category(CategoryType? t) { + _category.value = t; + return this; + } + CreateVendorRateVariablesBuilder clientRate(double? t) { + _clientRate.value = t; + return this; + } + CreateVendorRateVariablesBuilder employeeWage(double? t) { + _employeeWage.value = t; + return this; + } + CreateVendorRateVariablesBuilder markupPercentage(double? t) { + _markupPercentage.value = t; + return this; + } + CreateVendorRateVariablesBuilder vendorFeePercentage(double? t) { + _vendorFeePercentage.value = t; + return this; + } + CreateVendorRateVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + CreateVendorRateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + CreateVendorRateVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => CreateVendorRateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateVendorRateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateVendorRateVariables vars= CreateVendorRateVariables(vendorId: vendorId,roleName: _roleName,category: _category,clientRate: _clientRate,employeeWage: _employeeWage,markupPercentage: _markupPercentage,vendorFeePercentage: _vendorFeePercentage,isActive: _isActive,notes: _notes,); + return _dataConnect.mutation("createVendorRate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateVendorRateVendorRateInsert { + final String id; + CreateVendorRateVendorRateInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorRateVendorRateInsert otherTyped = other as CreateVendorRateVendorRateInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateVendorRateVendorRateInsert({ + required this.id, + }); +} + +@immutable +class CreateVendorRateData { + final CreateVendorRateVendorRateInsert vendorRate_insert; + CreateVendorRateData.fromJson(dynamic json): + + vendorRate_insert = CreateVendorRateVendorRateInsert.fromJson(json['vendorRate_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorRateData otherTyped = other as CreateVendorRateData; + return vendorRate_insert == otherTyped.vendorRate_insert; + + } + @override + int get hashCode => vendorRate_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorRate_insert'] = vendorRate_insert.toJson(); + return json; + } + + CreateVendorRateData({ + required this.vendorRate_insert, + }); +} + +@immutable +class CreateVendorRateVariables { + final String vendorId; + late final OptionalroleName; + late final Optionalcategory; + late final OptionalclientRate; + late final OptionalemployeeWage; + late final OptionalmarkupPercentage; + late final OptionalvendorFeePercentage; + late final OptionalisActive; + late final Optionalnotes; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateVendorRateVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + roleName = Optional.optional(nativeFromJson, nativeToJson); + roleName.value = json['roleName'] == null ? null : nativeFromJson(json['roleName']); + + + category = Optional.optional((data) => CategoryType.values.byName(data), enumSerializer); + category.value = json['category'] == null ? null : CategoryType.values.byName(json['category']); + + + clientRate = Optional.optional(nativeFromJson, nativeToJson); + clientRate.value = json['clientRate'] == null ? null : nativeFromJson(json['clientRate']); + + + employeeWage = Optional.optional(nativeFromJson, nativeToJson); + employeeWage.value = json['employeeWage'] == null ? null : nativeFromJson(json['employeeWage']); + + + markupPercentage = Optional.optional(nativeFromJson, nativeToJson); + markupPercentage.value = json['markupPercentage'] == null ? null : nativeFromJson(json['markupPercentage']); + + + vendorFeePercentage = Optional.optional(nativeFromJson, nativeToJson); + vendorFeePercentage.value = json['vendorFeePercentage'] == null ? null : nativeFromJson(json['vendorFeePercentage']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateVendorRateVariables otherTyped = other as CreateVendorRateVariables; + return vendorId == otherTyped.vendorId && + roleName == otherTyped.roleName && + category == otherTyped.category && + clientRate == otherTyped.clientRate && + employeeWage == otherTyped.employeeWage && + markupPercentage == otherTyped.markupPercentage && + vendorFeePercentage == otherTyped.vendorFeePercentage && + isActive == otherTyped.isActive && + notes == otherTyped.notes; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, roleName.hashCode, category.hashCode, clientRate.hashCode, employeeWage.hashCode, markupPercentage.hashCode, vendorFeePercentage.hashCode, isActive.hashCode, notes.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(roleName.state == OptionalState.set) { + json['roleName'] = roleName.toJson(); + } + if(category.state == OptionalState.set) { + json['category'] = category.toJson(); + } + if(clientRate.state == OptionalState.set) { + json['clientRate'] = clientRate.toJson(); + } + if(employeeWage.state == OptionalState.set) { + json['employeeWage'] = employeeWage.toJson(); + } + if(markupPercentage.state == OptionalState.set) { + json['markupPercentage'] = markupPercentage.toJson(); + } + if(vendorFeePercentage.state == OptionalState.set) { + json['vendorFeePercentage'] = vendorFeePercentage.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + return json; + } + + CreateVendorRateVariables({ + required this.vendorId, + required this.roleName, + required this.category, + required this.clientRate, + required this.employeeWage, + required this.markupPercentage, + required this.vendorFeePercentage, + required this.isActive, + required this.notes, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/create_workforce.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/create_workforce.dart new file mode 100644 index 00000000..b2735b6c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/create_workforce.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class CreateWorkforceVariablesBuilder { + String vendorId; + String staffId; + String workforceNumber; + Optional _employmentType = Optional.optional((data) => WorkforceEmploymentType.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; CreateWorkforceVariablesBuilder employmentType(WorkforceEmploymentType? t) { + _employmentType.value = t; + return this; + } + + CreateWorkforceVariablesBuilder(this._dataConnect, {required this.vendorId,required this.staffId,required this.workforceNumber,}); + Deserializer dataDeserializer = (dynamic json) => CreateWorkforceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (CreateWorkforceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + CreateWorkforceVariables vars= CreateWorkforceVariables(vendorId: vendorId,staffId: staffId,workforceNumber: workforceNumber,employmentType: _employmentType,); + return _dataConnect.mutation("createWorkforce", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class CreateWorkforceWorkforceInsert { + final String id; + CreateWorkforceWorkforceInsert.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateWorkforceWorkforceInsert otherTyped = other as CreateWorkforceWorkforceInsert; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + CreateWorkforceWorkforceInsert({ + required this.id, + }); +} + +@immutable +class CreateWorkforceData { + final CreateWorkforceWorkforceInsert workforce_insert; + CreateWorkforceData.fromJson(dynamic json): + + workforce_insert = CreateWorkforceWorkforceInsert.fromJson(json['workforce_insert']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateWorkforceData otherTyped = other as CreateWorkforceData; + return workforce_insert == otherTyped.workforce_insert; + + } + @override + int get hashCode => workforce_insert.hashCode; + + + Map toJson() { + Map json = {}; + json['workforce_insert'] = workforce_insert.toJson(); + return json; + } + + CreateWorkforceData({ + required this.workforce_insert, + }); +} + +@immutable +class CreateWorkforceVariables { + final String vendorId; + final String staffId; + final String workforceNumber; + late final OptionalemploymentType; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + CreateWorkforceVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + staffId = nativeFromJson(json['staffId']), + workforceNumber = nativeFromJson(json['workforceNumber']) { + + + + + + employmentType = Optional.optional((data) => WorkforceEmploymentType.values.byName(data), enumSerializer); + employmentType.value = json['employmentType'] == null ? null : WorkforceEmploymentType.values.byName(json['employmentType']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final CreateWorkforceVariables otherTyped = other as CreateWorkforceVariables; + return vendorId == otherTyped.vendorId && + staffId == otherTyped.staffId && + workforceNumber == otherTyped.workforceNumber && + employmentType == otherTyped.employmentType; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, staffId.hashCode, workforceNumber.hashCode, employmentType.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['staffId'] = nativeToJson(staffId); + json['workforceNumber'] = nativeToJson(workforceNumber); + if(employmentType.state == OptionalState.set) { + json['employmentType'] = employmentType.toJson(); + } + return json; + } + + CreateWorkforceVariables({ + required this.vendorId, + required this.staffId, + required this.workforceNumber, + required this.employmentType, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/deactivate_workforce.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/deactivate_workforce.dart new file mode 100644 index 00000000..14af2597 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/deactivate_workforce.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeactivateWorkforceVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeactivateWorkforceVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeactivateWorkforceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeactivateWorkforceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeactivateWorkforceVariables vars= DeactivateWorkforceVariables(id: id,); + return _dataConnect.mutation("deactivateWorkforce", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeactivateWorkforceWorkforceUpdate { + final String id; + DeactivateWorkforceWorkforceUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeactivateWorkforceWorkforceUpdate otherTyped = other as DeactivateWorkforceWorkforceUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeactivateWorkforceWorkforceUpdate({ + required this.id, + }); +} + +@immutable +class DeactivateWorkforceData { + final DeactivateWorkforceWorkforceUpdate? workforce_update; + DeactivateWorkforceData.fromJson(dynamic json): + + workforce_update = json['workforce_update'] == null ? null : DeactivateWorkforceWorkforceUpdate.fromJson(json['workforce_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeactivateWorkforceData otherTyped = other as DeactivateWorkforceData; + return workforce_update == otherTyped.workforce_update; + + } + @override + int get hashCode => workforce_update.hashCode; + + + Map toJson() { + Map json = {}; + if (workforce_update != null) { + json['workforce_update'] = workforce_update!.toJson(); + } + return json; + } + + DeactivateWorkforceData({ + this.workforce_update, + }); +} + +@immutable +class DeactivateWorkforceVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeactivateWorkforceVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeactivateWorkforceVariables otherTyped = other as DeactivateWorkforceVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeactivateWorkforceVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_account.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_account.dart new file mode 100644 index 00000000..a152983c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_account.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteAccountVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteAccountVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteAccountData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteAccountVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteAccountVariables vars= DeleteAccountVariables(id: id,); + return _dataConnect.mutation("deleteAccount", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteAccountAccountDelete { + final String id; + DeleteAccountAccountDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAccountAccountDelete otherTyped = other as DeleteAccountAccountDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteAccountAccountDelete({ + required this.id, + }); +} + +@immutable +class DeleteAccountData { + final DeleteAccountAccountDelete? account_delete; + DeleteAccountData.fromJson(dynamic json): + + account_delete = json['account_delete'] == null ? null : DeleteAccountAccountDelete.fromJson(json['account_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAccountData otherTyped = other as DeleteAccountData; + return account_delete == otherTyped.account_delete; + + } + @override + int get hashCode => account_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (account_delete != null) { + json['account_delete'] = account_delete!.toJson(); + } + return json; + } + + DeleteAccountData({ + this.account_delete, + }); +} + +@immutable +class DeleteAccountVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteAccountVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAccountVariables otherTyped = other as DeleteAccountVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteAccountVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_activity_log.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_activity_log.dart new file mode 100644 index 00000000..b0a1c076 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_activity_log.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteActivityLogVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteActivityLogVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteActivityLogData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteActivityLogVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteActivityLogVariables vars= DeleteActivityLogVariables(id: id,); + return _dataConnect.mutation("deleteActivityLog", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteActivityLogActivityLogDelete { + final String id; + DeleteActivityLogActivityLogDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteActivityLogActivityLogDelete otherTyped = other as DeleteActivityLogActivityLogDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteActivityLogActivityLogDelete({ + required this.id, + }); +} + +@immutable +class DeleteActivityLogData { + final DeleteActivityLogActivityLogDelete? activityLog_delete; + DeleteActivityLogData.fromJson(dynamic json): + + activityLog_delete = json['activityLog_delete'] == null ? null : DeleteActivityLogActivityLogDelete.fromJson(json['activityLog_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteActivityLogData otherTyped = other as DeleteActivityLogData; + return activityLog_delete == otherTyped.activityLog_delete; + + } + @override + int get hashCode => activityLog_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (activityLog_delete != null) { + json['activityLog_delete'] = activityLog_delete!.toJson(); + } + return json; + } + + DeleteActivityLogData({ + this.activityLog_delete, + }); +} + +@immutable +class DeleteActivityLogVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteActivityLogVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteActivityLogVariables otherTyped = other as DeleteActivityLogVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteActivityLogVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_application.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_application.dart new file mode 100644 index 00000000..400f440e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_application.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteApplicationVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteApplicationVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteApplicationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteApplicationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteApplicationVariables vars= DeleteApplicationVariables(id: id,); + return _dataConnect.mutation("deleteApplication", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteApplicationApplicationDelete { + final String id; + DeleteApplicationApplicationDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteApplicationApplicationDelete otherTyped = other as DeleteApplicationApplicationDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteApplicationApplicationDelete({ + required this.id, + }); +} + +@immutable +class DeleteApplicationData { + final DeleteApplicationApplicationDelete? application_delete; + DeleteApplicationData.fromJson(dynamic json): + + application_delete = json['application_delete'] == null ? null : DeleteApplicationApplicationDelete.fromJson(json['application_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteApplicationData otherTyped = other as DeleteApplicationData; + return application_delete == otherTyped.application_delete; + + } + @override + int get hashCode => application_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (application_delete != null) { + json['application_delete'] = application_delete!.toJson(); + } + return json; + } + + DeleteApplicationData({ + this.application_delete, + }); +} + +@immutable +class DeleteApplicationVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteApplicationVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteApplicationVariables otherTyped = other as DeleteApplicationVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteApplicationVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_assignment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_assignment.dart new file mode 100644 index 00000000..a9b043d3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_assignment.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteAssignmentVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteAssignmentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteAssignmentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteAssignmentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteAssignmentVariables vars= DeleteAssignmentVariables(id: id,); + return _dataConnect.mutation("DeleteAssignment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteAssignmentAssignmentDelete { + final String id; + DeleteAssignmentAssignmentDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAssignmentAssignmentDelete otherTyped = other as DeleteAssignmentAssignmentDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteAssignmentAssignmentDelete({ + required this.id, + }); +} + +@immutable +class DeleteAssignmentData { + final DeleteAssignmentAssignmentDelete? assignment_delete; + DeleteAssignmentData.fromJson(dynamic json): + + assignment_delete = json['assignment_delete'] == null ? null : DeleteAssignmentAssignmentDelete.fromJson(json['assignment_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAssignmentData otherTyped = other as DeleteAssignmentData; + return assignment_delete == otherTyped.assignment_delete; + + } + @override + int get hashCode => assignment_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (assignment_delete != null) { + json['assignment_delete'] = assignment_delete!.toJson(); + } + return json; + } + + DeleteAssignmentData({ + this.assignment_delete, + }); +} + +@immutable +class DeleteAssignmentVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteAssignmentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAssignmentVariables otherTyped = other as DeleteAssignmentVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteAssignmentVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_attire_option.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_attire_option.dart new file mode 100644 index 00000000..9dd40295 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_attire_option.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteAttireOptionVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteAttireOptionVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteAttireOptionData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteAttireOptionVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteAttireOptionVariables vars= DeleteAttireOptionVariables(id: id,); + return _dataConnect.mutation("deleteAttireOption", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteAttireOptionAttireOptionDelete { + final String id; + DeleteAttireOptionAttireOptionDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAttireOptionAttireOptionDelete otherTyped = other as DeleteAttireOptionAttireOptionDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteAttireOptionAttireOptionDelete({ + required this.id, + }); +} + +@immutable +class DeleteAttireOptionData { + final DeleteAttireOptionAttireOptionDelete? attireOption_delete; + DeleteAttireOptionData.fromJson(dynamic json): + + attireOption_delete = json['attireOption_delete'] == null ? null : DeleteAttireOptionAttireOptionDelete.fromJson(json['attireOption_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAttireOptionData otherTyped = other as DeleteAttireOptionData; + return attireOption_delete == otherTyped.attireOption_delete; + + } + @override + int get hashCode => attireOption_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (attireOption_delete != null) { + json['attireOption_delete'] = attireOption_delete!.toJson(); + } + return json; + } + + DeleteAttireOptionData({ + this.attireOption_delete, + }); +} + +@immutable +class DeleteAttireOptionVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteAttireOptionVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteAttireOptionVariables otherTyped = other as DeleteAttireOptionVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteAttireOptionVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_benefits_data.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_benefits_data.dart new file mode 100644 index 00000000..5c74917d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_benefits_data.dart @@ -0,0 +1,135 @@ +part of 'generated.dart'; + +class DeleteBenefitsDataVariablesBuilder { + String staffId; + String vendorBenefitPlanId; + + final FirebaseDataConnect _dataConnect; + DeleteBenefitsDataVariablesBuilder(this._dataConnect, {required this.staffId,required this.vendorBenefitPlanId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteBenefitsDataData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteBenefitsDataVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteBenefitsDataVariables vars= DeleteBenefitsDataVariables(staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,); + return _dataConnect.mutation("deleteBenefitsData", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteBenefitsDataBenefitsDataDelete { + final String vendorBenefitPlanId; + final String staffId; + DeleteBenefitsDataBenefitsDataDelete.fromJson(dynamic json): + + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteBenefitsDataBenefitsDataDelete otherTyped = other as DeleteBenefitsDataBenefitsDataDelete; + return vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + staffId == otherTyped.staffId; + + } + @override + int get hashCode => Object.hashAll([vendorBenefitPlanId.hashCode, staffId.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['staffId'] = nativeToJson(staffId); + return json; + } + + DeleteBenefitsDataBenefitsDataDelete({ + required this.vendorBenefitPlanId, + required this.staffId, + }); +} + +@immutable +class DeleteBenefitsDataData { + final DeleteBenefitsDataBenefitsDataDelete? benefitsData_delete; + DeleteBenefitsDataData.fromJson(dynamic json): + + benefitsData_delete = json['benefitsData_delete'] == null ? null : DeleteBenefitsDataBenefitsDataDelete.fromJson(json['benefitsData_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteBenefitsDataData otherTyped = other as DeleteBenefitsDataData; + return benefitsData_delete == otherTyped.benefitsData_delete; + + } + @override + int get hashCode => benefitsData_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (benefitsData_delete != null) { + json['benefitsData_delete'] = benefitsData_delete!.toJson(); + } + return json; + } + + DeleteBenefitsDataData({ + this.benefitsData_delete, + }); +} + +@immutable +class DeleteBenefitsDataVariables { + final String staffId; + final String vendorBenefitPlanId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteBenefitsDataVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteBenefitsDataVariables otherTyped = other as DeleteBenefitsDataVariables; + return staffId == otherTyped.staffId && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, vendorBenefitPlanId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + return json; + } + + DeleteBenefitsDataVariables({ + required this.staffId, + required this.vendorBenefitPlanId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_business.dart new file mode 100644 index 00000000..855347c5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_business.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteBusinessVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteBusinessVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteBusinessVariables vars= DeleteBusinessVariables(id: id,); + return _dataConnect.mutation("deleteBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteBusinessBusinessDelete { + final String id; + DeleteBusinessBusinessDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteBusinessBusinessDelete otherTyped = other as DeleteBusinessBusinessDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteBusinessBusinessDelete({ + required this.id, + }); +} + +@immutable +class DeleteBusinessData { + final DeleteBusinessBusinessDelete? business_delete; + DeleteBusinessData.fromJson(dynamic json): + + business_delete = json['business_delete'] == null ? null : DeleteBusinessBusinessDelete.fromJson(json['business_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteBusinessData otherTyped = other as DeleteBusinessData; + return business_delete == otherTyped.business_delete; + + } + @override + int get hashCode => business_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (business_delete != null) { + json['business_delete'] = business_delete!.toJson(); + } + return json; + } + + DeleteBusinessData({ + this.business_delete, + }); +} + +@immutable +class DeleteBusinessVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteBusinessVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteBusinessVariables otherTyped = other as DeleteBusinessVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteBusinessVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_category.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_category.dart new file mode 100644 index 00000000..76ebca82 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_category.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteCategoryVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteCategoryVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteCategoryData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteCategoryVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteCategoryVariables vars= DeleteCategoryVariables(id: id,); + return _dataConnect.mutation("deleteCategory", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteCategoryCategoryDelete { + final String id; + DeleteCategoryCategoryDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCategoryCategoryDelete otherTyped = other as DeleteCategoryCategoryDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCategoryCategoryDelete({ + required this.id, + }); +} + +@immutable +class DeleteCategoryData { + final DeleteCategoryCategoryDelete? category_delete; + DeleteCategoryData.fromJson(dynamic json): + + category_delete = json['category_delete'] == null ? null : DeleteCategoryCategoryDelete.fromJson(json['category_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCategoryData otherTyped = other as DeleteCategoryData; + return category_delete == otherTyped.category_delete; + + } + @override + int get hashCode => category_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (category_delete != null) { + json['category_delete'] = category_delete!.toJson(); + } + return json; + } + + DeleteCategoryData({ + this.category_delete, + }); +} + +@immutable +class DeleteCategoryVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteCategoryVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCategoryVariables otherTyped = other as DeleteCategoryVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCategoryVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_certificate.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_certificate.dart new file mode 100644 index 00000000..b86d4e41 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_certificate.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteCertificateVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteCertificateVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteCertificateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteCertificateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteCertificateVariables vars= DeleteCertificateVariables(id: id,); + return _dataConnect.mutation("DeleteCertificate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteCertificateCertificateDelete { + final String id; + DeleteCertificateCertificateDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCertificateCertificateDelete otherTyped = other as DeleteCertificateCertificateDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCertificateCertificateDelete({ + required this.id, + }); +} + +@immutable +class DeleteCertificateData { + final DeleteCertificateCertificateDelete? certificate_delete; + DeleteCertificateData.fromJson(dynamic json): + + certificate_delete = json['certificate_delete'] == null ? null : DeleteCertificateCertificateDelete.fromJson(json['certificate_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCertificateData otherTyped = other as DeleteCertificateData; + return certificate_delete == otherTyped.certificate_delete; + + } + @override + int get hashCode => certificate_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (certificate_delete != null) { + json['certificate_delete'] = certificate_delete!.toJson(); + } + return json; + } + + DeleteCertificateData({ + this.certificate_delete, + }); +} + +@immutable +class DeleteCertificateVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteCertificateVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCertificateVariables otherTyped = other as DeleteCertificateVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCertificateVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_client_feedback.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_client_feedback.dart new file mode 100644 index 00000000..63d7f3cd --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_client_feedback.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteClientFeedbackVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteClientFeedbackVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteClientFeedbackData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteClientFeedbackVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteClientFeedbackVariables vars= DeleteClientFeedbackVariables(id: id,); + return _dataConnect.mutation("deleteClientFeedback", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteClientFeedbackClientFeedbackDelete { + final String id; + DeleteClientFeedbackClientFeedbackDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteClientFeedbackClientFeedbackDelete otherTyped = other as DeleteClientFeedbackClientFeedbackDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteClientFeedbackClientFeedbackDelete({ + required this.id, + }); +} + +@immutable +class DeleteClientFeedbackData { + final DeleteClientFeedbackClientFeedbackDelete? clientFeedback_delete; + DeleteClientFeedbackData.fromJson(dynamic json): + + clientFeedback_delete = json['clientFeedback_delete'] == null ? null : DeleteClientFeedbackClientFeedbackDelete.fromJson(json['clientFeedback_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteClientFeedbackData otherTyped = other as DeleteClientFeedbackData; + return clientFeedback_delete == otherTyped.clientFeedback_delete; + + } + @override + int get hashCode => clientFeedback_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (clientFeedback_delete != null) { + json['clientFeedback_delete'] = clientFeedback_delete!.toJson(); + } + return json; + } + + DeleteClientFeedbackData({ + this.clientFeedback_delete, + }); +} + +@immutable +class DeleteClientFeedbackVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteClientFeedbackVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteClientFeedbackVariables otherTyped = other as DeleteClientFeedbackVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteClientFeedbackVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_conversation.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_conversation.dart new file mode 100644 index 00000000..12302153 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_conversation.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteConversationVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteConversationVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteConversationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteConversationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteConversationVariables vars= DeleteConversationVariables(id: id,); + return _dataConnect.mutation("deleteConversation", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteConversationConversationDelete { + final String id; + DeleteConversationConversationDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteConversationConversationDelete otherTyped = other as DeleteConversationConversationDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteConversationConversationDelete({ + required this.id, + }); +} + +@immutable +class DeleteConversationData { + final DeleteConversationConversationDelete? conversation_delete; + DeleteConversationData.fromJson(dynamic json): + + conversation_delete = json['conversation_delete'] == null ? null : DeleteConversationConversationDelete.fromJson(json['conversation_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteConversationData otherTyped = other as DeleteConversationData; + return conversation_delete == otherTyped.conversation_delete; + + } + @override + int get hashCode => conversation_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (conversation_delete != null) { + json['conversation_delete'] = conversation_delete!.toJson(); + } + return json; + } + + DeleteConversationData({ + this.conversation_delete, + }); +} + +@immutable +class DeleteConversationVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteConversationVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteConversationVariables otherTyped = other as DeleteConversationVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteConversationVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_course.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_course.dart new file mode 100644 index 00000000..0be7dd56 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_course.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteCourseVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteCourseVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteCourseData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteCourseVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteCourseVariables vars= DeleteCourseVariables(id: id,); + return _dataConnect.mutation("deleteCourse", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteCourseCourseDelete { + final String id; + DeleteCourseCourseDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCourseCourseDelete otherTyped = other as DeleteCourseCourseDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCourseCourseDelete({ + required this.id, + }); +} + +@immutable +class DeleteCourseData { + final DeleteCourseCourseDelete? course_delete; + DeleteCourseData.fromJson(dynamic json): + + course_delete = json['course_delete'] == null ? null : DeleteCourseCourseDelete.fromJson(json['course_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCourseData otherTyped = other as DeleteCourseData; + return course_delete == otherTyped.course_delete; + + } + @override + int get hashCode => course_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (course_delete != null) { + json['course_delete'] = course_delete!.toJson(); + } + return json; + } + + DeleteCourseData({ + this.course_delete, + }); +} + +@immutable +class DeleteCourseVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteCourseVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCourseVariables otherTyped = other as DeleteCourseVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCourseVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_custom_rate_card.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_custom_rate_card.dart new file mode 100644 index 00000000..04be409f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_custom_rate_card.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteCustomRateCardVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteCustomRateCardVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteCustomRateCardData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteCustomRateCardVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteCustomRateCardVariables vars= DeleteCustomRateCardVariables(id: id,); + return _dataConnect.mutation("deleteCustomRateCard", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteCustomRateCardCustomRateCardDelete { + final String id; + DeleteCustomRateCardCustomRateCardDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCustomRateCardCustomRateCardDelete otherTyped = other as DeleteCustomRateCardCustomRateCardDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCustomRateCardCustomRateCardDelete({ + required this.id, + }); +} + +@immutable +class DeleteCustomRateCardData { + final DeleteCustomRateCardCustomRateCardDelete? customRateCard_delete; + DeleteCustomRateCardData.fromJson(dynamic json): + + customRateCard_delete = json['customRateCard_delete'] == null ? null : DeleteCustomRateCardCustomRateCardDelete.fromJson(json['customRateCard_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCustomRateCardData otherTyped = other as DeleteCustomRateCardData; + return customRateCard_delete == otherTyped.customRateCard_delete; + + } + @override + int get hashCode => customRateCard_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (customRateCard_delete != null) { + json['customRateCard_delete'] = customRateCard_delete!.toJson(); + } + return json; + } + + DeleteCustomRateCardData({ + this.customRateCard_delete, + }); +} + +@immutable +class DeleteCustomRateCardVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteCustomRateCardVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteCustomRateCardVariables otherTyped = other as DeleteCustomRateCardVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteCustomRateCardVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_document.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_document.dart new file mode 100644 index 00000000..087ef853 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_document.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteDocumentVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteDocumentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteDocumentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteDocumentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteDocumentVariables vars= DeleteDocumentVariables(id: id,); + return _dataConnect.mutation("deleteDocument", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteDocumentDocumentDelete { + final String id; + DeleteDocumentDocumentDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteDocumentDocumentDelete otherTyped = other as DeleteDocumentDocumentDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteDocumentDocumentDelete({ + required this.id, + }); +} + +@immutable +class DeleteDocumentData { + final DeleteDocumentDocumentDelete? document_delete; + DeleteDocumentData.fromJson(dynamic json): + + document_delete = json['document_delete'] == null ? null : DeleteDocumentDocumentDelete.fromJson(json['document_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteDocumentData otherTyped = other as DeleteDocumentData; + return document_delete == otherTyped.document_delete; + + } + @override + int get hashCode => document_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (document_delete != null) { + json['document_delete'] = document_delete!.toJson(); + } + return json; + } + + DeleteDocumentData({ + this.document_delete, + }); +} + +@immutable +class DeleteDocumentVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteDocumentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteDocumentVariables otherTyped = other as DeleteDocumentVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteDocumentVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_emergency_contact.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_emergency_contact.dart new file mode 100644 index 00000000..c663f30d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_emergency_contact.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteEmergencyContactVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteEmergencyContactVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteEmergencyContactData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteEmergencyContactVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteEmergencyContactVariables vars= DeleteEmergencyContactVariables(id: id,); + return _dataConnect.mutation("deleteEmergencyContact", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteEmergencyContactEmergencyContactDelete { + final String id; + DeleteEmergencyContactEmergencyContactDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteEmergencyContactEmergencyContactDelete otherTyped = other as DeleteEmergencyContactEmergencyContactDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteEmergencyContactEmergencyContactDelete({ + required this.id, + }); +} + +@immutable +class DeleteEmergencyContactData { + final DeleteEmergencyContactEmergencyContactDelete? emergencyContact_delete; + DeleteEmergencyContactData.fromJson(dynamic json): + + emergencyContact_delete = json['emergencyContact_delete'] == null ? null : DeleteEmergencyContactEmergencyContactDelete.fromJson(json['emergencyContact_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteEmergencyContactData otherTyped = other as DeleteEmergencyContactData; + return emergencyContact_delete == otherTyped.emergencyContact_delete; + + } + @override + int get hashCode => emergencyContact_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (emergencyContact_delete != null) { + json['emergencyContact_delete'] = emergencyContact_delete!.toJson(); + } + return json; + } + + DeleteEmergencyContactData({ + this.emergencyContact_delete, + }); +} + +@immutable +class DeleteEmergencyContactVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteEmergencyContactVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteEmergencyContactVariables otherTyped = other as DeleteEmergencyContactVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteEmergencyContactVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_faq_data.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_faq_data.dart new file mode 100644 index 00000000..d6889570 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_faq_data.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteFaqDataVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteFaqDataVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteFaqDataData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteFaqDataVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteFaqDataVariables vars= DeleteFaqDataVariables(id: id,); + return _dataConnect.mutation("deleteFaqData", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteFaqDataFaqDataDelete { + final String id; + DeleteFaqDataFaqDataDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteFaqDataFaqDataDelete otherTyped = other as DeleteFaqDataFaqDataDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteFaqDataFaqDataDelete({ + required this.id, + }); +} + +@immutable +class DeleteFaqDataData { + final DeleteFaqDataFaqDataDelete? faqData_delete; + DeleteFaqDataData.fromJson(dynamic json): + + faqData_delete = json['faqData_delete'] == null ? null : DeleteFaqDataFaqDataDelete.fromJson(json['faqData_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteFaqDataData otherTyped = other as DeleteFaqDataData; + return faqData_delete == otherTyped.faqData_delete; + + } + @override + int get hashCode => faqData_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (faqData_delete != null) { + json['faqData_delete'] = faqData_delete!.toJson(); + } + return json; + } + + DeleteFaqDataData({ + this.faqData_delete, + }); +} + +@immutable +class DeleteFaqDataVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteFaqDataVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteFaqDataVariables otherTyped = other as DeleteFaqDataVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteFaqDataVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_hub.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_hub.dart new file mode 100644 index 00000000..fc85f8b8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_hub.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteHubVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteHubVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteHubData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteHubVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteHubVariables vars= DeleteHubVariables(id: id,); + return _dataConnect.mutation("deleteHub", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteHubHubDelete { + final String id; + DeleteHubHubDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteHubHubDelete otherTyped = other as DeleteHubHubDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteHubHubDelete({ + required this.id, + }); +} + +@immutable +class DeleteHubData { + final DeleteHubHubDelete? hub_delete; + DeleteHubData.fromJson(dynamic json): + + hub_delete = json['hub_delete'] == null ? null : DeleteHubHubDelete.fromJson(json['hub_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteHubData otherTyped = other as DeleteHubData; + return hub_delete == otherTyped.hub_delete; + + } + @override + int get hashCode => hub_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (hub_delete != null) { + json['hub_delete'] = hub_delete!.toJson(); + } + return json; + } + + DeleteHubData({ + this.hub_delete, + }); +} + +@immutable +class DeleteHubVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteHubVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteHubVariables otherTyped = other as DeleteHubVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteHubVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_invoice.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_invoice.dart new file mode 100644 index 00000000..515f4bfb --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_invoice.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteInvoiceVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteInvoiceVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteInvoiceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteInvoiceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteInvoiceVariables vars= DeleteInvoiceVariables(id: id,); + return _dataConnect.mutation("deleteInvoice", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteInvoiceInvoiceDelete { + final String id; + DeleteInvoiceInvoiceDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteInvoiceInvoiceDelete otherTyped = other as DeleteInvoiceInvoiceDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteInvoiceInvoiceDelete({ + required this.id, + }); +} + +@immutable +class DeleteInvoiceData { + final DeleteInvoiceInvoiceDelete? invoice_delete; + DeleteInvoiceData.fromJson(dynamic json): + + invoice_delete = json['invoice_delete'] == null ? null : DeleteInvoiceInvoiceDelete.fromJson(json['invoice_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteInvoiceData otherTyped = other as DeleteInvoiceData; + return invoice_delete == otherTyped.invoice_delete; + + } + @override + int get hashCode => invoice_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (invoice_delete != null) { + json['invoice_delete'] = invoice_delete!.toJson(); + } + return json; + } + + DeleteInvoiceData({ + this.invoice_delete, + }); +} + +@immutable +class DeleteInvoiceVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteInvoiceVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteInvoiceVariables otherTyped = other as DeleteInvoiceVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteInvoiceVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_invoice_template.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_invoice_template.dart new file mode 100644 index 00000000..2239ee3a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_invoice_template.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteInvoiceTemplateVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteInvoiceTemplateVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteInvoiceTemplateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteInvoiceTemplateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteInvoiceTemplateVariables vars= DeleteInvoiceTemplateVariables(id: id,); + return _dataConnect.mutation("deleteInvoiceTemplate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteInvoiceTemplateInvoiceTemplateDelete { + final String id; + DeleteInvoiceTemplateInvoiceTemplateDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteInvoiceTemplateInvoiceTemplateDelete otherTyped = other as DeleteInvoiceTemplateInvoiceTemplateDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteInvoiceTemplateInvoiceTemplateDelete({ + required this.id, + }); +} + +@immutable +class DeleteInvoiceTemplateData { + final DeleteInvoiceTemplateInvoiceTemplateDelete? invoiceTemplate_delete; + DeleteInvoiceTemplateData.fromJson(dynamic json): + + invoiceTemplate_delete = json['invoiceTemplate_delete'] == null ? null : DeleteInvoiceTemplateInvoiceTemplateDelete.fromJson(json['invoiceTemplate_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteInvoiceTemplateData otherTyped = other as DeleteInvoiceTemplateData; + return invoiceTemplate_delete == otherTyped.invoiceTemplate_delete; + + } + @override + int get hashCode => invoiceTemplate_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (invoiceTemplate_delete != null) { + json['invoiceTemplate_delete'] = invoiceTemplate_delete!.toJson(); + } + return json; + } + + DeleteInvoiceTemplateData({ + this.invoiceTemplate_delete, + }); +} + +@immutable +class DeleteInvoiceTemplateVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteInvoiceTemplateVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteInvoiceTemplateVariables otherTyped = other as DeleteInvoiceTemplateVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteInvoiceTemplateVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_level.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_level.dart new file mode 100644 index 00000000..9f06598c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_level.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteLevelVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteLevelVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteLevelData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteLevelVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteLevelVariables vars= DeleteLevelVariables(id: id,); + return _dataConnect.mutation("deleteLevel", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteLevelLevelDelete { + final String id; + DeleteLevelLevelDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteLevelLevelDelete otherTyped = other as DeleteLevelLevelDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteLevelLevelDelete({ + required this.id, + }); +} + +@immutable +class DeleteLevelData { + final DeleteLevelLevelDelete? level_delete; + DeleteLevelData.fromJson(dynamic json): + + level_delete = json['level_delete'] == null ? null : DeleteLevelLevelDelete.fromJson(json['level_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteLevelData otherTyped = other as DeleteLevelData; + return level_delete == otherTyped.level_delete; + + } + @override + int get hashCode => level_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (level_delete != null) { + json['level_delete'] = level_delete!.toJson(); + } + return json; + } + + DeleteLevelData({ + this.level_delete, + }); +} + +@immutable +class DeleteLevelVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteLevelVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteLevelVariables otherTyped = other as DeleteLevelVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteLevelVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_member_task.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_member_task.dart new file mode 100644 index 00000000..addc7c94 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_member_task.dart @@ -0,0 +1,135 @@ +part of 'generated.dart'; + +class DeleteMemberTaskVariablesBuilder { + String teamMemberId; + String taskId; + + final FirebaseDataConnect _dataConnect; + DeleteMemberTaskVariablesBuilder(this._dataConnect, {required this.teamMemberId,required this.taskId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteMemberTaskData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteMemberTaskVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteMemberTaskVariables vars= DeleteMemberTaskVariables(teamMemberId: teamMemberId,taskId: taskId,); + return _dataConnect.mutation("deleteMemberTask", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteMemberTaskMemberTaskDelete { + final String teamMemberId; + final String taskId; + DeleteMemberTaskMemberTaskDelete.fromJson(dynamic json): + + teamMemberId = nativeFromJson(json['teamMemberId']), + taskId = nativeFromJson(json['taskId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteMemberTaskMemberTaskDelete otherTyped = other as DeleteMemberTaskMemberTaskDelete; + return teamMemberId == otherTyped.teamMemberId && + taskId == otherTyped.taskId; + + } + @override + int get hashCode => Object.hashAll([teamMemberId.hashCode, taskId.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamMemberId'] = nativeToJson(teamMemberId); + json['taskId'] = nativeToJson(taskId); + return json; + } + + DeleteMemberTaskMemberTaskDelete({ + required this.teamMemberId, + required this.taskId, + }); +} + +@immutable +class DeleteMemberTaskData { + final DeleteMemberTaskMemberTaskDelete? memberTask_delete; + DeleteMemberTaskData.fromJson(dynamic json): + + memberTask_delete = json['memberTask_delete'] == null ? null : DeleteMemberTaskMemberTaskDelete.fromJson(json['memberTask_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteMemberTaskData otherTyped = other as DeleteMemberTaskData; + return memberTask_delete == otherTyped.memberTask_delete; + + } + @override + int get hashCode => memberTask_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (memberTask_delete != null) { + json['memberTask_delete'] = memberTask_delete!.toJson(); + } + return json; + } + + DeleteMemberTaskData({ + this.memberTask_delete, + }); +} + +@immutable +class DeleteMemberTaskVariables { + final String teamMemberId; + final String taskId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteMemberTaskVariables.fromJson(Map json): + + teamMemberId = nativeFromJson(json['teamMemberId']), + taskId = nativeFromJson(json['taskId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteMemberTaskVariables otherTyped = other as DeleteMemberTaskVariables; + return teamMemberId == otherTyped.teamMemberId && + taskId == otherTyped.taskId; + + } + @override + int get hashCode => Object.hashAll([teamMemberId.hashCode, taskId.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamMemberId'] = nativeToJson(teamMemberId); + json['taskId'] = nativeToJson(taskId); + return json; + } + + DeleteMemberTaskVariables({ + required this.teamMemberId, + required this.taskId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_message.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_message.dart new file mode 100644 index 00000000..f1b1921a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_message.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteMessageVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteMessageVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteMessageData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteMessageVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteMessageVariables vars= DeleteMessageVariables(id: id,); + return _dataConnect.mutation("deleteMessage", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteMessageMessageDelete { + final String id; + DeleteMessageMessageDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteMessageMessageDelete otherTyped = other as DeleteMessageMessageDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteMessageMessageDelete({ + required this.id, + }); +} + +@immutable +class DeleteMessageData { + final DeleteMessageMessageDelete? message_delete; + DeleteMessageData.fromJson(dynamic json): + + message_delete = json['message_delete'] == null ? null : DeleteMessageMessageDelete.fromJson(json['message_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteMessageData otherTyped = other as DeleteMessageData; + return message_delete == otherTyped.message_delete; + + } + @override + int get hashCode => message_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (message_delete != null) { + json['message_delete'] = message_delete!.toJson(); + } + return json; + } + + DeleteMessageData({ + this.message_delete, + }); +} + +@immutable +class DeleteMessageVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteMessageVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteMessageVariables otherTyped = other as DeleteMessageVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteMessageVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_order.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_order.dart new file mode 100644 index 00000000..f722da3d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_order.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteOrderVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteOrderVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteOrderData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteOrderVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteOrderVariables vars= DeleteOrderVariables(id: id,); + return _dataConnect.mutation("deleteOrder", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteOrderOrderDelete { + final String id; + DeleteOrderOrderDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteOrderOrderDelete otherTyped = other as DeleteOrderOrderDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteOrderOrderDelete({ + required this.id, + }); +} + +@immutable +class DeleteOrderData { + final DeleteOrderOrderDelete? order_delete; + DeleteOrderData.fromJson(dynamic json): + + order_delete = json['order_delete'] == null ? null : DeleteOrderOrderDelete.fromJson(json['order_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteOrderData otherTyped = other as DeleteOrderData; + return order_delete == otherTyped.order_delete; + + } + @override + int get hashCode => order_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (order_delete != null) { + json['order_delete'] = order_delete!.toJson(); + } + return json; + } + + DeleteOrderData({ + this.order_delete, + }); +} + +@immutable +class DeleteOrderVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteOrderVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteOrderVariables otherTyped = other as DeleteOrderVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteOrderVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_recent_payment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_recent_payment.dart new file mode 100644 index 00000000..a4ff5b61 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_recent_payment.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteRecentPaymentVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteRecentPaymentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteRecentPaymentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteRecentPaymentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteRecentPaymentVariables vars= DeleteRecentPaymentVariables(id: id,); + return _dataConnect.mutation("deleteRecentPayment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteRecentPaymentRecentPaymentDelete { + final String id; + DeleteRecentPaymentRecentPaymentDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRecentPaymentRecentPaymentDelete otherTyped = other as DeleteRecentPaymentRecentPaymentDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteRecentPaymentRecentPaymentDelete({ + required this.id, + }); +} + +@immutable +class DeleteRecentPaymentData { + final DeleteRecentPaymentRecentPaymentDelete? recentPayment_delete; + DeleteRecentPaymentData.fromJson(dynamic json): + + recentPayment_delete = json['recentPayment_delete'] == null ? null : DeleteRecentPaymentRecentPaymentDelete.fromJson(json['recentPayment_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRecentPaymentData otherTyped = other as DeleteRecentPaymentData; + return recentPayment_delete == otherTyped.recentPayment_delete; + + } + @override + int get hashCode => recentPayment_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (recentPayment_delete != null) { + json['recentPayment_delete'] = recentPayment_delete!.toJson(); + } + return json; + } + + DeleteRecentPaymentData({ + this.recentPayment_delete, + }); +} + +@immutable +class DeleteRecentPaymentVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteRecentPaymentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRecentPaymentVariables otherTyped = other as DeleteRecentPaymentVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteRecentPaymentVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_role.dart new file mode 100644 index 00000000..50fdecf0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_role.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteRoleVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteRoleVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteRoleVariables vars= DeleteRoleVariables(id: id,); + return _dataConnect.mutation("deleteRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteRoleRoleDelete { + final String id; + DeleteRoleRoleDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRoleRoleDelete otherTyped = other as DeleteRoleRoleDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteRoleRoleDelete({ + required this.id, + }); +} + +@immutable +class DeleteRoleData { + final DeleteRoleRoleDelete? role_delete; + DeleteRoleData.fromJson(dynamic json): + + role_delete = json['role_delete'] == null ? null : DeleteRoleRoleDelete.fromJson(json['role_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRoleData otherTyped = other as DeleteRoleData; + return role_delete == otherTyped.role_delete; + + } + @override + int get hashCode => role_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (role_delete != null) { + json['role_delete'] = role_delete!.toJson(); + } + return json; + } + + DeleteRoleData({ + this.role_delete, + }); +} + +@immutable +class DeleteRoleVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteRoleVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRoleVariables otherTyped = other as DeleteRoleVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteRoleVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_role_category.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_role_category.dart new file mode 100644 index 00000000..2e9e3a05 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_role_category.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteRoleCategoryVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteRoleCategoryVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteRoleCategoryData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteRoleCategoryVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteRoleCategoryVariables vars= DeleteRoleCategoryVariables(id: id,); + return _dataConnect.mutation("deleteRoleCategory", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteRoleCategoryRoleCategoryDelete { + final String id; + DeleteRoleCategoryRoleCategoryDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRoleCategoryRoleCategoryDelete otherTyped = other as DeleteRoleCategoryRoleCategoryDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteRoleCategoryRoleCategoryDelete({ + required this.id, + }); +} + +@immutable +class DeleteRoleCategoryData { + final DeleteRoleCategoryRoleCategoryDelete? roleCategory_delete; + DeleteRoleCategoryData.fromJson(dynamic json): + + roleCategory_delete = json['roleCategory_delete'] == null ? null : DeleteRoleCategoryRoleCategoryDelete.fromJson(json['roleCategory_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRoleCategoryData otherTyped = other as DeleteRoleCategoryData; + return roleCategory_delete == otherTyped.roleCategory_delete; + + } + @override + int get hashCode => roleCategory_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (roleCategory_delete != null) { + json['roleCategory_delete'] = roleCategory_delete!.toJson(); + } + return json; + } + + DeleteRoleCategoryData({ + this.roleCategory_delete, + }); +} + +@immutable +class DeleteRoleCategoryVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteRoleCategoryVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteRoleCategoryVariables otherTyped = other as DeleteRoleCategoryVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteRoleCategoryVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_shift.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_shift.dart new file mode 100644 index 00000000..1f224bd1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_shift.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteShiftVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteShiftVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteShiftData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteShiftVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteShiftVariables vars= DeleteShiftVariables(id: id,); + return _dataConnect.mutation("deleteShift", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteShiftShiftDelete { + final String id; + DeleteShiftShiftDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteShiftShiftDelete otherTyped = other as DeleteShiftShiftDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteShiftShiftDelete({ + required this.id, + }); +} + +@immutable +class DeleteShiftData { + final DeleteShiftShiftDelete? shift_delete; + DeleteShiftData.fromJson(dynamic json): + + shift_delete = json['shift_delete'] == null ? null : DeleteShiftShiftDelete.fromJson(json['shift_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteShiftData otherTyped = other as DeleteShiftData; + return shift_delete == otherTyped.shift_delete; + + } + @override + int get hashCode => shift_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (shift_delete != null) { + json['shift_delete'] = shift_delete!.toJson(); + } + return json; + } + + DeleteShiftData({ + this.shift_delete, + }); +} + +@immutable +class DeleteShiftVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteShiftVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteShiftVariables otherTyped = other as DeleteShiftVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteShiftVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_shift_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_shift_role.dart new file mode 100644 index 00000000..db0debf6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_shift_role.dart @@ -0,0 +1,135 @@ +part of 'generated.dart'; + +class DeleteShiftRoleVariablesBuilder { + String shiftId; + String roleId; + + final FirebaseDataConnect _dataConnect; + DeleteShiftRoleVariablesBuilder(this._dataConnect, {required this.shiftId,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteShiftRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteShiftRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteShiftRoleVariables vars= DeleteShiftRoleVariables(shiftId: shiftId,roleId: roleId,); + return _dataConnect.mutation("deleteShiftRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteShiftRoleShiftRoleDelete { + final String shiftId; + final String roleId; + DeleteShiftRoleShiftRoleDelete.fromJson(dynamic json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteShiftRoleShiftRoleDelete otherTyped = other as DeleteShiftRoleShiftRoleDelete; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + DeleteShiftRoleShiftRoleDelete({ + required this.shiftId, + required this.roleId, + }); +} + +@immutable +class DeleteShiftRoleData { + final DeleteShiftRoleShiftRoleDelete? shiftRole_delete; + DeleteShiftRoleData.fromJson(dynamic json): + + shiftRole_delete = json['shiftRole_delete'] == null ? null : DeleteShiftRoleShiftRoleDelete.fromJson(json['shiftRole_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteShiftRoleData otherTyped = other as DeleteShiftRoleData; + return shiftRole_delete == otherTyped.shiftRole_delete; + + } + @override + int get hashCode => shiftRole_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (shiftRole_delete != null) { + json['shiftRole_delete'] = shiftRole_delete!.toJson(); + } + return json; + } + + DeleteShiftRoleData({ + this.shiftRole_delete, + }); +} + +@immutable +class DeleteShiftRoleVariables { + final String shiftId; + final String roleId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteShiftRoleVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteShiftRoleVariables otherTyped = other as DeleteShiftRoleVariables; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + DeleteShiftRoleVariables({ + required this.shiftId, + required this.roleId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff.dart new file mode 100644 index 00000000..dd23b035 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteStaffVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteStaffVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteStaffData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteStaffVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteStaffVariables vars= DeleteStaffVariables(id: id,); + return _dataConnect.mutation("DeleteStaff", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteStaffStaffDelete { + final String id; + DeleteStaffStaffDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffStaffDelete otherTyped = other as DeleteStaffStaffDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteStaffStaffDelete({ + required this.id, + }); +} + +@immutable +class DeleteStaffData { + final DeleteStaffStaffDelete? staff_delete; + DeleteStaffData.fromJson(dynamic json): + + staff_delete = json['staff_delete'] == null ? null : DeleteStaffStaffDelete.fromJson(json['staff_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffData otherTyped = other as DeleteStaffData; + return staff_delete == otherTyped.staff_delete; + + } + @override + int get hashCode => staff_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (staff_delete != null) { + json['staff_delete'] = staff_delete!.toJson(); + } + return json; + } + + DeleteStaffData({ + this.staff_delete, + }); +} + +@immutable +class DeleteStaffVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteStaffVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffVariables otherTyped = other as DeleteStaffVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteStaffVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_availability.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_availability.dart new file mode 100644 index 00000000..1f6e4bd4 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_availability.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class DeleteStaffAvailabilityVariablesBuilder { + String staffId; + DayOfWeek day; + AvailabilitySlot slot; + + final FirebaseDataConnect _dataConnect; + DeleteStaffAvailabilityVariablesBuilder(this._dataConnect, {required this.staffId,required this.day,required this.slot,}); + Deserializer dataDeserializer = (dynamic json) => DeleteStaffAvailabilityData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteStaffAvailabilityVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteStaffAvailabilityVariables vars= DeleteStaffAvailabilityVariables(staffId: staffId,day: day,slot: slot,); + return _dataConnect.mutation("deleteStaffAvailability", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteStaffAvailabilityStaffAvailabilityDelete { + final String staffId; + final EnumValue day; + final EnumValue slot; + DeleteStaffAvailabilityStaffAvailabilityDelete.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + day = dayOfWeekDeserializer(json['day']), + slot = availabilitySlotDeserializer(json['slot']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffAvailabilityStaffAvailabilityDelete otherTyped = other as DeleteStaffAvailabilityStaffAvailabilityDelete; + return staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, day.hashCode, slot.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['day'] = + dayOfWeekSerializer(day) + ; + json['slot'] = + availabilitySlotSerializer(slot) + ; + return json; + } + + DeleteStaffAvailabilityStaffAvailabilityDelete({ + required this.staffId, + required this.day, + required this.slot, + }); +} + +@immutable +class DeleteStaffAvailabilityData { + final DeleteStaffAvailabilityStaffAvailabilityDelete? staffAvailability_delete; + DeleteStaffAvailabilityData.fromJson(dynamic json): + + staffAvailability_delete = json['staffAvailability_delete'] == null ? null : DeleteStaffAvailabilityStaffAvailabilityDelete.fromJson(json['staffAvailability_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffAvailabilityData otherTyped = other as DeleteStaffAvailabilityData; + return staffAvailability_delete == otherTyped.staffAvailability_delete; + + } + @override + int get hashCode => staffAvailability_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (staffAvailability_delete != null) { + json['staffAvailability_delete'] = staffAvailability_delete!.toJson(); + } + return json; + } + + DeleteStaffAvailabilityData({ + this.staffAvailability_delete, + }); +} + +@immutable +class DeleteStaffAvailabilityVariables { + final String staffId; + final DayOfWeek day; + final AvailabilitySlot slot; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteStaffAvailabilityVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + day = DayOfWeek.values.byName(json['day']), + slot = AvailabilitySlot.values.byName(json['slot']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffAvailabilityVariables otherTyped = other as DeleteStaffAvailabilityVariables; + return staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, day.hashCode, slot.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['day'] = + day.name + ; + json['slot'] = + slot.name + ; + return json; + } + + DeleteStaffAvailabilityVariables({ + required this.staffId, + required this.day, + required this.slot, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_availability_stats.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_availability_stats.dart new file mode 100644 index 00000000..07670c1b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_availability_stats.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteStaffAvailabilityStatsVariablesBuilder { + String staffId; + + final FirebaseDataConnect _dataConnect; + DeleteStaffAvailabilityStatsVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteStaffAvailabilityStatsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteStaffAvailabilityStatsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteStaffAvailabilityStatsVariables vars= DeleteStaffAvailabilityStatsVariables(staffId: staffId,); + return _dataConnect.mutation("deleteStaffAvailabilityStats", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteStaffAvailabilityStatsStaffAvailabilityStatsDelete { + final String staffId; + DeleteStaffAvailabilityStatsStaffAvailabilityStatsDelete.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffAvailabilityStatsStaffAvailabilityStatsDelete otherTyped = other as DeleteStaffAvailabilityStatsStaffAvailabilityStatsDelete; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + DeleteStaffAvailabilityStatsStaffAvailabilityStatsDelete({ + required this.staffId, + }); +} + +@immutable +class DeleteStaffAvailabilityStatsData { + final DeleteStaffAvailabilityStatsStaffAvailabilityStatsDelete? staffAvailabilityStats_delete; + DeleteStaffAvailabilityStatsData.fromJson(dynamic json): + + staffAvailabilityStats_delete = json['staffAvailabilityStats_delete'] == null ? null : DeleteStaffAvailabilityStatsStaffAvailabilityStatsDelete.fromJson(json['staffAvailabilityStats_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffAvailabilityStatsData otherTyped = other as DeleteStaffAvailabilityStatsData; + return staffAvailabilityStats_delete == otherTyped.staffAvailabilityStats_delete; + + } + @override + int get hashCode => staffAvailabilityStats_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (staffAvailabilityStats_delete != null) { + json['staffAvailabilityStats_delete'] = staffAvailabilityStats_delete!.toJson(); + } + return json; + } + + DeleteStaffAvailabilityStatsData({ + this.staffAvailabilityStats_delete, + }); +} + +@immutable +class DeleteStaffAvailabilityStatsVariables { + final String staffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteStaffAvailabilityStatsVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffAvailabilityStatsVariables otherTyped = other as DeleteStaffAvailabilityStatsVariables; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + DeleteStaffAvailabilityStatsVariables({ + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_course.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_course.dart new file mode 100644 index 00000000..bfc5814c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_course.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteStaffCourseVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteStaffCourseVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteStaffCourseData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteStaffCourseVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteStaffCourseVariables vars= DeleteStaffCourseVariables(id: id,); + return _dataConnect.mutation("deleteStaffCourse", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteStaffCourseStaffCourseDelete { + final String id; + DeleteStaffCourseStaffCourseDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffCourseStaffCourseDelete otherTyped = other as DeleteStaffCourseStaffCourseDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteStaffCourseStaffCourseDelete({ + required this.id, + }); +} + +@immutable +class DeleteStaffCourseData { + final DeleteStaffCourseStaffCourseDelete? staffCourse_delete; + DeleteStaffCourseData.fromJson(dynamic json): + + staffCourse_delete = json['staffCourse_delete'] == null ? null : DeleteStaffCourseStaffCourseDelete.fromJson(json['staffCourse_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffCourseData otherTyped = other as DeleteStaffCourseData; + return staffCourse_delete == otherTyped.staffCourse_delete; + + } + @override + int get hashCode => staffCourse_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (staffCourse_delete != null) { + json['staffCourse_delete'] = staffCourse_delete!.toJson(); + } + return json; + } + + DeleteStaffCourseData({ + this.staffCourse_delete, + }); +} + +@immutable +class DeleteStaffCourseVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteStaffCourseVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffCourseVariables otherTyped = other as DeleteStaffCourseVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteStaffCourseVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_document.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_document.dart new file mode 100644 index 00000000..aa0d603c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_document.dart @@ -0,0 +1,135 @@ +part of 'generated.dart'; + +class DeleteStaffDocumentVariablesBuilder { + String staffId; + String documentId; + + final FirebaseDataConnect _dataConnect; + DeleteStaffDocumentVariablesBuilder(this._dataConnect, {required this.staffId,required this.documentId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteStaffDocumentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteStaffDocumentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteStaffDocumentVariables vars= DeleteStaffDocumentVariables(staffId: staffId,documentId: documentId,); + return _dataConnect.mutation("deleteStaffDocument", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteStaffDocumentStaffDocumentDelete { + final String staffId; + final String documentId; + DeleteStaffDocumentStaffDocumentDelete.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + documentId = nativeFromJson(json['documentId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffDocumentStaffDocumentDelete otherTyped = other as DeleteStaffDocumentStaffDocumentDelete; + return staffId == otherTyped.staffId && + documentId == otherTyped.documentId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, documentId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['documentId'] = nativeToJson(documentId); + return json; + } + + DeleteStaffDocumentStaffDocumentDelete({ + required this.staffId, + required this.documentId, + }); +} + +@immutable +class DeleteStaffDocumentData { + final DeleteStaffDocumentStaffDocumentDelete? staffDocument_delete; + DeleteStaffDocumentData.fromJson(dynamic json): + + staffDocument_delete = json['staffDocument_delete'] == null ? null : DeleteStaffDocumentStaffDocumentDelete.fromJson(json['staffDocument_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffDocumentData otherTyped = other as DeleteStaffDocumentData; + return staffDocument_delete == otherTyped.staffDocument_delete; + + } + @override + int get hashCode => staffDocument_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (staffDocument_delete != null) { + json['staffDocument_delete'] = staffDocument_delete!.toJson(); + } + return json; + } + + DeleteStaffDocumentData({ + this.staffDocument_delete, + }); +} + +@immutable +class DeleteStaffDocumentVariables { + final String staffId; + final String documentId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteStaffDocumentVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + documentId = nativeFromJson(json['documentId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffDocumentVariables otherTyped = other as DeleteStaffDocumentVariables; + return staffId == otherTyped.staffId && + documentId == otherTyped.documentId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, documentId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['documentId'] = nativeToJson(documentId); + return json; + } + + DeleteStaffDocumentVariables({ + required this.staffId, + required this.documentId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_role.dart new file mode 100644 index 00000000..982ba03d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_staff_role.dart @@ -0,0 +1,135 @@ +part of 'generated.dart'; + +class DeleteStaffRoleVariablesBuilder { + String staffId; + String roleId; + + final FirebaseDataConnect _dataConnect; + DeleteStaffRoleVariablesBuilder(this._dataConnect, {required this.staffId,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteStaffRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteStaffRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteStaffRoleVariables vars= DeleteStaffRoleVariables(staffId: staffId,roleId: roleId,); + return _dataConnect.mutation("deleteStaffRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteStaffRoleStaffRoleDelete { + final String staffId; + final String roleId; + DeleteStaffRoleStaffRoleDelete.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffRoleStaffRoleDelete otherTyped = other as DeleteStaffRoleStaffRoleDelete; + return staffId == otherTyped.staffId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + DeleteStaffRoleStaffRoleDelete({ + required this.staffId, + required this.roleId, + }); +} + +@immutable +class DeleteStaffRoleData { + final DeleteStaffRoleStaffRoleDelete? staffRole_delete; + DeleteStaffRoleData.fromJson(dynamic json): + + staffRole_delete = json['staffRole_delete'] == null ? null : DeleteStaffRoleStaffRoleDelete.fromJson(json['staffRole_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffRoleData otherTyped = other as DeleteStaffRoleData; + return staffRole_delete == otherTyped.staffRole_delete; + + } + @override + int get hashCode => staffRole_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (staffRole_delete != null) { + json['staffRole_delete'] = staffRole_delete!.toJson(); + } + return json; + } + + DeleteStaffRoleData({ + this.staffRole_delete, + }); +} + +@immutable +class DeleteStaffRoleVariables { + final String staffId; + final String roleId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteStaffRoleVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteStaffRoleVariables otherTyped = other as DeleteStaffRoleVariables; + return staffId == otherTyped.staffId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + DeleteStaffRoleVariables({ + required this.staffId, + required this.roleId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_task.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_task.dart new file mode 100644 index 00000000..db5384e2 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_task.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteTaskVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteTaskVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteTaskData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteTaskVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteTaskVariables vars= DeleteTaskVariables(id: id,); + return _dataConnect.mutation("deleteTask", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteTaskTaskDelete { + final String id; + DeleteTaskTaskDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaskTaskDelete otherTyped = other as DeleteTaskTaskDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTaskTaskDelete({ + required this.id, + }); +} + +@immutable +class DeleteTaskData { + final DeleteTaskTaskDelete? task_delete; + DeleteTaskData.fromJson(dynamic json): + + task_delete = json['task_delete'] == null ? null : DeleteTaskTaskDelete.fromJson(json['task_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaskData otherTyped = other as DeleteTaskData; + return task_delete == otherTyped.task_delete; + + } + @override + int get hashCode => task_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (task_delete != null) { + json['task_delete'] = task_delete!.toJson(); + } + return json; + } + + DeleteTaskData({ + this.task_delete, + }); +} + +@immutable +class DeleteTaskVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteTaskVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaskVariables otherTyped = other as DeleteTaskVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTaskVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_task_comment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_task_comment.dart new file mode 100644 index 00000000..db31a5e8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_task_comment.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteTaskCommentVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteTaskCommentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteTaskCommentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteTaskCommentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteTaskCommentVariables vars= DeleteTaskCommentVariables(id: id,); + return _dataConnect.mutation("deleteTaskComment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteTaskCommentTaskCommentDelete { + final String id; + DeleteTaskCommentTaskCommentDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaskCommentTaskCommentDelete otherTyped = other as DeleteTaskCommentTaskCommentDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTaskCommentTaskCommentDelete({ + required this.id, + }); +} + +@immutable +class DeleteTaskCommentData { + final DeleteTaskCommentTaskCommentDelete? taskComment_delete; + DeleteTaskCommentData.fromJson(dynamic json): + + taskComment_delete = json['taskComment_delete'] == null ? null : DeleteTaskCommentTaskCommentDelete.fromJson(json['taskComment_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaskCommentData otherTyped = other as DeleteTaskCommentData; + return taskComment_delete == otherTyped.taskComment_delete; + + } + @override + int get hashCode => taskComment_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (taskComment_delete != null) { + json['taskComment_delete'] = taskComment_delete!.toJson(); + } + return json; + } + + DeleteTaskCommentData({ + this.taskComment_delete, + }); +} + +@immutable +class DeleteTaskCommentVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteTaskCommentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaskCommentVariables otherTyped = other as DeleteTaskCommentVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTaskCommentVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_tax_form.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_tax_form.dart new file mode 100644 index 00000000..20511558 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_tax_form.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteTaxFormVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteTaxFormVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteTaxFormData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteTaxFormVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteTaxFormVariables vars= DeleteTaxFormVariables(id: id,); + return _dataConnect.mutation("deleteTaxForm", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteTaxFormTaxFormDelete { + final String id; + DeleteTaxFormTaxFormDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaxFormTaxFormDelete otherTyped = other as DeleteTaxFormTaxFormDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTaxFormTaxFormDelete({ + required this.id, + }); +} + +@immutable +class DeleteTaxFormData { + final DeleteTaxFormTaxFormDelete? taxForm_delete; + DeleteTaxFormData.fromJson(dynamic json): + + taxForm_delete = json['taxForm_delete'] == null ? null : DeleteTaxFormTaxFormDelete.fromJson(json['taxForm_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaxFormData otherTyped = other as DeleteTaxFormData; + return taxForm_delete == otherTyped.taxForm_delete; + + } + @override + int get hashCode => taxForm_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (taxForm_delete != null) { + json['taxForm_delete'] = taxForm_delete!.toJson(); + } + return json; + } + + DeleteTaxFormData({ + this.taxForm_delete, + }); +} + +@immutable +class DeleteTaxFormVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteTaxFormVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTaxFormVariables otherTyped = other as DeleteTaxFormVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTaxFormVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team.dart new file mode 100644 index 00000000..a1b09e5a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteTeamVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteTeamVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteTeamData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteTeamVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteTeamVariables vars= DeleteTeamVariables(id: id,); + return _dataConnect.mutation("deleteTeam", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteTeamTeamDelete { + final String id; + DeleteTeamTeamDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamTeamDelete otherTyped = other as DeleteTeamTeamDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamTeamDelete({ + required this.id, + }); +} + +@immutable +class DeleteTeamData { + final DeleteTeamTeamDelete? team_delete; + DeleteTeamData.fromJson(dynamic json): + + team_delete = json['team_delete'] == null ? null : DeleteTeamTeamDelete.fromJson(json['team_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamData otherTyped = other as DeleteTeamData; + return team_delete == otherTyped.team_delete; + + } + @override + int get hashCode => team_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (team_delete != null) { + json['team_delete'] = team_delete!.toJson(); + } + return json; + } + + DeleteTeamData({ + this.team_delete, + }); +} + +@immutable +class DeleteTeamVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteTeamVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamVariables otherTyped = other as DeleteTeamVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_hub.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_hub.dart new file mode 100644 index 00000000..bb91671a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_hub.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteTeamHubVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteTeamHubVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteTeamHubData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteTeamHubVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteTeamHubVariables vars= DeleteTeamHubVariables(id: id,); + return _dataConnect.mutation("deleteTeamHub", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteTeamHubTeamHubDelete { + final String id; + DeleteTeamHubTeamHubDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamHubTeamHubDelete otherTyped = other as DeleteTeamHubTeamHubDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamHubTeamHubDelete({ + required this.id, + }); +} + +@immutable +class DeleteTeamHubData { + final DeleteTeamHubTeamHubDelete? teamHub_delete; + DeleteTeamHubData.fromJson(dynamic json): + + teamHub_delete = json['teamHub_delete'] == null ? null : DeleteTeamHubTeamHubDelete.fromJson(json['teamHub_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamHubData otherTyped = other as DeleteTeamHubData; + return teamHub_delete == otherTyped.teamHub_delete; + + } + @override + int get hashCode => teamHub_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (teamHub_delete != null) { + json['teamHub_delete'] = teamHub_delete!.toJson(); + } + return json; + } + + DeleteTeamHubData({ + this.teamHub_delete, + }); +} + +@immutable +class DeleteTeamHubVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteTeamHubVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamHubVariables otherTyped = other as DeleteTeamHubVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamHubVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_hud_department.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_hud_department.dart new file mode 100644 index 00000000..cbb5ecb4 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_hud_department.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteTeamHudDepartmentVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteTeamHudDepartmentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteTeamHudDepartmentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteTeamHudDepartmentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteTeamHudDepartmentVariables vars= DeleteTeamHudDepartmentVariables(id: id,); + return _dataConnect.mutation("deleteTeamHudDepartment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteTeamHudDepartmentTeamHudDepartmentDelete { + final String id; + DeleteTeamHudDepartmentTeamHudDepartmentDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamHudDepartmentTeamHudDepartmentDelete otherTyped = other as DeleteTeamHudDepartmentTeamHudDepartmentDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamHudDepartmentTeamHudDepartmentDelete({ + required this.id, + }); +} + +@immutable +class DeleteTeamHudDepartmentData { + final DeleteTeamHudDepartmentTeamHudDepartmentDelete? teamHudDepartment_delete; + DeleteTeamHudDepartmentData.fromJson(dynamic json): + + teamHudDepartment_delete = json['teamHudDepartment_delete'] == null ? null : DeleteTeamHudDepartmentTeamHudDepartmentDelete.fromJson(json['teamHudDepartment_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamHudDepartmentData otherTyped = other as DeleteTeamHudDepartmentData; + return teamHudDepartment_delete == otherTyped.teamHudDepartment_delete; + + } + @override + int get hashCode => teamHudDepartment_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (teamHudDepartment_delete != null) { + json['teamHudDepartment_delete'] = teamHudDepartment_delete!.toJson(); + } + return json; + } + + DeleteTeamHudDepartmentData({ + this.teamHudDepartment_delete, + }); +} + +@immutable +class DeleteTeamHudDepartmentVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteTeamHudDepartmentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamHudDepartmentVariables otherTyped = other as DeleteTeamHudDepartmentVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamHudDepartmentVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_member.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_member.dart new file mode 100644 index 00000000..b69de984 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_team_member.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteTeamMemberVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteTeamMemberVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteTeamMemberData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteTeamMemberVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteTeamMemberVariables vars= DeleteTeamMemberVariables(id: id,); + return _dataConnect.mutation("deleteTeamMember", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteTeamMemberTeamMemberDelete { + final String id; + DeleteTeamMemberTeamMemberDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamMemberTeamMemberDelete otherTyped = other as DeleteTeamMemberTeamMemberDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamMemberTeamMemberDelete({ + required this.id, + }); +} + +@immutable +class DeleteTeamMemberData { + final DeleteTeamMemberTeamMemberDelete? teamMember_delete; + DeleteTeamMemberData.fromJson(dynamic json): + + teamMember_delete = json['teamMember_delete'] == null ? null : DeleteTeamMemberTeamMemberDelete.fromJson(json['teamMember_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamMemberData otherTyped = other as DeleteTeamMemberData; + return teamMember_delete == otherTyped.teamMember_delete; + + } + @override + int get hashCode => teamMember_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (teamMember_delete != null) { + json['teamMember_delete'] = teamMember_delete!.toJson(); + } + return json; + } + + DeleteTeamMemberData({ + this.teamMember_delete, + }); +} + +@immutable +class DeleteTeamMemberVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteTeamMemberVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteTeamMemberVariables otherTyped = other as DeleteTeamMemberVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteTeamMemberVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_user.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_user.dart new file mode 100644 index 00000000..d3f9b06f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_user.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteUserVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteUserVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteUserData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteUserVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteUserVariables vars= DeleteUserVariables(id: id,); + return _dataConnect.mutation("DeleteUser", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteUserUserDelete { + final String id; + DeleteUserUserDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteUserUserDelete otherTyped = other as DeleteUserUserDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteUserUserDelete({ + required this.id, + }); +} + +@immutable +class DeleteUserData { + final DeleteUserUserDelete? user_delete; + DeleteUserData.fromJson(dynamic json): + + user_delete = json['user_delete'] == null ? null : DeleteUserUserDelete.fromJson(json['user_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteUserData otherTyped = other as DeleteUserData; + return user_delete == otherTyped.user_delete; + + } + @override + int get hashCode => user_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (user_delete != null) { + json['user_delete'] = user_delete!.toJson(); + } + return json; + } + + DeleteUserData({ + this.user_delete, + }); +} + +@immutable +class DeleteUserVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteUserVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteUserVariables otherTyped = other as DeleteUserVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteUserVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_user_conversation.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_user_conversation.dart new file mode 100644 index 00000000..54606243 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_user_conversation.dart @@ -0,0 +1,135 @@ +part of 'generated.dart'; + +class DeleteUserConversationVariablesBuilder { + String conversationId; + String userId; + + final FirebaseDataConnect _dataConnect; + DeleteUserConversationVariablesBuilder(this._dataConnect, {required this.conversationId,required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => DeleteUserConversationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteUserConversationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteUserConversationVariables vars= DeleteUserConversationVariables(conversationId: conversationId,userId: userId,); + return _dataConnect.mutation("deleteUserConversation", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteUserConversationUserConversationDelete { + final String conversationId; + final String userId; + DeleteUserConversationUserConversationDelete.fromJson(dynamic json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteUserConversationUserConversationDelete otherTyped = other as DeleteUserConversationUserConversationDelete; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + return json; + } + + DeleteUserConversationUserConversationDelete({ + required this.conversationId, + required this.userId, + }); +} + +@immutable +class DeleteUserConversationData { + final DeleteUserConversationUserConversationDelete? userConversation_delete; + DeleteUserConversationData.fromJson(dynamic json): + + userConversation_delete = json['userConversation_delete'] == null ? null : DeleteUserConversationUserConversationDelete.fromJson(json['userConversation_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteUserConversationData otherTyped = other as DeleteUserConversationData; + return userConversation_delete == otherTyped.userConversation_delete; + + } + @override + int get hashCode => userConversation_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (userConversation_delete != null) { + json['userConversation_delete'] = userConversation_delete!.toJson(); + } + return json; + } + + DeleteUserConversationData({ + this.userConversation_delete, + }); +} + +@immutable +class DeleteUserConversationVariables { + final String conversationId; + final String userId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteUserConversationVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteUserConversationVariables otherTyped = other as DeleteUserConversationVariables; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + return json; + } + + DeleteUserConversationVariables({ + required this.conversationId, + required this.userId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor.dart new file mode 100644 index 00000000..61a59821 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteVendorVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteVendorVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteVendorVariables vars= DeleteVendorVariables(id: id,); + return _dataConnect.mutation("deleteVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteVendorVendorDelete { + final String id; + DeleteVendorVendorDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorVendorDelete otherTyped = other as DeleteVendorVendorDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteVendorVendorDelete({ + required this.id, + }); +} + +@immutable +class DeleteVendorData { + final DeleteVendorVendorDelete? vendor_delete; + DeleteVendorData.fromJson(dynamic json): + + vendor_delete = json['vendor_delete'] == null ? null : DeleteVendorVendorDelete.fromJson(json['vendor_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorData otherTyped = other as DeleteVendorData; + return vendor_delete == otherTyped.vendor_delete; + + } + @override + int get hashCode => vendor_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (vendor_delete != null) { + json['vendor_delete'] = vendor_delete!.toJson(); + } + return json; + } + + DeleteVendorData({ + this.vendor_delete, + }); +} + +@immutable +class DeleteVendorVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteVendorVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorVariables otherTyped = other as DeleteVendorVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteVendorVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor_benefit_plan.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor_benefit_plan.dart new file mode 100644 index 00000000..76b99dcc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor_benefit_plan.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteVendorBenefitPlanVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteVendorBenefitPlanVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteVendorBenefitPlanData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteVendorBenefitPlanVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteVendorBenefitPlanVariables vars= DeleteVendorBenefitPlanVariables(id: id,); + return _dataConnect.mutation("deleteVendorBenefitPlan", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteVendorBenefitPlanVendorBenefitPlanDelete { + final String id; + DeleteVendorBenefitPlanVendorBenefitPlanDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorBenefitPlanVendorBenefitPlanDelete otherTyped = other as DeleteVendorBenefitPlanVendorBenefitPlanDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteVendorBenefitPlanVendorBenefitPlanDelete({ + required this.id, + }); +} + +@immutable +class DeleteVendorBenefitPlanData { + final DeleteVendorBenefitPlanVendorBenefitPlanDelete? vendorBenefitPlan_delete; + DeleteVendorBenefitPlanData.fromJson(dynamic json): + + vendorBenefitPlan_delete = json['vendorBenefitPlan_delete'] == null ? null : DeleteVendorBenefitPlanVendorBenefitPlanDelete.fromJson(json['vendorBenefitPlan_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorBenefitPlanData otherTyped = other as DeleteVendorBenefitPlanData; + return vendorBenefitPlan_delete == otherTyped.vendorBenefitPlan_delete; + + } + @override + int get hashCode => vendorBenefitPlan_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (vendorBenefitPlan_delete != null) { + json['vendorBenefitPlan_delete'] = vendorBenefitPlan_delete!.toJson(); + } + return json; + } + + DeleteVendorBenefitPlanData({ + this.vendorBenefitPlan_delete, + }); +} + +@immutable +class DeleteVendorBenefitPlanVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteVendorBenefitPlanVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorBenefitPlanVariables otherTyped = other as DeleteVendorBenefitPlanVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteVendorBenefitPlanVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor_rate.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor_rate.dart new file mode 100644 index 00000000..4894a79f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/delete_vendor_rate.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class DeleteVendorRateVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + DeleteVendorRateVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => DeleteVendorRateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (DeleteVendorRateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + DeleteVendorRateVariables vars= DeleteVendorRateVariables(id: id,); + return _dataConnect.mutation("deleteVendorRate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class DeleteVendorRateVendorRateDelete { + final String id; + DeleteVendorRateVendorRateDelete.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorRateVendorRateDelete otherTyped = other as DeleteVendorRateVendorRateDelete; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteVendorRateVendorRateDelete({ + required this.id, + }); +} + +@immutable +class DeleteVendorRateData { + final DeleteVendorRateVendorRateDelete? vendorRate_delete; + DeleteVendorRateData.fromJson(dynamic json): + + vendorRate_delete = json['vendorRate_delete'] == null ? null : DeleteVendorRateVendorRateDelete.fromJson(json['vendorRate_delete']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorRateData otherTyped = other as DeleteVendorRateData; + return vendorRate_delete == otherTyped.vendorRate_delete; + + } + @override + int get hashCode => vendorRate_delete.hashCode; + + + Map toJson() { + Map json = {}; + if (vendorRate_delete != null) { + json['vendorRate_delete'] = vendorRate_delete!.toJson(); + } + return json; + } + + DeleteVendorRateData({ + this.vendorRate_delete, + }); +} + +@immutable +class DeleteVendorRateVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + DeleteVendorRateVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final DeleteVendorRateVariables otherTyped = other as DeleteVendorRateVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + DeleteVendorRateVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_accounts.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_accounts.dart new file mode 100644 index 00000000..6c190c86 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_accounts.dart @@ -0,0 +1,209 @@ +part of 'generated.dart'; + +class FilterAccountsVariablesBuilder { + Optional _bank = Optional.optional(nativeFromJson, nativeToJson); + Optional _type = Optional.optional((data) => AccountType.values.byName(data), enumSerializer); + Optional _isPrimary = Optional.optional(nativeFromJson, nativeToJson); + Optional _ownerId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterAccountsVariablesBuilder bank(String? t) { + _bank.value = t; + return this; + } + FilterAccountsVariablesBuilder type(AccountType? t) { + _type.value = t; + return this; + } + FilterAccountsVariablesBuilder isPrimary(bool? t) { + _isPrimary.value = t; + return this; + } + FilterAccountsVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + + FilterAccountsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterAccountsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterAccountsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterAccountsVariables vars= FilterAccountsVariables(bank: _bank,type: _type,isPrimary: _isPrimary,ownerId: _ownerId,); + return _dataConnect.query("filterAccounts", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterAccountsAccounts { + final String id; + final String bank; + final EnumValue type; + final String last4; + final bool? isPrimary; + final String ownerId; + FilterAccountsAccounts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + bank = nativeFromJson(json['bank']), + type = accountTypeDeserializer(json['type']), + last4 = nativeFromJson(json['last4']), + isPrimary = json['isPrimary'] == null ? null : nativeFromJson(json['isPrimary']), + ownerId = nativeFromJson(json['ownerId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAccountsAccounts otherTyped = other as FilterAccountsAccounts; + return id == otherTyped.id && + bank == otherTyped.bank && + type == otherTyped.type && + last4 == otherTyped.last4 && + isPrimary == otherTyped.isPrimary && + ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['bank'] = nativeToJson(bank); + json['type'] = + accountTypeSerializer(type) + ; + json['last4'] = nativeToJson(last4); + if (isPrimary != null) { + json['isPrimary'] = nativeToJson(isPrimary); + } + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + FilterAccountsAccounts({ + required this.id, + required this.bank, + required this.type, + required this.last4, + this.isPrimary, + required this.ownerId, + }); +} + +@immutable +class FilterAccountsData { + final List accounts; + FilterAccountsData.fromJson(dynamic json): + + accounts = (json['accounts'] as List) + .map((e) => FilterAccountsAccounts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAccountsData otherTyped = other as FilterAccountsData; + return accounts == otherTyped.accounts; + + } + @override + int get hashCode => accounts.hashCode; + + + Map toJson() { + Map json = {}; + json['accounts'] = accounts.map((e) => e.toJson()).toList(); + return json; + } + + FilterAccountsData({ + required this.accounts, + }); +} + +@immutable +class FilterAccountsVariables { + late final Optionalbank; + late final Optionaltype; + late final OptionalisPrimary; + late final OptionalownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterAccountsVariables.fromJson(Map json) { + + + bank = Optional.optional(nativeFromJson, nativeToJson); + bank.value = json['bank'] == null ? null : nativeFromJson(json['bank']); + + + type = Optional.optional((data) => AccountType.values.byName(data), enumSerializer); + type.value = json['type'] == null ? null : AccountType.values.byName(json['type']); + + + isPrimary = Optional.optional(nativeFromJson, nativeToJson); + isPrimary.value = json['isPrimary'] == null ? null : nativeFromJson(json['isPrimary']); + + + ownerId = Optional.optional(nativeFromJson, nativeToJson); + ownerId.value = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAccountsVariables otherTyped = other as FilterAccountsVariables; + return bank == otherTyped.bank && + type == otherTyped.type && + isPrimary == otherTyped.isPrimary && + ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => Object.hashAll([bank.hashCode, type.hashCode, isPrimary.hashCode, ownerId.hashCode]); + + + Map toJson() { + Map json = {}; + if(bank.state == OptionalState.set) { + json['bank'] = bank.toJson(); + } + if(type.state == OptionalState.set) { + json['type'] = type.toJson(); + } + if(isPrimary.state == OptionalState.set) { + json['isPrimary'] = isPrimary.toJson(); + } + if(ownerId.state == OptionalState.set) { + json['ownerId'] = ownerId.toJson(); + } + return json; + } + + FilterAccountsVariables({ + required this.bank, + required this.type, + required this.isPrimary, + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_activity_logs.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_activity_logs.dart new file mode 100644 index 00000000..0298429e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_activity_logs.dart @@ -0,0 +1,332 @@ +part of 'generated.dart'; + +class FilterActivityLogsVariablesBuilder { + Optional _userId = Optional.optional(nativeFromJson, nativeToJson); + Optional _dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + Optional _dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + Optional _isRead = Optional.optional(nativeFromJson, nativeToJson); + Optional _activityType = Optional.optional((data) => ActivityType.values.byName(data), enumSerializer); + Optional _iconType = Optional.optional((data) => ActivityIconType.values.byName(data), enumSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterActivityLogsVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + FilterActivityLogsVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + FilterActivityLogsVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + FilterActivityLogsVariablesBuilder isRead(bool? t) { + _isRead.value = t; + return this; + } + FilterActivityLogsVariablesBuilder activityType(ActivityType? t) { + _activityType.value = t; + return this; + } + FilterActivityLogsVariablesBuilder iconType(ActivityIconType? t) { + _iconType.value = t; + return this; + } + FilterActivityLogsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterActivityLogsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterActivityLogsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterActivityLogsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterActivityLogsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterActivityLogsVariables vars= FilterActivityLogsVariables(userId: _userId,dateFrom: _dateFrom,dateTo: _dateTo,isRead: _isRead,activityType: _activityType,iconType: _iconType,offset: _offset,limit: _limit,); + return _dataConnect.query("filterActivityLogs", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterActivityLogsActivityLogs { + final String id; + final String userId; + final Timestamp date; + final String? hourStart; + final String? hourEnd; + final String? totalhours; + final EnumValue? iconType; + final String? iconColor; + final String title; + final String description; + final bool? isRead; + final EnumValue activityType; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + FilterActivityLogsActivityLogs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + date = Timestamp.fromJson(json['date']), + hourStart = json['hourStart'] == null ? null : nativeFromJson(json['hourStart']), + hourEnd = json['hourEnd'] == null ? null : nativeFromJson(json['hourEnd']), + totalhours = json['totalhours'] == null ? null : nativeFromJson(json['totalhours']), + iconType = json['iconType'] == null ? null : activityIconTypeDeserializer(json['iconType']), + iconColor = json['iconColor'] == null ? null : nativeFromJson(json['iconColor']), + title = nativeFromJson(json['title']), + description = nativeFromJson(json['description']), + isRead = json['isRead'] == null ? null : nativeFromJson(json['isRead']), + activityType = activityTypeDeserializer(json['activityType']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterActivityLogsActivityLogs otherTyped = other as FilterActivityLogsActivityLogs; + return id == otherTyped.id && + userId == otherTyped.userId && + date == otherTyped.date && + hourStart == otherTyped.hourStart && + hourEnd == otherTyped.hourEnd && + totalhours == otherTyped.totalhours && + iconType == otherTyped.iconType && + iconColor == otherTyped.iconColor && + title == otherTyped.title && + description == otherTyped.description && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, date.hashCode, hourStart.hashCode, hourEnd.hashCode, totalhours.hashCode, iconType.hashCode, iconColor.hashCode, title.hashCode, description.hashCode, isRead.hashCode, activityType.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['date'] = date.toJson(); + if (hourStart != null) { + json['hourStart'] = nativeToJson(hourStart); + } + if (hourEnd != null) { + json['hourEnd'] = nativeToJson(hourEnd); + } + if (totalhours != null) { + json['totalhours'] = nativeToJson(totalhours); + } + if (iconType != null) { + json['iconType'] = + activityIconTypeSerializer(iconType!) + ; + } + if (iconColor != null) { + json['iconColor'] = nativeToJson(iconColor); + } + json['title'] = nativeToJson(title); + json['description'] = nativeToJson(description); + if (isRead != null) { + json['isRead'] = nativeToJson(isRead); + } + json['activityType'] = + activityTypeSerializer(activityType) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + FilterActivityLogsActivityLogs({ + required this.id, + required this.userId, + required this.date, + this.hourStart, + this.hourEnd, + this.totalhours, + this.iconType, + this.iconColor, + required this.title, + required this.description, + this.isRead, + required this.activityType, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class FilterActivityLogsData { + final List activityLogs; + FilterActivityLogsData.fromJson(dynamic json): + + activityLogs = (json['activityLogs'] as List) + .map((e) => FilterActivityLogsActivityLogs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterActivityLogsData otherTyped = other as FilterActivityLogsData; + return activityLogs == otherTyped.activityLogs; + + } + @override + int get hashCode => activityLogs.hashCode; + + + Map toJson() { + Map json = {}; + json['activityLogs'] = activityLogs.map((e) => e.toJson()).toList(); + return json; + } + + FilterActivityLogsData({ + required this.activityLogs, + }); +} + +@immutable +class FilterActivityLogsVariables { + late final OptionaluserId; + late final OptionaldateFrom; + late final OptionaldateTo; + late final OptionalisRead; + late final OptionalactivityType; + late final OptionaliconType; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterActivityLogsVariables.fromJson(Map json) { + + + userId = Optional.optional(nativeFromJson, nativeToJson); + userId.value = json['userId'] == null ? null : nativeFromJson(json['userId']); + + + dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + dateFrom.value = json['dateFrom'] == null ? null : Timestamp.fromJson(json['dateFrom']); + + + dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + dateTo.value = json['dateTo'] == null ? null : Timestamp.fromJson(json['dateTo']); + + + isRead = Optional.optional(nativeFromJson, nativeToJson); + isRead.value = json['isRead'] == null ? null : nativeFromJson(json['isRead']); + + + activityType = Optional.optional((data) => ActivityType.values.byName(data), enumSerializer); + activityType.value = json['activityType'] == null ? null : ActivityType.values.byName(json['activityType']); + + + iconType = Optional.optional((data) => ActivityIconType.values.byName(data), enumSerializer); + iconType.value = json['iconType'] == null ? null : ActivityIconType.values.byName(json['iconType']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterActivityLogsVariables otherTyped = other as FilterActivityLogsVariables; + return userId == otherTyped.userId && + dateFrom == otherTyped.dateFrom && + dateTo == otherTyped.dateTo && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType && + iconType == otherTyped.iconType && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, dateFrom.hashCode, dateTo.hashCode, isRead.hashCode, activityType.hashCode, iconType.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(userId.state == OptionalState.set) { + json['userId'] = userId.toJson(); + } + if(dateFrom.state == OptionalState.set) { + json['dateFrom'] = dateFrom.toJson(); + } + if(dateTo.state == OptionalState.set) { + json['dateTo'] = dateTo.toJson(); + } + if(isRead.state == OptionalState.set) { + json['isRead'] = isRead.toJson(); + } + if(activityType.state == OptionalState.set) { + json['activityType'] = activityType.toJson(); + } + if(iconType.state == OptionalState.set) { + json['iconType'] = iconType.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterActivityLogsVariables({ + required this.userId, + required this.dateFrom, + required this.dateTo, + required this.isRead, + required this.activityType, + required this.iconType, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_assignments.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_assignments.dart new file mode 100644 index 00000000..63e6ce4e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_assignments.dart @@ -0,0 +1,444 @@ +part of 'generated.dart'; + +class FilterAssignmentsVariablesBuilder { + List shiftIds; + List roleIds; + Optional _status = Optional.optional((data) => AssignmentStatus.values.byName(data), enumSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; FilterAssignmentsVariablesBuilder status(AssignmentStatus? t) { + _status.value = t; + return this; + } + FilterAssignmentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterAssignmentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterAssignmentsVariablesBuilder(this._dataConnect, {required this.shiftIds,required this.roleIds,}); + Deserializer dataDeserializer = (dynamic json) => FilterAssignmentsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterAssignmentsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterAssignmentsVariables vars= FilterAssignmentsVariables(shiftIds: shiftIds,roleIds: roleIds,status: _status,offset: _offset,limit: _limit,); + return _dataConnect.query("filterAssignments", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterAssignmentsAssignments { + final String id; + final String? title; + final EnumValue? status; + final Timestamp? createdAt; + final FilterAssignmentsAssignmentsWorkforce workforce; + final FilterAssignmentsAssignmentsShiftRole shiftRole; + FilterAssignmentsAssignments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + workforce = FilterAssignmentsAssignmentsWorkforce.fromJson(json['workforce']), + shiftRole = FilterAssignmentsAssignmentsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsAssignments otherTyped = other as FilterAssignmentsAssignments; + return id == otherTyped.id && + title == otherTyped.title && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + workforce == otherTyped.workforce && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, status.hashCode, createdAt.hashCode, workforce.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (status != null) { + json['status'] = + assignmentStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['workforce'] = workforce.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + FilterAssignmentsAssignments({ + required this.id, + this.title, + this.status, + this.createdAt, + required this.workforce, + required this.shiftRole, + }); +} + +@immutable +class FilterAssignmentsAssignmentsWorkforce { + final String id; + final String workforceNumber; + final FilterAssignmentsAssignmentsWorkforceStaff staff; + FilterAssignmentsAssignmentsWorkforce.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workforceNumber = nativeFromJson(json['workforceNumber']), + staff = FilterAssignmentsAssignmentsWorkforceStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsAssignmentsWorkforce otherTyped = other as FilterAssignmentsAssignmentsWorkforce; + return id == otherTyped.id && + workforceNumber == otherTyped.workforceNumber && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workforceNumber.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['workforceNumber'] = nativeToJson(workforceNumber); + json['staff'] = staff.toJson(); + return json; + } + + FilterAssignmentsAssignmentsWorkforce({ + required this.id, + required this.workforceNumber, + required this.staff, + }); +} + +@immutable +class FilterAssignmentsAssignmentsWorkforceStaff { + final String id; + final String fullName; + FilterAssignmentsAssignmentsWorkforceStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsAssignmentsWorkforceStaff otherTyped = other as FilterAssignmentsAssignmentsWorkforceStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + FilterAssignmentsAssignmentsWorkforceStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class FilterAssignmentsAssignmentsShiftRole { + final String id; + final FilterAssignmentsAssignmentsShiftRoleRole role; + final FilterAssignmentsAssignmentsShiftRoleShift shift; + FilterAssignmentsAssignmentsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + role = FilterAssignmentsAssignmentsShiftRoleRole.fromJson(json['role']), + shift = FilterAssignmentsAssignmentsShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsAssignmentsShiftRole otherTyped = other as FilterAssignmentsAssignmentsShiftRole; + return id == otherTyped.id && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + FilterAssignmentsAssignmentsShiftRole({ + required this.id, + required this.role, + required this.shift, + }); +} + +@immutable +class FilterAssignmentsAssignmentsShiftRoleRole { + final String id; + final String name; + FilterAssignmentsAssignmentsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsAssignmentsShiftRoleRole otherTyped = other as FilterAssignmentsAssignmentsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + return json; + } + + FilterAssignmentsAssignmentsShiftRoleRole({ + required this.id, + required this.name, + }); +} + +@immutable +class FilterAssignmentsAssignmentsShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? location; + final EnumValue? status; + FilterAssignmentsAssignmentsShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsAssignmentsShiftRoleShift otherTyped = other as FilterAssignmentsAssignmentsShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + return json; + } + + FilterAssignmentsAssignmentsShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.location, + this.status, + }); +} + +@immutable +class FilterAssignmentsData { + final List assignments; + FilterAssignmentsData.fromJson(dynamic json): + + assignments = (json['assignments'] as List) + .map((e) => FilterAssignmentsAssignments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsData otherTyped = other as FilterAssignmentsData; + return assignments == otherTyped.assignments; + + } + @override + int get hashCode => assignments.hashCode; + + + Map toJson() { + Map json = {}; + json['assignments'] = assignments.map((e) => e.toJson()).toList(); + return json; + } + + FilterAssignmentsData({ + required this.assignments, + }); +} + +@immutable +class FilterAssignmentsVariables { + final List shiftIds; + final List roleIds; + late final Optionalstatus; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterAssignmentsVariables.fromJson(Map json): + + shiftIds = (json['shiftIds'] as List) + .map((e) => nativeFromJson(e)) + .toList(), + roleIds = (json['roleIds'] as List) + .map((e) => nativeFromJson(e)) + .toList() { + + + + + status = Optional.optional((data) => AssignmentStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : AssignmentStatus.values.byName(json['status']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAssignmentsVariables otherTyped = other as FilterAssignmentsVariables; + return shiftIds == otherTyped.shiftIds && + roleIds == otherTyped.roleIds && + status == otherTyped.status && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([shiftIds.hashCode, roleIds.hashCode, status.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftIds'] = shiftIds.map((e) => nativeToJson(e)).toList(); + json['roleIds'] = roleIds.map((e) => nativeToJson(e)).toList(); + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterAssignmentsVariables({ + required this.shiftIds, + required this.roleIds, + required this.status, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_attire_options.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_attire_options.dart new file mode 100644 index 00000000..8df80758 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_attire_options.dart @@ -0,0 +1,203 @@ +part of 'generated.dart'; + +class FilterAttireOptionsVariablesBuilder { + Optional _itemId = Optional.optional(nativeFromJson, nativeToJson); + Optional _isMandatory = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterAttireOptionsVariablesBuilder itemId(String? t) { + _itemId.value = t; + return this; + } + FilterAttireOptionsVariablesBuilder isMandatory(bool? t) { + _isMandatory.value = t; + return this; + } + FilterAttireOptionsVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + + FilterAttireOptionsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterAttireOptionsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterAttireOptionsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterAttireOptionsVariables vars= FilterAttireOptionsVariables(itemId: _itemId,isMandatory: _isMandatory,vendorId: _vendorId,); + return _dataConnect.query("filterAttireOptions", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterAttireOptionsAttireOptions { + final String id; + final String itemId; + final String label; + final String? icon; + final String? imageUrl; + final bool? isMandatory; + final String? vendorId; + FilterAttireOptionsAttireOptions.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + itemId = nativeFromJson(json['itemId']), + label = nativeFromJson(json['label']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + imageUrl = json['imageUrl'] == null ? null : nativeFromJson(json['imageUrl']), + isMandatory = json['isMandatory'] == null ? null : nativeFromJson(json['isMandatory']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAttireOptionsAttireOptions otherTyped = other as FilterAttireOptionsAttireOptions; + return id == otherTyped.id && + itemId == otherTyped.itemId && + label == otherTyped.label && + icon == otherTyped.icon && + imageUrl == otherTyped.imageUrl && + isMandatory == otherTyped.isMandatory && + vendorId == otherTyped.vendorId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, itemId.hashCode, label.hashCode, icon.hashCode, imageUrl.hashCode, isMandatory.hashCode, vendorId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['itemId'] = nativeToJson(itemId); + json['label'] = nativeToJson(label); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (imageUrl != null) { + json['imageUrl'] = nativeToJson(imageUrl); + } + if (isMandatory != null) { + json['isMandatory'] = nativeToJson(isMandatory); + } + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + return json; + } + + FilterAttireOptionsAttireOptions({ + required this.id, + required this.itemId, + required this.label, + this.icon, + this.imageUrl, + this.isMandatory, + this.vendorId, + }); +} + +@immutable +class FilterAttireOptionsData { + final List attireOptions; + FilterAttireOptionsData.fromJson(dynamic json): + + attireOptions = (json['attireOptions'] as List) + .map((e) => FilterAttireOptionsAttireOptions.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAttireOptionsData otherTyped = other as FilterAttireOptionsData; + return attireOptions == otherTyped.attireOptions; + + } + @override + int get hashCode => attireOptions.hashCode; + + + Map toJson() { + Map json = {}; + json['attireOptions'] = attireOptions.map((e) => e.toJson()).toList(); + return json; + } + + FilterAttireOptionsData({ + required this.attireOptions, + }); +} + +@immutable +class FilterAttireOptionsVariables { + late final OptionalitemId; + late final OptionalisMandatory; + late final OptionalvendorId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterAttireOptionsVariables.fromJson(Map json) { + + + itemId = Optional.optional(nativeFromJson, nativeToJson); + itemId.value = json['itemId'] == null ? null : nativeFromJson(json['itemId']); + + + isMandatory = Optional.optional(nativeFromJson, nativeToJson); + isMandatory.value = json['isMandatory'] == null ? null : nativeFromJson(json['isMandatory']); + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterAttireOptionsVariables otherTyped = other as FilterAttireOptionsVariables; + return itemId == otherTyped.itemId && + isMandatory == otherTyped.isMandatory && + vendorId == otherTyped.vendorId; + + } + @override + int get hashCode => Object.hashAll([itemId.hashCode, isMandatory.hashCode, vendorId.hashCode]); + + + Map toJson() { + Map json = {}; + if(itemId.state == OptionalState.set) { + json['itemId'] = itemId.toJson(); + } + if(isMandatory.state == OptionalState.set) { + json['isMandatory'] = isMandatory.toJson(); + } + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + return json; + } + + FilterAttireOptionsVariables({ + required this.itemId, + required this.isMandatory, + required this.vendorId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_categories.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_categories.dart new file mode 100644 index 00000000..1b3d2ebc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_categories.dart @@ -0,0 +1,188 @@ +part of 'generated.dart'; + +class FilterCategoriesVariablesBuilder { + Optional _categoryId = Optional.optional(nativeFromJson, nativeToJson); + Optional _label = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterCategoriesVariablesBuilder categoryId(String? t) { + _categoryId.value = t; + return this; + } + FilterCategoriesVariablesBuilder label(String? t) { + _label.value = t; + return this; + } + + FilterCategoriesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterCategoriesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterCategoriesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterCategoriesVariables vars= FilterCategoriesVariables(categoryId: _categoryId,label: _label,); + return _dataConnect.query("filterCategories", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterCategoriesCategories { + final String id; + final String categoryId; + final String label; + final String? icon; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + FilterCategoriesCategories.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + categoryId = nativeFromJson(json['categoryId']), + label = nativeFromJson(json['label']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterCategoriesCategories otherTyped = other as FilterCategoriesCategories; + return id == otherTyped.id && + categoryId == otherTyped.categoryId && + label == otherTyped.label && + icon == otherTyped.icon && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, categoryId.hashCode, label.hashCode, icon.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['categoryId'] = nativeToJson(categoryId); + json['label'] = nativeToJson(label); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + FilterCategoriesCategories({ + required this.id, + required this.categoryId, + required this.label, + this.icon, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class FilterCategoriesData { + final List categories; + FilterCategoriesData.fromJson(dynamic json): + + categories = (json['categories'] as List) + .map((e) => FilterCategoriesCategories.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterCategoriesData otherTyped = other as FilterCategoriesData; + return categories == otherTyped.categories; + + } + @override + int get hashCode => categories.hashCode; + + + Map toJson() { + Map json = {}; + json['categories'] = categories.map((e) => e.toJson()).toList(); + return json; + } + + FilterCategoriesData({ + required this.categories, + }); +} + +@immutable +class FilterCategoriesVariables { + late final OptionalcategoryId; + late final Optionallabel; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterCategoriesVariables.fromJson(Map json) { + + + categoryId = Optional.optional(nativeFromJson, nativeToJson); + categoryId.value = json['categoryId'] == null ? null : nativeFromJson(json['categoryId']); + + + label = Optional.optional(nativeFromJson, nativeToJson); + label.value = json['label'] == null ? null : nativeFromJson(json['label']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterCategoriesVariables otherTyped = other as FilterCategoriesVariables; + return categoryId == otherTyped.categoryId && + label == otherTyped.label; + + } + @override + int get hashCode => Object.hashAll([categoryId.hashCode, label.hashCode]); + + + Map toJson() { + Map json = {}; + if(categoryId.state == OptionalState.set) { + json['categoryId'] = categoryId.toJson(); + } + if(label.state == OptionalState.set) { + json['label'] = label.toJson(); + } + return json; + } + + FilterCategoriesVariables({ + required this.categoryId, + required this.label, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_client_feedbacks.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_client_feedbacks.dart new file mode 100644 index 00000000..e7661cbe --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_client_feedbacks.dart @@ -0,0 +1,359 @@ +part of 'generated.dart'; + +class FilterClientFeedbacksVariablesBuilder { + Optional _businessId = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _ratingMin = Optional.optional(nativeFromJson, nativeToJson); + Optional _ratingMax = Optional.optional(nativeFromJson, nativeToJson); + Optional _dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + Optional _dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterClientFeedbacksVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder ratingMin(int? t) { + _ratingMin.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder ratingMax(int? t) { + _ratingMax.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterClientFeedbacksVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterClientFeedbacksVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterClientFeedbacksData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterClientFeedbacksVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterClientFeedbacksVariables vars= FilterClientFeedbacksVariables(businessId: _businessId,vendorId: _vendorId,ratingMin: _ratingMin,ratingMax: _ratingMax,dateFrom: _dateFrom,dateTo: _dateTo,offset: _offset,limit: _limit,); + return _dataConnect.query("filterClientFeedbacks", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterClientFeedbacksClientFeedbacks { + final String id; + final String businessId; + final String vendorId; + final int? rating; + final String? comment; + final Timestamp? date; + final FilterClientFeedbacksClientFeedbacksBusiness business; + final FilterClientFeedbacksClientFeedbacksVendor vendor; + FilterClientFeedbacksClientFeedbacks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + rating = json['rating'] == null ? null : nativeFromJson(json['rating']), + comment = json['comment'] == null ? null : nativeFromJson(json['comment']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + business = FilterClientFeedbacksClientFeedbacksBusiness.fromJson(json['business']), + vendor = FilterClientFeedbacksClientFeedbacksVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterClientFeedbacksClientFeedbacks otherTyped = other as FilterClientFeedbacksClientFeedbacks; + return id == otherTyped.id && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if (rating != null) { + json['rating'] = nativeToJson(rating); + } + if (comment != null) { + json['comment'] = nativeToJson(comment); + } + if (date != null) { + json['date'] = date!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + FilterClientFeedbacksClientFeedbacks({ + required this.id, + required this.businessId, + required this.vendorId, + this.rating, + this.comment, + this.date, + required this.business, + required this.vendor, + }); +} + +@immutable +class FilterClientFeedbacksClientFeedbacksBusiness { + final String id; + final String businessName; + FilterClientFeedbacksClientFeedbacksBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterClientFeedbacksClientFeedbacksBusiness otherTyped = other as FilterClientFeedbacksClientFeedbacksBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + FilterClientFeedbacksClientFeedbacksBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class FilterClientFeedbacksClientFeedbacksVendor { + final String id; + final String companyName; + FilterClientFeedbacksClientFeedbacksVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterClientFeedbacksClientFeedbacksVendor otherTyped = other as FilterClientFeedbacksClientFeedbacksVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + FilterClientFeedbacksClientFeedbacksVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class FilterClientFeedbacksData { + final List clientFeedbacks; + FilterClientFeedbacksData.fromJson(dynamic json): + + clientFeedbacks = (json['clientFeedbacks'] as List) + .map((e) => FilterClientFeedbacksClientFeedbacks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterClientFeedbacksData otherTyped = other as FilterClientFeedbacksData; + return clientFeedbacks == otherTyped.clientFeedbacks; + + } + @override + int get hashCode => clientFeedbacks.hashCode; + + + Map toJson() { + Map json = {}; + json['clientFeedbacks'] = clientFeedbacks.map((e) => e.toJson()).toList(); + return json; + } + + FilterClientFeedbacksData({ + required this.clientFeedbacks, + }); +} + +@immutable +class FilterClientFeedbacksVariables { + late final OptionalbusinessId; + late final OptionalvendorId; + late final OptionalratingMin; + late final OptionalratingMax; + late final OptionaldateFrom; + late final OptionaldateTo; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterClientFeedbacksVariables.fromJson(Map json) { + + + businessId = Optional.optional(nativeFromJson, nativeToJson); + businessId.value = json['businessId'] == null ? null : nativeFromJson(json['businessId']); + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + ratingMin = Optional.optional(nativeFromJson, nativeToJson); + ratingMin.value = json['ratingMin'] == null ? null : nativeFromJson(json['ratingMin']); + + + ratingMax = Optional.optional(nativeFromJson, nativeToJson); + ratingMax.value = json['ratingMax'] == null ? null : nativeFromJson(json['ratingMax']); + + + dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + dateFrom.value = json['dateFrom'] == null ? null : Timestamp.fromJson(json['dateFrom']); + + + dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + dateTo.value = json['dateTo'] == null ? null : Timestamp.fromJson(json['dateTo']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterClientFeedbacksVariables otherTyped = other as FilterClientFeedbacksVariables; + return businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + ratingMin == otherTyped.ratingMin && + ratingMax == otherTyped.ratingMax && + dateFrom == otherTyped.dateFrom && + dateTo == otherTyped.dateTo && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, vendorId.hashCode, ratingMin.hashCode, ratingMax.hashCode, dateFrom.hashCode, dateTo.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(businessId.state == OptionalState.set) { + json['businessId'] = businessId.toJson(); + } + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(ratingMin.state == OptionalState.set) { + json['ratingMin'] = ratingMin.toJson(); + } + if(ratingMax.state == OptionalState.set) { + json['ratingMax'] = ratingMax.toJson(); + } + if(dateFrom.state == OptionalState.set) { + json['dateFrom'] = dateFrom.toJson(); + } + if(dateTo.state == OptionalState.set) { + json['dateTo'] = dateTo.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterClientFeedbacksVariables({ + required this.businessId, + required this.vendorId, + required this.ratingMin, + required this.ratingMax, + required this.dateFrom, + required this.dateTo, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_conversations.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_conversations.dart new file mode 100644 index 00000000..779cbb30 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_conversations.dart @@ -0,0 +1,285 @@ +part of 'generated.dart'; + +class FilterConversationsVariablesBuilder { + Optional _status = Optional.optional((data) => ConversationStatus.values.byName(data), enumSerializer); + Optional _conversationType = Optional.optional((data) => ConversationType.values.byName(data), enumSerializer); + Optional _isGroup = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastMessageAfter = Optional.optional((json) => json['lastMessageAfter'] = Timestamp.fromJson(json['lastMessageAfter']), defaultSerializer); + Optional _lastMessageBefore = Optional.optional((json) => json['lastMessageBefore'] = Timestamp.fromJson(json['lastMessageBefore']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterConversationsVariablesBuilder status(ConversationStatus? t) { + _status.value = t; + return this; + } + FilterConversationsVariablesBuilder conversationType(ConversationType? t) { + _conversationType.value = t; + return this; + } + FilterConversationsVariablesBuilder isGroup(bool? t) { + _isGroup.value = t; + return this; + } + FilterConversationsVariablesBuilder lastMessageAfter(Timestamp? t) { + _lastMessageAfter.value = t; + return this; + } + FilterConversationsVariablesBuilder lastMessageBefore(Timestamp? t) { + _lastMessageBefore.value = t; + return this; + } + FilterConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterConversationsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterConversationsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterConversationsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterConversationsVariables vars= FilterConversationsVariables(status: _status,conversationType: _conversationType,isGroup: _isGroup,lastMessageAfter: _lastMessageAfter,lastMessageBefore: _lastMessageBefore,offset: _offset,limit: _limit,); + return _dataConnect.query("filterConversations", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterConversationsConversations { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + FilterConversationsConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterConversationsConversations otherTyped = other as FilterConversationsConversations; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + FilterConversationsConversations({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class FilterConversationsData { + final List conversations; + FilterConversationsData.fromJson(dynamic json): + + conversations = (json['conversations'] as List) + .map((e) => FilterConversationsConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterConversationsData otherTyped = other as FilterConversationsData; + return conversations == otherTyped.conversations; + + } + @override + int get hashCode => conversations.hashCode; + + + Map toJson() { + Map json = {}; + json['conversations'] = conversations.map((e) => e.toJson()).toList(); + return json; + } + + FilterConversationsData({ + required this.conversations, + }); +} + +@immutable +class FilterConversationsVariables { + late final Optionalstatus; + late final OptionalconversationType; + late final OptionalisGroup; + late final OptionallastMessageAfter; + late final OptionallastMessageBefore; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterConversationsVariables.fromJson(Map json) { + + + status = Optional.optional((data) => ConversationStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : ConversationStatus.values.byName(json['status']); + + + conversationType = Optional.optional((data) => ConversationType.values.byName(data), enumSerializer); + conversationType.value = json['conversationType'] == null ? null : ConversationType.values.byName(json['conversationType']); + + + isGroup = Optional.optional(nativeFromJson, nativeToJson); + isGroup.value = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']); + + + lastMessageAfter = Optional.optional((json) => json['lastMessageAfter'] = Timestamp.fromJson(json['lastMessageAfter']), defaultSerializer); + lastMessageAfter.value = json['lastMessageAfter'] == null ? null : Timestamp.fromJson(json['lastMessageAfter']); + + + lastMessageBefore = Optional.optional((json) => json['lastMessageBefore'] = Timestamp.fromJson(json['lastMessageBefore']), defaultSerializer); + lastMessageBefore.value = json['lastMessageBefore'] == null ? null : Timestamp.fromJson(json['lastMessageBefore']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterConversationsVariables otherTyped = other as FilterConversationsVariables; + return status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + lastMessageAfter == otherTyped.lastMessageAfter && + lastMessageBefore == otherTyped.lastMessageBefore && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, conversationType.hashCode, isGroup.hashCode, lastMessageAfter.hashCode, lastMessageBefore.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(conversationType.state == OptionalState.set) { + json['conversationType'] = conversationType.toJson(); + } + if(isGroup.state == OptionalState.set) { + json['isGroup'] = isGroup.toJson(); + } + if(lastMessageAfter.state == OptionalState.set) { + json['lastMessageAfter'] = lastMessageAfter.toJson(); + } + if(lastMessageBefore.state == OptionalState.set) { + json['lastMessageBefore'] = lastMessageBefore.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterConversationsVariables({ + required this.status, + required this.conversationType, + required this.isGroup, + required this.lastMessageAfter, + required this.lastMessageBefore, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_courses.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_courses.dart new file mode 100644 index 00000000..0e0b44a3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_courses.dart @@ -0,0 +1,250 @@ +part of 'generated.dart'; + +class FilterCoursesVariablesBuilder { + Optional _categoryId = Optional.optional(nativeFromJson, nativeToJson); + Optional _isCertification = Optional.optional(nativeFromJson, nativeToJson); + Optional _levelRequired = Optional.optional(nativeFromJson, nativeToJson); + Optional _completed = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterCoursesVariablesBuilder categoryId(String? t) { + _categoryId.value = t; + return this; + } + FilterCoursesVariablesBuilder isCertification(bool? t) { + _isCertification.value = t; + return this; + } + FilterCoursesVariablesBuilder levelRequired(String? t) { + _levelRequired.value = t; + return this; + } + FilterCoursesVariablesBuilder completed(bool? t) { + _completed.value = t; + return this; + } + + FilterCoursesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterCoursesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterCoursesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterCoursesVariables vars= FilterCoursesVariables(categoryId: _categoryId,isCertification: _isCertification,levelRequired: _levelRequired,completed: _completed,); + return _dataConnect.query("filterCourses", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterCoursesCourses { + final String id; + final String? title; + final String categoryId; + final String? levelRequired; + final bool? isCertification; + final FilterCoursesCoursesCategory category; + FilterCoursesCourses.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + categoryId = nativeFromJson(json['categoryId']), + levelRequired = json['levelRequired'] == null ? null : nativeFromJson(json['levelRequired']), + isCertification = json['isCertification'] == null ? null : nativeFromJson(json['isCertification']), + category = FilterCoursesCoursesCategory.fromJson(json['category']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterCoursesCourses otherTyped = other as FilterCoursesCourses; + return id == otherTyped.id && + title == otherTyped.title && + categoryId == otherTyped.categoryId && + levelRequired == otherTyped.levelRequired && + isCertification == otherTyped.isCertification && + category == otherTyped.category; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, categoryId.hashCode, levelRequired.hashCode, isCertification.hashCode, category.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + json['categoryId'] = nativeToJson(categoryId); + if (levelRequired != null) { + json['levelRequired'] = nativeToJson(levelRequired); + } + if (isCertification != null) { + json['isCertification'] = nativeToJson(isCertification); + } + json['category'] = category.toJson(); + return json; + } + + FilterCoursesCourses({ + required this.id, + this.title, + required this.categoryId, + this.levelRequired, + this.isCertification, + required this.category, + }); +} + +@immutable +class FilterCoursesCoursesCategory { + final String id; + final String label; + FilterCoursesCoursesCategory.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + label = nativeFromJson(json['label']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterCoursesCoursesCategory otherTyped = other as FilterCoursesCoursesCategory; + return id == otherTyped.id && + label == otherTyped.label; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, label.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['label'] = nativeToJson(label); + return json; + } + + FilterCoursesCoursesCategory({ + required this.id, + required this.label, + }); +} + +@immutable +class FilterCoursesData { + final List courses; + FilterCoursesData.fromJson(dynamic json): + + courses = (json['courses'] as List) + .map((e) => FilterCoursesCourses.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterCoursesData otherTyped = other as FilterCoursesData; + return courses == otherTyped.courses; + + } + @override + int get hashCode => courses.hashCode; + + + Map toJson() { + Map json = {}; + json['courses'] = courses.map((e) => e.toJson()).toList(); + return json; + } + + FilterCoursesData({ + required this.courses, + }); +} + +@immutable +class FilterCoursesVariables { + late final OptionalcategoryId; + late final OptionalisCertification; + late final OptionallevelRequired; + late final Optionalcompleted; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterCoursesVariables.fromJson(Map json) { + + + categoryId = Optional.optional(nativeFromJson, nativeToJson); + categoryId.value = json['categoryId'] == null ? null : nativeFromJson(json['categoryId']); + + + isCertification = Optional.optional(nativeFromJson, nativeToJson); + isCertification.value = json['isCertification'] == null ? null : nativeFromJson(json['isCertification']); + + + levelRequired = Optional.optional(nativeFromJson, nativeToJson); + levelRequired.value = json['levelRequired'] == null ? null : nativeFromJson(json['levelRequired']); + + + completed = Optional.optional(nativeFromJson, nativeToJson); + completed.value = json['completed'] == null ? null : nativeFromJson(json['completed']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterCoursesVariables otherTyped = other as FilterCoursesVariables; + return categoryId == otherTyped.categoryId && + isCertification == otherTyped.isCertification && + levelRequired == otherTyped.levelRequired && + completed == otherTyped.completed; + + } + @override + int get hashCode => Object.hashAll([categoryId.hashCode, isCertification.hashCode, levelRequired.hashCode, completed.hashCode]); + + + Map toJson() { + Map json = {}; + if(categoryId.state == OptionalState.set) { + json['categoryId'] = categoryId.toJson(); + } + if(isCertification.state == OptionalState.set) { + json['isCertification'] = isCertification.toJson(); + } + if(levelRequired.state == OptionalState.set) { + json['levelRequired'] = levelRequired.toJson(); + } + if(completed.state == OptionalState.set) { + json['completed'] = completed.toJson(); + } + return json; + } + + FilterCoursesVariables({ + required this.categoryId, + required this.isCertification, + required this.levelRequired, + required this.completed, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_documents.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_documents.dart new file mode 100644 index 00000000..37bb2dec --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_documents.dart @@ -0,0 +1,161 @@ +part of 'generated.dart'; + +class FilterDocumentsVariablesBuilder { + Optional _documentType = Optional.optional((data) => DocumentType.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; + FilterDocumentsVariablesBuilder documentType(DocumentType? t) { + _documentType.value = t; + return this; + } + + FilterDocumentsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterDocumentsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterDocumentsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterDocumentsVariables vars= FilterDocumentsVariables(documentType: _documentType,); + return _dataConnect.query("filterDocuments", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterDocumentsDocuments { + final String id; + final EnumValue documentType; + final String name; + final String? description; + final Timestamp? createdAt; + FilterDocumentsDocuments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + documentType = documentTypeDeserializer(json['documentType']), + name = nativeFromJson(json['name']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterDocumentsDocuments otherTyped = other as FilterDocumentsDocuments; + return id == otherTyped.id && + documentType == otherTyped.documentType && + name == otherTyped.name && + description == otherTyped.description && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, documentType.hashCode, name.hashCode, description.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['documentType'] = + documentTypeSerializer(documentType) + ; + json['name'] = nativeToJson(name); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + FilterDocumentsDocuments({ + required this.id, + required this.documentType, + required this.name, + this.description, + this.createdAt, + }); +} + +@immutable +class FilterDocumentsData { + final List documents; + FilterDocumentsData.fromJson(dynamic json): + + documents = (json['documents'] as List) + .map((e) => FilterDocumentsDocuments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterDocumentsData otherTyped = other as FilterDocumentsData; + return documents == otherTyped.documents; + + } + @override + int get hashCode => documents.hashCode; + + + Map toJson() { + Map json = {}; + json['documents'] = documents.map((e) => e.toJson()).toList(); + return json; + } + + FilterDocumentsData({ + required this.documents, + }); +} + +@immutable +class FilterDocumentsVariables { + late final OptionaldocumentType; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterDocumentsVariables.fromJson(Map json) { + + + documentType = Optional.optional((data) => DocumentType.values.byName(data), enumSerializer); + documentType.value = json['documentType'] == null ? null : DocumentType.values.byName(json['documentType']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterDocumentsVariables otherTyped = other as FilterDocumentsVariables; + return documentType == otherTyped.documentType; + + } + @override + int get hashCode => documentType.hashCode; + + + Map toJson() { + Map json = {}; + if(documentType.state == OptionalState.set) { + json['documentType'] = documentType.toJson(); + } + return json; + } + + FilterDocumentsVariables({ + required this.documentType, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_faq_datas.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_faq_datas.dart new file mode 100644 index 00000000..dc3778b1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_faq_datas.dart @@ -0,0 +1,149 @@ +part of 'generated.dart'; + +class FilterFaqDatasVariablesBuilder { + Optional _category = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterFaqDatasVariablesBuilder category(String? t) { + _category.value = t; + return this; + } + + FilterFaqDatasVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterFaqDatasData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterFaqDatasVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterFaqDatasVariables vars= FilterFaqDatasVariables(category: _category,); + return _dataConnect.query("filterFaqDatas", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterFaqDatasFaqDatas { + final String id; + final String category; + final List? questions; + FilterFaqDatasFaqDatas.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + category = nativeFromJson(json['category']), + questions = json['questions'] == null ? null : (json['questions'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterFaqDatasFaqDatas otherTyped = other as FilterFaqDatasFaqDatas; + return id == otherTyped.id && + category == otherTyped.category && + questions == otherTyped.questions; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, category.hashCode, questions.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['category'] = nativeToJson(category); + if (questions != null) { + json['questions'] = questions?.map((e) => e!.toJson()).toList(); + } + return json; + } + + FilterFaqDatasFaqDatas({ + required this.id, + required this.category, + this.questions, + }); +} + +@immutable +class FilterFaqDatasData { + final List faqDatas; + FilterFaqDatasData.fromJson(dynamic json): + + faqDatas = (json['faqDatas'] as List) + .map((e) => FilterFaqDatasFaqDatas.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterFaqDatasData otherTyped = other as FilterFaqDatasData; + return faqDatas == otherTyped.faqDatas; + + } + @override + int get hashCode => faqDatas.hashCode; + + + Map toJson() { + Map json = {}; + json['faqDatas'] = faqDatas.map((e) => e.toJson()).toList(); + return json; + } + + FilterFaqDatasData({ + required this.faqDatas, + }); +} + +@immutable +class FilterFaqDatasVariables { + late final Optionalcategory; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterFaqDatasVariables.fromJson(Map json) { + + + category = Optional.optional(nativeFromJson, nativeToJson); + category.value = json['category'] == null ? null : nativeFromJson(json['category']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterFaqDatasVariables otherTyped = other as FilterFaqDatasVariables; + return category == otherTyped.category; + + } + @override + int get hashCode => category.hashCode; + + + Map toJson() { + Map json = {}; + if(category.state == OptionalState.set) { + json['category'] = category.toJson(); + } + return json; + } + + FilterFaqDatasVariables({ + required this.category, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_hubs.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_hubs.dart new file mode 100644 index 00000000..cc3484c8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_hubs.dart @@ -0,0 +1,196 @@ +part of 'generated.dart'; + +class FilterHubsVariablesBuilder { + Optional _ownerId = Optional.optional(nativeFromJson, nativeToJson); + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _nfcTagId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterHubsVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + FilterHubsVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + FilterHubsVariablesBuilder nfcTagId(String? t) { + _nfcTagId.value = t; + return this; + } + + FilterHubsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterHubsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterHubsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterHubsVariables vars= FilterHubsVariables(ownerId: _ownerId,name: _name,nfcTagId: _nfcTagId,); + return _dataConnect.query("filterHubs", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterHubsHubs { + final String id; + final String name; + final String? locationName; + final String? address; + final String? nfcTagId; + final String ownerId; + FilterHubsHubs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + locationName = json['locationName'] == null ? null : nativeFromJson(json['locationName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + nfcTagId = json['nfcTagId'] == null ? null : nativeFromJson(json['nfcTagId']), + ownerId = nativeFromJson(json['ownerId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterHubsHubs otherTyped = other as FilterHubsHubs; + return id == otherTyped.id && + name == otherTyped.name && + locationName == otherTyped.locationName && + address == otherTyped.address && + nfcTagId == otherTyped.nfcTagId && + ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, locationName.hashCode, address.hashCode, nfcTagId.hashCode, ownerId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (locationName != null) { + json['locationName'] = nativeToJson(locationName); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (nfcTagId != null) { + json['nfcTagId'] = nativeToJson(nfcTagId); + } + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + FilterHubsHubs({ + required this.id, + required this.name, + this.locationName, + this.address, + this.nfcTagId, + required this.ownerId, + }); +} + +@immutable +class FilterHubsData { + final List hubs; + FilterHubsData.fromJson(dynamic json): + + hubs = (json['hubs'] as List) + .map((e) => FilterHubsHubs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterHubsData otherTyped = other as FilterHubsData; + return hubs == otherTyped.hubs; + + } + @override + int get hashCode => hubs.hashCode; + + + Map toJson() { + Map json = {}; + json['hubs'] = hubs.map((e) => e.toJson()).toList(); + return json; + } + + FilterHubsData({ + required this.hubs, + }); +} + +@immutable +class FilterHubsVariables { + late final OptionalownerId; + late final Optionalname; + late final OptionalnfcTagId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterHubsVariables.fromJson(Map json) { + + + ownerId = Optional.optional(nativeFromJson, nativeToJson); + ownerId.value = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']); + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + nfcTagId = Optional.optional(nativeFromJson, nativeToJson); + nfcTagId.value = json['nfcTagId'] == null ? null : nativeFromJson(json['nfcTagId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterHubsVariables otherTyped = other as FilterHubsVariables; + return ownerId == otherTyped.ownerId && + name == otherTyped.name && + nfcTagId == otherTyped.nfcTagId; + + } + @override + int get hashCode => Object.hashAll([ownerId.hashCode, name.hashCode, nfcTagId.hashCode]); + + + Map toJson() { + Map json = {}; + if(ownerId.state == OptionalState.set) { + json['ownerId'] = ownerId.toJson(); + } + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(nfcTagId.state == OptionalState.set) { + json['nfcTagId'] = nfcTagId.toJson(); + } + return json; + } + + FilterHubsVariables({ + required this.ownerId, + required this.name, + required this.nfcTagId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_invoices.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_invoices.dart new file mode 100644 index 00000000..6a4dd128 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_invoices.dart @@ -0,0 +1,594 @@ +part of 'generated.dart'; + +class FilterInvoicesVariablesBuilder { + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _businessId = Optional.optional(nativeFromJson, nativeToJson); + Optional _orderId = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => InvoiceStatus.values.byName(data), enumSerializer); + Optional _issueDateFrom = Optional.optional((json) => json['issueDateFrom'] = Timestamp.fromJson(json['issueDateFrom']), defaultSerializer); + Optional _issueDateTo = Optional.optional((json) => json['issueDateTo'] = Timestamp.fromJson(json['issueDateTo']), defaultSerializer); + Optional _dueDateFrom = Optional.optional((json) => json['dueDateFrom'] = Timestamp.fromJson(json['dueDateFrom']), defaultSerializer); + Optional _dueDateTo = Optional.optional((json) => json['dueDateTo'] = Timestamp.fromJson(json['dueDateTo']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterInvoicesVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + FilterInvoicesVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + FilterInvoicesVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + FilterInvoicesVariablesBuilder status(InvoiceStatus? t) { + _status.value = t; + return this; + } + FilterInvoicesVariablesBuilder issueDateFrom(Timestamp? t) { + _issueDateFrom.value = t; + return this; + } + FilterInvoicesVariablesBuilder issueDateTo(Timestamp? t) { + _issueDateTo.value = t; + return this; + } + FilterInvoicesVariablesBuilder dueDateFrom(Timestamp? t) { + _dueDateFrom.value = t; + return this; + } + FilterInvoicesVariablesBuilder dueDateTo(Timestamp? t) { + _dueDateTo.value = t; + return this; + } + FilterInvoicesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterInvoicesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterInvoicesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterInvoicesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterInvoicesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterInvoicesVariables vars= FilterInvoicesVariables(vendorId: _vendorId,businessId: _businessId,orderId: _orderId,status: _status,issueDateFrom: _issueDateFrom,issueDateTo: _issueDateTo,dueDateFrom: _dueDateFrom,dueDateTo: _dueDateTo,offset: _offset,limit: _limit,); + return _dataConnect.query("filterInvoices", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterInvoicesInvoices { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final FilterInvoicesInvoicesVendor vendor; + final FilterInvoicesInvoicesBusiness business; + final FilterInvoicesInvoicesOrder order; + FilterInvoicesInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = FilterInvoicesInvoicesVendor.fromJson(json['vendor']), + business = FilterInvoicesInvoicesBusiness.fromJson(json['business']), + order = FilterInvoicesInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterInvoicesInvoices otherTyped = other as FilterInvoicesInvoices; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + FilterInvoicesInvoices({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class FilterInvoicesInvoicesVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + FilterInvoicesInvoicesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterInvoicesInvoicesVendor otherTyped = other as FilterInvoicesInvoicesVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + FilterInvoicesInvoicesVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class FilterInvoicesInvoicesBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + FilterInvoicesInvoicesBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterInvoicesInvoicesBusiness otherTyped = other as FilterInvoicesInvoicesBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + FilterInvoicesInvoicesBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class FilterInvoicesInvoicesOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + FilterInvoicesInvoicesOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterInvoicesInvoicesOrder otherTyped = other as FilterInvoicesInvoicesOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + FilterInvoicesInvoicesOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class FilterInvoicesData { + final List invoices; + FilterInvoicesData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => FilterInvoicesInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterInvoicesData otherTyped = other as FilterInvoicesData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + FilterInvoicesData({ + required this.invoices, + }); +} + +@immutable +class FilterInvoicesVariables { + late final OptionalvendorId; + late final OptionalbusinessId; + late final OptionalorderId; + late final Optionalstatus; + late final OptionalissueDateFrom; + late final OptionalissueDateTo; + late final OptionaldueDateFrom; + late final OptionaldueDateTo; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterInvoicesVariables.fromJson(Map json) { + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + businessId = Optional.optional(nativeFromJson, nativeToJson); + businessId.value = json['businessId'] == null ? null : nativeFromJson(json['businessId']); + + + orderId = Optional.optional(nativeFromJson, nativeToJson); + orderId.value = json['orderId'] == null ? null : nativeFromJson(json['orderId']); + + + status = Optional.optional((data) => InvoiceStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : InvoiceStatus.values.byName(json['status']); + + + issueDateFrom = Optional.optional((json) => json['issueDateFrom'] = Timestamp.fromJson(json['issueDateFrom']), defaultSerializer); + issueDateFrom.value = json['issueDateFrom'] == null ? null : Timestamp.fromJson(json['issueDateFrom']); + + + issueDateTo = Optional.optional((json) => json['issueDateTo'] = Timestamp.fromJson(json['issueDateTo']), defaultSerializer); + issueDateTo.value = json['issueDateTo'] == null ? null : Timestamp.fromJson(json['issueDateTo']); + + + dueDateFrom = Optional.optional((json) => json['dueDateFrom'] = Timestamp.fromJson(json['dueDateFrom']), defaultSerializer); + dueDateFrom.value = json['dueDateFrom'] == null ? null : Timestamp.fromJson(json['dueDateFrom']); + + + dueDateTo = Optional.optional((json) => json['dueDateTo'] = Timestamp.fromJson(json['dueDateTo']), defaultSerializer); + dueDateTo.value = json['dueDateTo'] == null ? null : Timestamp.fromJson(json['dueDateTo']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterInvoicesVariables otherTyped = other as FilterInvoicesVariables; + return vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + status == otherTyped.status && + issueDateFrom == otherTyped.issueDateFrom && + issueDateTo == otherTyped.issueDateTo && + dueDateFrom == otherTyped.dueDateFrom && + dueDateTo == otherTyped.dueDateTo && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, businessId.hashCode, orderId.hashCode, status.hashCode, issueDateFrom.hashCode, issueDateTo.hashCode, dueDateFrom.hashCode, dueDateTo.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(businessId.state == OptionalState.set) { + json['businessId'] = businessId.toJson(); + } + if(orderId.state == OptionalState.set) { + json['orderId'] = orderId.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(issueDateFrom.state == OptionalState.set) { + json['issueDateFrom'] = issueDateFrom.toJson(); + } + if(issueDateTo.state == OptionalState.set) { + json['issueDateTo'] = issueDateTo.toJson(); + } + if(dueDateFrom.state == OptionalState.set) { + json['dueDateFrom'] = dueDateFrom.toJson(); + } + if(dueDateTo.state == OptionalState.set) { + json['dueDateTo'] = dueDateTo.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterInvoicesVariables({ + required this.vendorId, + required this.businessId, + required this.orderId, + required this.status, + required this.issueDateFrom, + required this.issueDateTo, + required this.dueDateFrom, + required this.dueDateTo, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_levels.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_levels.dart new file mode 100644 index 00000000..230ed4e5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_levels.dart @@ -0,0 +1,174 @@ +part of 'generated.dart'; + +class FilterLevelsVariablesBuilder { + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _xpRequired = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterLevelsVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + FilterLevelsVariablesBuilder xpRequired(int? t) { + _xpRequired.value = t; + return this; + } + + FilterLevelsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterLevelsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterLevelsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterLevelsVariables vars= FilterLevelsVariables(name: _name,xpRequired: _xpRequired,); + return _dataConnect.query("filterLevels", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterLevelsLevels { + final String id; + final String name; + final int xpRequired; + final String? icon; + final AnyValue? colors; + FilterLevelsLevels.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + xpRequired = nativeFromJson(json['xpRequired']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + colors = json['colors'] == null ? null : AnyValue.fromJson(json['colors']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterLevelsLevels otherTyped = other as FilterLevelsLevels; + return id == otherTyped.id && + name == otherTyped.name && + xpRequired == otherTyped.xpRequired && + icon == otherTyped.icon && + colors == otherTyped.colors; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, xpRequired.hashCode, icon.hashCode, colors.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['xpRequired'] = nativeToJson(xpRequired); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (colors != null) { + json['colors'] = colors!.toJson(); + } + return json; + } + + FilterLevelsLevels({ + required this.id, + required this.name, + required this.xpRequired, + this.icon, + this.colors, + }); +} + +@immutable +class FilterLevelsData { + final List levels; + FilterLevelsData.fromJson(dynamic json): + + levels = (json['levels'] as List) + .map((e) => FilterLevelsLevels.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterLevelsData otherTyped = other as FilterLevelsData; + return levels == otherTyped.levels; + + } + @override + int get hashCode => levels.hashCode; + + + Map toJson() { + Map json = {}; + json['levels'] = levels.map((e) => e.toJson()).toList(); + return json; + } + + FilterLevelsData({ + required this.levels, + }); +} + +@immutable +class FilterLevelsVariables { + late final Optionalname; + late final OptionalxpRequired; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterLevelsVariables.fromJson(Map json) { + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + xpRequired = Optional.optional(nativeFromJson, nativeToJson); + xpRequired.value = json['xpRequired'] == null ? null : nativeFromJson(json['xpRequired']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterLevelsVariables otherTyped = other as FilterLevelsVariables; + return name == otherTyped.name && + xpRequired == otherTyped.xpRequired; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, xpRequired.hashCode]); + + + Map toJson() { + Map json = {}; + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(xpRequired.state == OptionalState.set) { + json['xpRequired'] = xpRequired.toJson(); + } + return json; + } + + FilterLevelsVariables({ + required this.name, + required this.xpRequired, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_shifts.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_shifts.dart new file mode 100644 index 00000000..b0c9a362 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_shifts.dart @@ -0,0 +1,529 @@ +part of 'generated.dart'; + +class FilterShiftsVariablesBuilder { + Optional _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); + Optional _orderId = Optional.optional(nativeFromJson, nativeToJson); + Optional _dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + Optional _dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterShiftsVariablesBuilder status(ShiftStatus? t) { + _status.value = t; + return this; + } + FilterShiftsVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + FilterShiftsVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + FilterShiftsVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + FilterShiftsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterShiftsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterShiftsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterShiftsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterShiftsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterShiftsVariables vars= FilterShiftsVariables(status: _status,orderId: _orderId,dateFrom: _dateFrom,dateTo: _dateTo,offset: _offset,limit: _limit,); + return _dataConnect.query("filterShifts", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterShiftsShifts { + final String id; + final String title; + final String orderId; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? cost; + final String? location; + final String? locationAddress; + final double? latitude; + final double? longitude; + final String? description; + final EnumValue? status; + final int? workersNeeded; + final int? filled; + final Timestamp? filledAt; + final List? managers; + final int? durationDays; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final FilterShiftsShiftsOrder order; + FilterShiftsShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + orderId = nativeFromJson(json['orderId']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + cost = json['cost'] == null ? null : nativeFromJson(json['cost']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + latitude = json['latitude'] == null ? null : nativeFromJson(json['latitude']), + longitude = json['longitude'] == null ? null : nativeFromJson(json['longitude']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + filledAt = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']), + managers = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + durationDays = json['durationDays'] == null ? null : nativeFromJson(json['durationDays']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + order = FilterShiftsShiftsOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterShiftsShifts otherTyped = other as FilterShiftsShifts; + return id == otherTyped.id && + title == otherTyped.title && + orderId == otherTyped.orderId && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + cost == otherTyped.cost && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + description == otherTyped.description && + status == otherTyped.status && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + filledAt == otherTyped.filledAt && + managers == otherTyped.managers && + durationDays == otherTyped.durationDays && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + json['orderId'] = nativeToJson(orderId); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (cost != null) { + json['cost'] = nativeToJson(cost); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (latitude != null) { + json['latitude'] = nativeToJson(latitude); + } + if (longitude != null) { + json['longitude'] = nativeToJson(longitude); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (filledAt != null) { + json['filledAt'] = filledAt!.toJson(); + } + if (managers != null) { + json['managers'] = managers?.map((e) => e!.toJson()).toList(); + } + if (durationDays != null) { + json['durationDays'] = nativeToJson(durationDays); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['order'] = order.toJson(); + return json; + } + + FilterShiftsShifts({ + required this.id, + required this.title, + required this.orderId, + this.date, + this.startTime, + this.endTime, + this.hours, + this.cost, + this.location, + this.locationAddress, + this.latitude, + this.longitude, + this.description, + this.status, + this.workersNeeded, + this.filled, + this.filledAt, + this.managers, + this.durationDays, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.order, + }); +} + +@immutable +class FilterShiftsShiftsOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + final String businessId; + final String vendorId; + final FilterShiftsShiftsOrderBusiness business; + final FilterShiftsShiftsOrderVendor vendor; + FilterShiftsShiftsOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + business = FilterShiftsShiftsOrderBusiness.fromJson(json['business']), + vendor = FilterShiftsShiftsOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterShiftsShiftsOrder otherTyped = other as FilterShiftsShiftsOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode, businessId.hashCode, vendorId.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + FilterShiftsShiftsOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + required this.businessId, + required this.vendorId, + required this.business, + required this.vendor, + }); +} + +@immutable +class FilterShiftsShiftsOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + FilterShiftsShiftsOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterShiftsShiftsOrderBusiness otherTyped = other as FilterShiftsShiftsOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + FilterShiftsShiftsOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class FilterShiftsShiftsOrderVendor { + final String id; + final String companyName; + FilterShiftsShiftsOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterShiftsShiftsOrderVendor otherTyped = other as FilterShiftsShiftsOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + FilterShiftsShiftsOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class FilterShiftsData { + final List shifts; + FilterShiftsData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => FilterShiftsShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterShiftsData otherTyped = other as FilterShiftsData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + FilterShiftsData({ + required this.shifts, + }); +} + +@immutable +class FilterShiftsVariables { + late final Optionalstatus; + late final OptionalorderId; + late final OptionaldateFrom; + late final OptionaldateTo; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterShiftsVariables.fromJson(Map json) { + + + status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : ShiftStatus.values.byName(json['status']); + + + orderId = Optional.optional(nativeFromJson, nativeToJson); + orderId.value = json['orderId'] == null ? null : nativeFromJson(json['orderId']); + + + dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + dateFrom.value = json['dateFrom'] == null ? null : Timestamp.fromJson(json['dateFrom']); + + + dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + dateTo.value = json['dateTo'] == null ? null : Timestamp.fromJson(json['dateTo']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterShiftsVariables otherTyped = other as FilterShiftsVariables; + return status == otherTyped.status && + orderId == otherTyped.orderId && + dateFrom == otherTyped.dateFrom && + dateTo == otherTyped.dateTo && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, orderId.hashCode, dateFrom.hashCode, dateTo.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(orderId.state == OptionalState.set) { + json['orderId'] = orderId.toJson(); + } + if(dateFrom.state == OptionalState.set) { + json['dateFrom'] = dateFrom.toJson(); + } + if(dateTo.state == OptionalState.set) { + json['dateTo'] = dateTo.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterShiftsVariables({ + required this.status, + required this.orderId, + required this.dateFrom, + required this.dateTo, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff.dart new file mode 100644 index 00000000..a3df674f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff.dart @@ -0,0 +1,299 @@ +part of 'generated.dart'; + +class FilterStaffVariablesBuilder { + Optional _ownerId = Optional.optional(nativeFromJson, nativeToJson); + Optional _fullName = Optional.optional(nativeFromJson, nativeToJson); + Optional _level = Optional.optional(nativeFromJson, nativeToJson); + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterStaffVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + FilterStaffVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + FilterStaffVariablesBuilder level(String? t) { + _level.value = t; + return this; + } + FilterStaffVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + + FilterStaffVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterStaffData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterStaffVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterStaffVariables vars= FilterStaffVariables(ownerId: _ownerId,fullName: _fullName,level: _level,email: _email,); + return _dataConnect.query("filterStaff", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterStaffStaffs { + final String id; + final String userId; + final String fullName; + final String? level; + final String? phone; + final String? email; + final String? photoUrl; + final double? averageRating; + final int? reliabilityScore; + final int? totalShifts; + final String? ownerId; + final bool? isRecommended; + final EnumValue? backgroundCheckStatus; + final EnumValue? employmentType; + final String? initial; + final bool? englishRequired; + final String? city; + final String? addres; + FilterStaffStaffs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + fullName = nativeFromJson(json['fullName']), + level = json['level'] == null ? null : nativeFromJson(json['level']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + averageRating = json['averageRating'] == null ? null : nativeFromJson(json['averageRating']), + reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']), + totalShifts = json['totalShifts'] == null ? null : nativeFromJson(json['totalShifts']), + ownerId = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']), + isRecommended = json['isRecommended'] == null ? null : nativeFromJson(json['isRecommended']), + backgroundCheckStatus = json['backgroundCheckStatus'] == null ? null : backgroundCheckStatusDeserializer(json['backgroundCheckStatus']), + employmentType = json['employmentType'] == null ? null : employmentTypeDeserializer(json['employmentType']), + initial = json['initial'] == null ? null : nativeFromJson(json['initial']), + englishRequired = json['englishRequired'] == null ? null : nativeFromJson(json['englishRequired']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + addres = json['addres'] == null ? null : nativeFromJson(json['addres']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffStaffs otherTyped = other as FilterStaffStaffs; + return id == otherTyped.id && + userId == otherTyped.userId && + fullName == otherTyped.fullName && + level == otherTyped.level && + phone == otherTyped.phone && + email == otherTyped.email && + photoUrl == otherTyped.photoUrl && + averageRating == otherTyped.averageRating && + reliabilityScore == otherTyped.reliabilityScore && + totalShifts == otherTyped.totalShifts && + ownerId == otherTyped.ownerId && + isRecommended == otherTyped.isRecommended && + backgroundCheckStatus == otherTyped.backgroundCheckStatus && + employmentType == otherTyped.employmentType && + initial == otherTyped.initial && + englishRequired == otherTyped.englishRequired && + city == otherTyped.city && + addres == otherTyped.addres; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, averageRating.hashCode, reliabilityScore.hashCode, totalShifts.hashCode, ownerId.hashCode, isRecommended.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['fullName'] = nativeToJson(fullName); + if (level != null) { + json['level'] = nativeToJson(level); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (averageRating != null) { + json['averageRating'] = nativeToJson(averageRating); + } + if (reliabilityScore != null) { + json['reliabilityScore'] = nativeToJson(reliabilityScore); + } + if (totalShifts != null) { + json['totalShifts'] = nativeToJson(totalShifts); + } + if (ownerId != null) { + json['ownerId'] = nativeToJson(ownerId); + } + if (isRecommended != null) { + json['isRecommended'] = nativeToJson(isRecommended); + } + if (backgroundCheckStatus != null) { + json['backgroundCheckStatus'] = + backgroundCheckStatusSerializer(backgroundCheckStatus!) + ; + } + if (employmentType != null) { + json['employmentType'] = + employmentTypeSerializer(employmentType!) + ; + } + if (initial != null) { + json['initial'] = nativeToJson(initial); + } + if (englishRequired != null) { + json['englishRequired'] = nativeToJson(englishRequired); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (addres != null) { + json['addres'] = nativeToJson(addres); + } + return json; + } + + FilterStaffStaffs({ + required this.id, + required this.userId, + required this.fullName, + this.level, + this.phone, + this.email, + this.photoUrl, + this.averageRating, + this.reliabilityScore, + this.totalShifts, + this.ownerId, + this.isRecommended, + this.backgroundCheckStatus, + this.employmentType, + this.initial, + this.englishRequired, + this.city, + this.addres, + }); +} + +@immutable +class FilterStaffData { + final List staffs; + FilterStaffData.fromJson(dynamic json): + + staffs = (json['staffs'] as List) + .map((e) => FilterStaffStaffs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffData otherTyped = other as FilterStaffData; + return staffs == otherTyped.staffs; + + } + @override + int get hashCode => staffs.hashCode; + + + Map toJson() { + Map json = {}; + json['staffs'] = staffs.map((e) => e.toJson()).toList(); + return json; + } + + FilterStaffData({ + required this.staffs, + }); +} + +@immutable +class FilterStaffVariables { + late final OptionalownerId; + late final OptionalfullName; + late final Optionallevel; + late final Optionalemail; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterStaffVariables.fromJson(Map json) { + + + ownerId = Optional.optional(nativeFromJson, nativeToJson); + ownerId.value = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']); + + + fullName = Optional.optional(nativeFromJson, nativeToJson); + fullName.value = json['fullName'] == null ? null : nativeFromJson(json['fullName']); + + + level = Optional.optional(nativeFromJson, nativeToJson); + level.value = json['level'] == null ? null : nativeFromJson(json['level']); + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffVariables otherTyped = other as FilterStaffVariables; + return ownerId == otherTyped.ownerId && + fullName == otherTyped.fullName && + level == otherTyped.level && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([ownerId.hashCode, fullName.hashCode, level.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if(ownerId.state == OptionalState.set) { + json['ownerId'] = ownerId.toJson(); + } + if(fullName.state == OptionalState.set) { + json['fullName'] = fullName.toJson(); + } + if(level.state == OptionalState.set) { + json['level'] = level.toJson(); + } + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + return json; + } + + FilterStaffVariables({ + required this.ownerId, + required this.fullName, + required this.level, + required this.email, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff_availability_stats.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff_availability_stats.dart new file mode 100644 index 00000000..56c8cd85 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff_availability_stats.dart @@ -0,0 +1,389 @@ +part of 'generated.dart'; + +class FilterStaffAvailabilityStatsVariablesBuilder { + Optional _needWorkIndexMin = Optional.optional(nativeFromJson, nativeToJson); + Optional _needWorkIndexMax = Optional.optional(nativeFromJson, nativeToJson); + Optional _utilizationMin = Optional.optional(nativeFromJson, nativeToJson); + Optional _utilizationMax = Optional.optional(nativeFromJson, nativeToJson); + Optional _acceptanceRateMin = Optional.optional(nativeFromJson, nativeToJson); + Optional _acceptanceRateMax = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastShiftAfter = Optional.optional((json) => json['lastShiftAfter'] = Timestamp.fromJson(json['lastShiftAfter']), defaultSerializer); + Optional _lastShiftBefore = Optional.optional((json) => json['lastShiftBefore'] = Timestamp.fromJson(json['lastShiftBefore']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterStaffAvailabilityStatsVariablesBuilder needWorkIndexMin(int? t) { + _needWorkIndexMin.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder needWorkIndexMax(int? t) { + _needWorkIndexMax.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder utilizationMin(int? t) { + _utilizationMin.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder utilizationMax(int? t) { + _utilizationMax.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder acceptanceRateMin(int? t) { + _acceptanceRateMin.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder acceptanceRateMax(int? t) { + _acceptanceRateMax.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder lastShiftAfter(Timestamp? t) { + _lastShiftAfter.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder lastShiftBefore(Timestamp? t) { + _lastShiftBefore.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterStaffAvailabilityStatsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterStaffAvailabilityStatsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterStaffAvailabilityStatsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterStaffAvailabilityStatsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterStaffAvailabilityStatsVariables vars= FilterStaffAvailabilityStatsVariables(needWorkIndexMin: _needWorkIndexMin,needWorkIndexMax: _needWorkIndexMax,utilizationMin: _utilizationMin,utilizationMax: _utilizationMax,acceptanceRateMin: _acceptanceRateMin,acceptanceRateMax: _acceptanceRateMax,lastShiftAfter: _lastShiftAfter,lastShiftBefore: _lastShiftBefore,offset: _offset,limit: _limit,); + return _dataConnect.query("filterStaffAvailabilityStats", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterStaffAvailabilityStatsStaffAvailabilityStatss { + final String id; + final String staffId; + final int? needWorkIndex; + final int? utilizationPercentage; + final int? predictedAvailabilityScore; + final int? scheduledHoursThisPeriod; + final int? desiredHoursThisPeriod; + final Timestamp? lastShiftDate; + final int? acceptanceRate; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final FilterStaffAvailabilityStatsStaffAvailabilityStatssStaff staff; + FilterStaffAvailabilityStatsStaffAvailabilityStatss.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + needWorkIndex = json['needWorkIndex'] == null ? null : nativeFromJson(json['needWorkIndex']), + utilizationPercentage = json['utilizationPercentage'] == null ? null : nativeFromJson(json['utilizationPercentage']), + predictedAvailabilityScore = json['predictedAvailabilityScore'] == null ? null : nativeFromJson(json['predictedAvailabilityScore']), + scheduledHoursThisPeriod = json['scheduledHoursThisPeriod'] == null ? null : nativeFromJson(json['scheduledHoursThisPeriod']), + desiredHoursThisPeriod = json['desiredHoursThisPeriod'] == null ? null : nativeFromJson(json['desiredHoursThisPeriod']), + lastShiftDate = json['lastShiftDate'] == null ? null : Timestamp.fromJson(json['lastShiftDate']), + acceptanceRate = json['acceptanceRate'] == null ? null : nativeFromJson(json['acceptanceRate']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + staff = FilterStaffAvailabilityStatsStaffAvailabilityStatssStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffAvailabilityStatsStaffAvailabilityStatss otherTyped = other as FilterStaffAvailabilityStatsStaffAvailabilityStatss; + return id == otherTyped.id && + staffId == otherTyped.staffId && + needWorkIndex == otherTyped.needWorkIndex && + utilizationPercentage == otherTyped.utilizationPercentage && + predictedAvailabilityScore == otherTyped.predictedAvailabilityScore && + scheduledHoursThisPeriod == otherTyped.scheduledHoursThisPeriod && + desiredHoursThisPeriod == otherTyped.desiredHoursThisPeriod && + lastShiftDate == otherTyped.lastShiftDate && + acceptanceRate == otherTyped.acceptanceRate && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, needWorkIndex.hashCode, utilizationPercentage.hashCode, predictedAvailabilityScore.hashCode, scheduledHoursThisPeriod.hashCode, desiredHoursThisPeriod.hashCode, lastShiftDate.hashCode, acceptanceRate.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + if (needWorkIndex != null) { + json['needWorkIndex'] = nativeToJson(needWorkIndex); + } + if (utilizationPercentage != null) { + json['utilizationPercentage'] = nativeToJson(utilizationPercentage); + } + if (predictedAvailabilityScore != null) { + json['predictedAvailabilityScore'] = nativeToJson(predictedAvailabilityScore); + } + if (scheduledHoursThisPeriod != null) { + json['scheduledHoursThisPeriod'] = nativeToJson(scheduledHoursThisPeriod); + } + if (desiredHoursThisPeriod != null) { + json['desiredHoursThisPeriod'] = nativeToJson(desiredHoursThisPeriod); + } + if (lastShiftDate != null) { + json['lastShiftDate'] = lastShiftDate!.toJson(); + } + if (acceptanceRate != null) { + json['acceptanceRate'] = nativeToJson(acceptanceRate); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['staff'] = staff.toJson(); + return json; + } + + FilterStaffAvailabilityStatsStaffAvailabilityStatss({ + required this.id, + required this.staffId, + this.needWorkIndex, + this.utilizationPercentage, + this.predictedAvailabilityScore, + this.scheduledHoursThisPeriod, + this.desiredHoursThisPeriod, + this.lastShiftDate, + this.acceptanceRate, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.staff, + }); +} + +@immutable +class FilterStaffAvailabilityStatsStaffAvailabilityStatssStaff { + final String id; + final String fullName; + FilterStaffAvailabilityStatsStaffAvailabilityStatssStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffAvailabilityStatsStaffAvailabilityStatssStaff otherTyped = other as FilterStaffAvailabilityStatsStaffAvailabilityStatssStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + FilterStaffAvailabilityStatsStaffAvailabilityStatssStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class FilterStaffAvailabilityStatsData { + final List staffAvailabilityStatss; + FilterStaffAvailabilityStatsData.fromJson(dynamic json): + + staffAvailabilityStatss = (json['staffAvailabilityStatss'] as List) + .map((e) => FilterStaffAvailabilityStatsStaffAvailabilityStatss.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffAvailabilityStatsData otherTyped = other as FilterStaffAvailabilityStatsData; + return staffAvailabilityStatss == otherTyped.staffAvailabilityStatss; + + } + @override + int get hashCode => staffAvailabilityStatss.hashCode; + + + Map toJson() { + Map json = {}; + json['staffAvailabilityStatss'] = staffAvailabilityStatss.map((e) => e.toJson()).toList(); + return json; + } + + FilterStaffAvailabilityStatsData({ + required this.staffAvailabilityStatss, + }); +} + +@immutable +class FilterStaffAvailabilityStatsVariables { + late final OptionalneedWorkIndexMin; + late final OptionalneedWorkIndexMax; + late final OptionalutilizationMin; + late final OptionalutilizationMax; + late final OptionalacceptanceRateMin; + late final OptionalacceptanceRateMax; + late final OptionallastShiftAfter; + late final OptionallastShiftBefore; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterStaffAvailabilityStatsVariables.fromJson(Map json) { + + + needWorkIndexMin = Optional.optional(nativeFromJson, nativeToJson); + needWorkIndexMin.value = json['needWorkIndexMin'] == null ? null : nativeFromJson(json['needWorkIndexMin']); + + + needWorkIndexMax = Optional.optional(nativeFromJson, nativeToJson); + needWorkIndexMax.value = json['needWorkIndexMax'] == null ? null : nativeFromJson(json['needWorkIndexMax']); + + + utilizationMin = Optional.optional(nativeFromJson, nativeToJson); + utilizationMin.value = json['utilizationMin'] == null ? null : nativeFromJson(json['utilizationMin']); + + + utilizationMax = Optional.optional(nativeFromJson, nativeToJson); + utilizationMax.value = json['utilizationMax'] == null ? null : nativeFromJson(json['utilizationMax']); + + + acceptanceRateMin = Optional.optional(nativeFromJson, nativeToJson); + acceptanceRateMin.value = json['acceptanceRateMin'] == null ? null : nativeFromJson(json['acceptanceRateMin']); + + + acceptanceRateMax = Optional.optional(nativeFromJson, nativeToJson); + acceptanceRateMax.value = json['acceptanceRateMax'] == null ? null : nativeFromJson(json['acceptanceRateMax']); + + + lastShiftAfter = Optional.optional((json) => json['lastShiftAfter'] = Timestamp.fromJson(json['lastShiftAfter']), defaultSerializer); + lastShiftAfter.value = json['lastShiftAfter'] == null ? null : Timestamp.fromJson(json['lastShiftAfter']); + + + lastShiftBefore = Optional.optional((json) => json['lastShiftBefore'] = Timestamp.fromJson(json['lastShiftBefore']), defaultSerializer); + lastShiftBefore.value = json['lastShiftBefore'] == null ? null : Timestamp.fromJson(json['lastShiftBefore']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffAvailabilityStatsVariables otherTyped = other as FilterStaffAvailabilityStatsVariables; + return needWorkIndexMin == otherTyped.needWorkIndexMin && + needWorkIndexMax == otherTyped.needWorkIndexMax && + utilizationMin == otherTyped.utilizationMin && + utilizationMax == otherTyped.utilizationMax && + acceptanceRateMin == otherTyped.acceptanceRateMin && + acceptanceRateMax == otherTyped.acceptanceRateMax && + lastShiftAfter == otherTyped.lastShiftAfter && + lastShiftBefore == otherTyped.lastShiftBefore && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([needWorkIndexMin.hashCode, needWorkIndexMax.hashCode, utilizationMin.hashCode, utilizationMax.hashCode, acceptanceRateMin.hashCode, acceptanceRateMax.hashCode, lastShiftAfter.hashCode, lastShiftBefore.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(needWorkIndexMin.state == OptionalState.set) { + json['needWorkIndexMin'] = needWorkIndexMin.toJson(); + } + if(needWorkIndexMax.state == OptionalState.set) { + json['needWorkIndexMax'] = needWorkIndexMax.toJson(); + } + if(utilizationMin.state == OptionalState.set) { + json['utilizationMin'] = utilizationMin.toJson(); + } + if(utilizationMax.state == OptionalState.set) { + json['utilizationMax'] = utilizationMax.toJson(); + } + if(acceptanceRateMin.state == OptionalState.set) { + json['acceptanceRateMin'] = acceptanceRateMin.toJson(); + } + if(acceptanceRateMax.state == OptionalState.set) { + json['acceptanceRateMax'] = acceptanceRateMax.toJson(); + } + if(lastShiftAfter.state == OptionalState.set) { + json['lastShiftAfter'] = lastShiftAfter.toJson(); + } + if(lastShiftBefore.state == OptionalState.set) { + json['lastShiftBefore'] = lastShiftBefore.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterStaffAvailabilityStatsVariables({ + required this.needWorkIndexMin, + required this.needWorkIndexMax, + required this.utilizationMin, + required this.utilizationMax, + required this.acceptanceRateMin, + required this.acceptanceRateMax, + required this.lastShiftAfter, + required this.lastShiftBefore, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff_roles.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff_roles.dart new file mode 100644 index 00000000..7cfaf69c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_staff_roles.dart @@ -0,0 +1,206 @@ +part of 'generated.dart'; + +class FilterStaffRolesVariablesBuilder { + Optional _staffId = Optional.optional(nativeFromJson, nativeToJson); + Optional _roleId = Optional.optional(nativeFromJson, nativeToJson); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterStaffRolesVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + FilterStaffRolesVariablesBuilder roleId(String? t) { + _roleId.value = t; + return this; + } + FilterStaffRolesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterStaffRolesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterStaffRolesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterStaffRolesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterStaffRolesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterStaffRolesVariables vars= FilterStaffRolesVariables(staffId: _staffId,roleId: _roleId,offset: _offset,limit: _limit,); + return _dataConnect.query("filterStaffRoles", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterStaffRolesStaffRoles { + final String id; + final String staffId; + final String roleId; + final Timestamp? createdAt; + final EnumValue? roleType; + FilterStaffRolesStaffRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + roleType = json['roleType'] == null ? null : roleTypeDeserializer(json['roleType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffRolesStaffRoles otherTyped = other as FilterStaffRolesStaffRoles; + return id == otherTyped.id && + staffId == otherTyped.staffId && + roleId == otherTyped.roleId && + createdAt == otherTyped.createdAt && + roleType == otherTyped.roleType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, roleId.hashCode, createdAt.hashCode, roleType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (roleType != null) { + json['roleType'] = + roleTypeSerializer(roleType!) + ; + } + return json; + } + + FilterStaffRolesStaffRoles({ + required this.id, + required this.staffId, + required this.roleId, + this.createdAt, + this.roleType, + }); +} + +@immutable +class FilterStaffRolesData { + final List staffRoles; + FilterStaffRolesData.fromJson(dynamic json): + + staffRoles = (json['staffRoles'] as List) + .map((e) => FilterStaffRolesStaffRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffRolesData otherTyped = other as FilterStaffRolesData; + return staffRoles == otherTyped.staffRoles; + + } + @override + int get hashCode => staffRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['staffRoles'] = staffRoles.map((e) => e.toJson()).toList(); + return json; + } + + FilterStaffRolesData({ + required this.staffRoles, + }); +} + +@immutable +class FilterStaffRolesVariables { + late final OptionalstaffId; + late final OptionalroleId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterStaffRolesVariables.fromJson(Map json) { + + + staffId = Optional.optional(nativeFromJson, nativeToJson); + staffId.value = json['staffId'] == null ? null : nativeFromJson(json['staffId']); + + + roleId = Optional.optional(nativeFromJson, nativeToJson); + roleId.value = json['roleId'] == null ? null : nativeFromJson(json['roleId']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterStaffRolesVariables otherTyped = other as FilterStaffRolesVariables; + return staffId == otherTyped.staffId && + roleId == otherTyped.roleId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, roleId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(staffId.state == OptionalState.set) { + json['staffId'] = staffId.toJson(); + } + if(roleId.state == OptionalState.set) { + json['roleId'] = roleId.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterStaffRolesVariables({ + required this.staffId, + required this.roleId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_tasks.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_tasks.dart new file mode 100644 index 00000000..be84063e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_tasks.dart @@ -0,0 +1,239 @@ +part of 'generated.dart'; + +class FilterTasksVariablesBuilder { + Optional _status = Optional.optional((data) => TaskStatus.values.byName(data), enumSerializer); + Optional _priority = Optional.optional((data) => TaskPriority.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; + FilterTasksVariablesBuilder status(TaskStatus? t) { + _status.value = t; + return this; + } + FilterTasksVariablesBuilder priority(TaskPriority? t) { + _priority.value = t; + return this; + } + + FilterTasksVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterTasksData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterTasksVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterTasksVariables vars= FilterTasksVariables(status: _status,priority: _priority,); + return _dataConnect.query("filterTasks", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterTasksTasks { + final String id; + final String taskName; + final String? description; + final EnumValue priority; + final EnumValue status; + final Timestamp? dueDate; + final int? progress; + final int? orderIndex; + final int? commentCount; + final int? attachmentCount; + final AnyValue? files; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + FilterTasksTasks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskName = nativeFromJson(json['taskName']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + priority = taskPriorityDeserializer(json['priority']), + status = taskStatusDeserializer(json['status']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + progress = json['progress'] == null ? null : nativeFromJson(json['progress']), + orderIndex = json['orderIndex'] == null ? null : nativeFromJson(json['orderIndex']), + commentCount = json['commentCount'] == null ? null : nativeFromJson(json['commentCount']), + attachmentCount = json['attachmentCount'] == null ? null : nativeFromJson(json['attachmentCount']), + files = json['files'] == null ? null : AnyValue.fromJson(json['files']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterTasksTasks otherTyped = other as FilterTasksTasks; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + priority == otherTyped.priority && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + orderIndex == otherTyped.orderIndex && + commentCount == otherTyped.commentCount && + attachmentCount == otherTyped.attachmentCount && + files == otherTyped.files && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, priority.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, orderIndex.hashCode, commentCount.hashCode, attachmentCount.hashCode, files.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskName'] = nativeToJson(taskName); + if (description != null) { + json['description'] = nativeToJson(description); + } + json['priority'] = + taskPrioritySerializer(priority) + ; + json['status'] = + taskStatusSerializer(status) + ; + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (progress != null) { + json['progress'] = nativeToJson(progress); + } + if (orderIndex != null) { + json['orderIndex'] = nativeToJson(orderIndex); + } + if (commentCount != null) { + json['commentCount'] = nativeToJson(commentCount); + } + if (attachmentCount != null) { + json['attachmentCount'] = nativeToJson(attachmentCount); + } + if (files != null) { + json['files'] = files!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + FilterTasksTasks({ + required this.id, + required this.taskName, + this.description, + required this.priority, + required this.status, + this.dueDate, + this.progress, + this.orderIndex, + this.commentCount, + this.attachmentCount, + this.files, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class FilterTasksData { + final List tasks; + FilterTasksData.fromJson(dynamic json): + + tasks = (json['tasks'] as List) + .map((e) => FilterTasksTasks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterTasksData otherTyped = other as FilterTasksData; + return tasks == otherTyped.tasks; + + } + @override + int get hashCode => tasks.hashCode; + + + Map toJson() { + Map json = {}; + json['tasks'] = tasks.map((e) => e.toJson()).toList(); + return json; + } + + FilterTasksData({ + required this.tasks, + }); +} + +@immutable +class FilterTasksVariables { + late final Optionalstatus; + late final Optionalpriority; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterTasksVariables.fromJson(Map json) { + + + status = Optional.optional((data) => TaskStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : TaskStatus.values.byName(json['status']); + + + priority = Optional.optional((data) => TaskPriority.values.byName(data), enumSerializer); + priority.value = json['priority'] == null ? null : TaskPriority.values.byName(json['priority']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterTasksVariables otherTyped = other as FilterTasksVariables; + return status == otherTyped.status && + priority == otherTyped.priority; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, priority.hashCode]); + + + Map toJson() { + Map json = {}; + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(priority.state == OptionalState.set) { + json['priority'] = priority.toJson(); + } + return json; + } + + FilterTasksVariables({ + required this.status, + required this.priority, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_tax_forms.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_tax_forms.dart new file mode 100644 index 00000000..bbfbe1cc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_tax_forms.dart @@ -0,0 +1,189 @@ +part of 'generated.dart'; + +class FilterTaxFormsVariablesBuilder { + Optional _formType = Optional.optional((data) => TaxFormType.values.byName(data), enumSerializer); + Optional _status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer); + Optional _staffId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterTaxFormsVariablesBuilder formType(TaxFormType? t) { + _formType.value = t; + return this; + } + FilterTaxFormsVariablesBuilder status(TaxFormStatus? t) { + _status.value = t; + return this; + } + FilterTaxFormsVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + + FilterTaxFormsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterTaxFormsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterTaxFormsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterTaxFormsVariables vars= FilterTaxFormsVariables(formType: _formType,status: _status,staffId: _staffId,); + return _dataConnect.query("filterTaxForms", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterTaxFormsTaxForms { + final String id; + final EnumValue formType; + final String title; + final EnumValue status; + final String staffId; + FilterTaxFormsTaxForms.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + formType = taxFormTypeDeserializer(json['formType']), + title = nativeFromJson(json['title']), + status = taxFormStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterTaxFormsTaxForms otherTyped = other as FilterTaxFormsTaxForms; + return id == otherTyped.id && + formType == otherTyped.formType && + title == otherTyped.title && + status == otherTyped.status && + staffId == otherTyped.staffId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, formType.hashCode, title.hashCode, status.hashCode, staffId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['formType'] = + taxFormTypeSerializer(formType) + ; + json['title'] = nativeToJson(title); + json['status'] = + taxFormStatusSerializer(status) + ; + json['staffId'] = nativeToJson(staffId); + return json; + } + + FilterTaxFormsTaxForms({ + required this.id, + required this.formType, + required this.title, + required this.status, + required this.staffId, + }); +} + +@immutable +class FilterTaxFormsData { + final List taxForms; + FilterTaxFormsData.fromJson(dynamic json): + + taxForms = (json['taxForms'] as List) + .map((e) => FilterTaxFormsTaxForms.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterTaxFormsData otherTyped = other as FilterTaxFormsData; + return taxForms == otherTyped.taxForms; + + } + @override + int get hashCode => taxForms.hashCode; + + + Map toJson() { + Map json = {}; + json['taxForms'] = taxForms.map((e) => e.toJson()).toList(); + return json; + } + + FilterTaxFormsData({ + required this.taxForms, + }); +} + +@immutable +class FilterTaxFormsVariables { + late final OptionalformType; + late final Optionalstatus; + late final OptionalstaffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterTaxFormsVariables.fromJson(Map json) { + + + formType = Optional.optional((data) => TaxFormType.values.byName(data), enumSerializer); + formType.value = json['formType'] == null ? null : TaxFormType.values.byName(json['formType']); + + + status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : TaxFormStatus.values.byName(json['status']); + + + staffId = Optional.optional(nativeFromJson, nativeToJson); + staffId.value = json['staffId'] == null ? null : nativeFromJson(json['staffId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterTaxFormsVariables otherTyped = other as FilterTaxFormsVariables; + return formType == otherTyped.formType && + status == otherTyped.status && + staffId == otherTyped.staffId; + + } + @override + int get hashCode => Object.hashAll([formType.hashCode, status.hashCode, staffId.hashCode]); + + + Map toJson() { + Map json = {}; + if(formType.state == OptionalState.set) { + json['formType'] = formType.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(staffId.state == OptionalState.set) { + json['staffId'] = staffId.toJson(); + } + return json; + } + + FilterTaxFormsVariables({ + required this.formType, + required this.status, + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_user_conversations.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_user_conversations.dart new file mode 100644 index 00000000..c71b6d82 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_user_conversations.dart @@ -0,0 +1,423 @@ +part of 'generated.dart'; + +class FilterUserConversationsVariablesBuilder { + Optional _userId = Optional.optional(nativeFromJson, nativeToJson); + Optional _conversationId = Optional.optional(nativeFromJson, nativeToJson); + Optional _unreadMin = Optional.optional(nativeFromJson, nativeToJson); + Optional _unreadMax = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastReadAfter = Optional.optional((json) => json['lastReadAfter'] = Timestamp.fromJson(json['lastReadAfter']), defaultSerializer); + Optional _lastReadBefore = Optional.optional((json) => json['lastReadBefore'] = Timestamp.fromJson(json['lastReadBefore']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterUserConversationsVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + FilterUserConversationsVariablesBuilder conversationId(String? t) { + _conversationId.value = t; + return this; + } + FilterUserConversationsVariablesBuilder unreadMin(int? t) { + _unreadMin.value = t; + return this; + } + FilterUserConversationsVariablesBuilder unreadMax(int? t) { + _unreadMax.value = t; + return this; + } + FilterUserConversationsVariablesBuilder lastReadAfter(Timestamp? t) { + _lastReadAfter.value = t; + return this; + } + FilterUserConversationsVariablesBuilder lastReadBefore(Timestamp? t) { + _lastReadBefore.value = t; + return this; + } + FilterUserConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterUserConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterUserConversationsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterUserConversationsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterUserConversationsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterUserConversationsVariables vars= FilterUserConversationsVariables(userId: _userId,conversationId: _conversationId,unreadMin: _unreadMin,unreadMax: _unreadMax,lastReadAfter: _lastReadAfter,lastReadBefore: _lastReadBefore,offset: _offset,limit: _limit,); + return _dataConnect.query("filterUserConversations", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterUserConversationsUserConversations { + final String id; + final String conversationId; + final String userId; + final int? unreadCount; + final Timestamp? lastReadAt; + final Timestamp? createdAt; + final FilterUserConversationsUserConversationsConversation conversation; + final FilterUserConversationsUserConversationsUser user; + FilterUserConversationsUserConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']), + unreadCount = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']), + lastReadAt = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + conversation = FilterUserConversationsUserConversationsConversation.fromJson(json['conversation']), + user = FilterUserConversationsUserConversationsUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUserConversationsUserConversations otherTyped = other as FilterUserConversationsUserConversations; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt && + createdAt == otherTyped.createdAt && + conversation == otherTyped.conversation && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode, createdAt.hashCode, conversation.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if (unreadCount != null) { + json['unreadCount'] = nativeToJson(unreadCount); + } + if (lastReadAt != null) { + json['lastReadAt'] = lastReadAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['conversation'] = conversation.toJson(); + json['user'] = user.toJson(); + return json; + } + + FilterUserConversationsUserConversations({ + required this.id, + required this.conversationId, + required this.userId, + this.unreadCount, + this.lastReadAt, + this.createdAt, + required this.conversation, + required this.user, + }); +} + +@immutable +class FilterUserConversationsUserConversationsConversation { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + FilterUserConversationsUserConversationsConversation.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUserConversationsUserConversationsConversation otherTyped = other as FilterUserConversationsUserConversationsConversation; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + FilterUserConversationsUserConversationsConversation({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class FilterUserConversationsUserConversationsUser { + final String id; + final String? fullName; + final String? photoUrl; + FilterUserConversationsUserConversationsUser.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUserConversationsUserConversationsUser otherTyped = other as FilterUserConversationsUserConversationsUser; + return id == otherTyped.id && + fullName == otherTyped.fullName && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + return json; + } + + FilterUserConversationsUserConversationsUser({ + required this.id, + this.fullName, + this.photoUrl, + }); +} + +@immutable +class FilterUserConversationsData { + final List userConversations; + FilterUserConversationsData.fromJson(dynamic json): + + userConversations = (json['userConversations'] as List) + .map((e) => FilterUserConversationsUserConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUserConversationsData otherTyped = other as FilterUserConversationsData; + return userConversations == otherTyped.userConversations; + + } + @override + int get hashCode => userConversations.hashCode; + + + Map toJson() { + Map json = {}; + json['userConversations'] = userConversations.map((e) => e.toJson()).toList(); + return json; + } + + FilterUserConversationsData({ + required this.userConversations, + }); +} + +@immutable +class FilterUserConversationsVariables { + late final OptionaluserId; + late final OptionalconversationId; + late final OptionalunreadMin; + late final OptionalunreadMax; + late final OptionallastReadAfter; + late final OptionallastReadBefore; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterUserConversationsVariables.fromJson(Map json) { + + + userId = Optional.optional(nativeFromJson, nativeToJson); + userId.value = json['userId'] == null ? null : nativeFromJson(json['userId']); + + + conversationId = Optional.optional(nativeFromJson, nativeToJson); + conversationId.value = json['conversationId'] == null ? null : nativeFromJson(json['conversationId']); + + + unreadMin = Optional.optional(nativeFromJson, nativeToJson); + unreadMin.value = json['unreadMin'] == null ? null : nativeFromJson(json['unreadMin']); + + + unreadMax = Optional.optional(nativeFromJson, nativeToJson); + unreadMax.value = json['unreadMax'] == null ? null : nativeFromJson(json['unreadMax']); + + + lastReadAfter = Optional.optional((json) => json['lastReadAfter'] = Timestamp.fromJson(json['lastReadAfter']), defaultSerializer); + lastReadAfter.value = json['lastReadAfter'] == null ? null : Timestamp.fromJson(json['lastReadAfter']); + + + lastReadBefore = Optional.optional((json) => json['lastReadBefore'] = Timestamp.fromJson(json['lastReadBefore']), defaultSerializer); + lastReadBefore.value = json['lastReadBefore'] == null ? null : Timestamp.fromJson(json['lastReadBefore']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUserConversationsVariables otherTyped = other as FilterUserConversationsVariables; + return userId == otherTyped.userId && + conversationId == otherTyped.conversationId && + unreadMin == otherTyped.unreadMin && + unreadMax == otherTyped.unreadMax && + lastReadAfter == otherTyped.lastReadAfter && + lastReadBefore == otherTyped.lastReadBefore && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, conversationId.hashCode, unreadMin.hashCode, unreadMax.hashCode, lastReadAfter.hashCode, lastReadBefore.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(userId.state == OptionalState.set) { + json['userId'] = userId.toJson(); + } + if(conversationId.state == OptionalState.set) { + json['conversationId'] = conversationId.toJson(); + } + if(unreadMin.state == OptionalState.set) { + json['unreadMin'] = unreadMin.toJson(); + } + if(unreadMax.state == OptionalState.set) { + json['unreadMax'] = unreadMax.toJson(); + } + if(lastReadAfter.state == OptionalState.set) { + json['lastReadAfter'] = lastReadAfter.toJson(); + } + if(lastReadBefore.state == OptionalState.set) { + json['lastReadBefore'] = lastReadBefore.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterUserConversationsVariables({ + required this.userId, + required this.conversationId, + required this.unreadMin, + required this.unreadMax, + required this.lastReadAfter, + required this.lastReadBefore, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_users.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_users.dart new file mode 100644 index 00000000..0e386768 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_users.dart @@ -0,0 +1,215 @@ +part of 'generated.dart'; + +class FilterUsersVariablesBuilder { + Optional _id = Optional.optional(nativeFromJson, nativeToJson); + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _role = Optional.optional((data) => UserBaseRole.values.byName(data), enumSerializer); + Optional _userRole = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterUsersVariablesBuilder id(String? t) { + _id.value = t; + return this; + } + FilterUsersVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + FilterUsersVariablesBuilder role(UserBaseRole? t) { + _role.value = t; + return this; + } + FilterUsersVariablesBuilder userRole(String? t) { + _userRole.value = t; + return this; + } + + FilterUsersVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterUsersData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterUsersVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterUsersVariables vars= FilterUsersVariables(id: _id,email: _email,role: _role,userRole: _userRole,); + return _dataConnect.query("filterUsers", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterUsersUsers { + final String id; + final String? email; + final String? fullName; + final EnumValue role; + final String? userRole; + final String? photoUrl; + FilterUsersUsers.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + role = userBaseRoleDeserializer(json['role']), + userRole = json['userRole'] == null ? null : nativeFromJson(json['userRole']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUsersUsers otherTyped = other as FilterUsersUsers; + return id == otherTyped.id && + email == otherTyped.email && + fullName == otherTyped.fullName && + role == otherTyped.role && + userRole == otherTyped.userRole && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, email.hashCode, fullName.hashCode, role.hashCode, userRole.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + json['role'] = + userBaseRoleSerializer(role) + ; + if (userRole != null) { + json['userRole'] = nativeToJson(userRole); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + return json; + } + + FilterUsersUsers({ + required this.id, + this.email, + this.fullName, + required this.role, + this.userRole, + this.photoUrl, + }); +} + +@immutable +class FilterUsersData { + final List users; + FilterUsersData.fromJson(dynamic json): + + users = (json['users'] as List) + .map((e) => FilterUsersUsers.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUsersData otherTyped = other as FilterUsersData; + return users == otherTyped.users; + + } + @override + int get hashCode => users.hashCode; + + + Map toJson() { + Map json = {}; + json['users'] = users.map((e) => e.toJson()).toList(); + return json; + } + + FilterUsersData({ + required this.users, + }); +} + +@immutable +class FilterUsersVariables { + late final Optionalid; + late final Optionalemail; + late final Optionalrole; + late final OptionaluserRole; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterUsersVariables.fromJson(Map json) { + + + id = Optional.optional(nativeFromJson, nativeToJson); + id.value = json['id'] == null ? null : nativeFromJson(json['id']); + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + role = Optional.optional((data) => UserBaseRole.values.byName(data), enumSerializer); + role.value = json['role'] == null ? null : UserBaseRole.values.byName(json['role']); + + + userRole = Optional.optional(nativeFromJson, nativeToJson); + userRole.value = json['userRole'] == null ? null : nativeFromJson(json['userRole']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterUsersVariables otherTyped = other as FilterUsersVariables; + return id == otherTyped.id && + email == otherTyped.email && + role == otherTyped.role && + userRole == otherTyped.userRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, email.hashCode, role.hashCode, userRole.hashCode]); + + + Map toJson() { + Map json = {}; + if(id.state == OptionalState.set) { + json['id'] = id.toJson(); + } + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(role.state == OptionalState.set) { + json['role'] = role.toJson(); + } + if(userRole.state == OptionalState.set) { + json['userRole'] = userRole.toJson(); + } + return json; + } + + FilterUsersVariables({ + required this.id, + required this.email, + required this.role, + required this.userRole, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/filter_vendor_benefit_plans.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_vendor_benefit_plans.dart new file mode 100644 index 00000000..6ced6af8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/filter_vendor_benefit_plans.dart @@ -0,0 +1,293 @@ +part of 'generated.dart'; + +class FilterVendorBenefitPlansVariablesBuilder { + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + FilterVendorBenefitPlansVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + FilterVendorBenefitPlansVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + FilterVendorBenefitPlansVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => FilterVendorBenefitPlansData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (FilterVendorBenefitPlansVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + FilterVendorBenefitPlansVariables vars= FilterVendorBenefitPlansVariables(vendorId: _vendorId,title: _title,isActive: _isActive,offset: _offset,limit: _limit,); + return _dataConnect.query("filterVendorBenefitPlans", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class FilterVendorBenefitPlansVendorBenefitPlans { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final FilterVendorBenefitPlansVendorBenefitPlansVendor vendor; + FilterVendorBenefitPlansVendorBenefitPlans.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = FilterVendorBenefitPlansVendorBenefitPlansVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterVendorBenefitPlansVendorBenefitPlans otherTyped = other as FilterVendorBenefitPlansVendorBenefitPlans; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['vendor'] = vendor.toJson(); + return json; + } + + FilterVendorBenefitPlansVendorBenefitPlans({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.vendor, + }); +} + +@immutable +class FilterVendorBenefitPlansVendorBenefitPlansVendor { + final String companyName; + FilterVendorBenefitPlansVendorBenefitPlansVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterVendorBenefitPlansVendorBenefitPlansVendor otherTyped = other as FilterVendorBenefitPlansVendorBenefitPlansVendor; + return companyName == otherTyped.companyName; + + } + @override + int get hashCode => companyName.hashCode; + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + return json; + } + + FilterVendorBenefitPlansVendorBenefitPlansVendor({ + required this.companyName, + }); +} + +@immutable +class FilterVendorBenefitPlansData { + final List vendorBenefitPlans; + FilterVendorBenefitPlansData.fromJson(dynamic json): + + vendorBenefitPlans = (json['vendorBenefitPlans'] as List) + .map((e) => FilterVendorBenefitPlansVendorBenefitPlans.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterVendorBenefitPlansData otherTyped = other as FilterVendorBenefitPlansData; + return vendorBenefitPlans == otherTyped.vendorBenefitPlans; + + } + @override + int get hashCode => vendorBenefitPlans.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlans'] = vendorBenefitPlans.map((e) => e.toJson()).toList(); + return json; + } + + FilterVendorBenefitPlansData({ + required this.vendorBenefitPlans, + }); +} + +@immutable +class FilterVendorBenefitPlansVariables { + late final OptionalvendorId; + late final Optionaltitle; + late final OptionalisActive; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + FilterVendorBenefitPlansVariables.fromJson(Map json) { + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final FilterVendorBenefitPlansVariables otherTyped = other as FilterVendorBenefitPlansVariables; + return vendorId == otherTyped.vendorId && + title == otherTyped.title && + isActive == otherTyped.isActive && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, title.hashCode, isActive.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + FilterVendorBenefitPlansVariables({ + required this.vendorId, + required this.title, + required this.isActive, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/generated.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/generated.dart new file mode 100644 index 00000000..1a07ae01 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/generated.dart @@ -0,0 +1,4498 @@ +library dataconnect_generated; +import 'package:firebase_data_connect/firebase_data_connect.dart'; +import 'package:flutter/foundation.dart'; +import 'dart:convert'; +import 'package:flutter/foundation.dart'; + +part 'create_document.dart'; + +part 'update_document.dart'; + +part 'delete_document.dart'; + +part 'create_conversation.dart'; + +part 'update_conversation.dart'; + +part 'update_conversation_last_message.dart'; + +part 'delete_conversation.dart'; + +part 'list_hubs.dart'; + +part 'get_hub_by_id.dart'; + +part 'get_hubs_by_owner_id.dart'; + +part 'filter_hubs.dart'; + +part 'create_invoice.dart'; + +part 'update_invoice.dart'; + +part 'delete_invoice.dart'; + +part 'create_vendor_rate.dart'; + +part 'update_vendor_rate.dart'; + +part 'delete_vendor_rate.dart'; + +part 'list_categories.dart'; + +part 'get_category_by_id.dart'; + +part 'filter_categories.dart'; + +part 'create_client_feedback.dart'; + +part 'update_client_feedback.dart'; + +part 'delete_client_feedback.dart'; + +part 'create_team.dart'; + +part 'update_team.dart'; + +part 'delete_team.dart'; + +part 'list_team_hubs.dart'; + +part 'get_team_hub_by_id.dart'; + +part 'get_team_hubs_by_team_id.dart'; + +part 'list_team_hubs_by_owner_id.dart'; + +part 'create_vendor.dart'; + +part 'update_vendor.dart'; + +part 'delete_vendor.dart'; + +part 'create_workforce.dart'; + +part 'update_workforce.dart'; + +part 'deactivate_workforce.dart'; + +part 'create_business.dart'; + +part 'update_business.dart'; + +part 'delete_business.dart'; + +part 'list_activity_logs.dart'; + +part 'get_activity_log_by_id.dart'; + +part 'list_activity_logs_by_user_id.dart'; + +part 'list_unread_activity_logs_by_user_id.dart'; + +part 'filter_activity_logs.dart'; + +part 'create_hub.dart'; + +part 'update_hub.dart'; + +part 'delete_hub.dart'; + +part 'create_level.dart'; + +part 'update_level.dart'; + +part 'delete_level.dart'; + +part 'list_levels.dart'; + +part 'get_level_by_id.dart'; + +part 'filter_levels.dart'; + +part 'create_recent_payment.dart'; + +part 'update_recent_payment.dart'; + +part 'delete_recent_payment.dart'; + +part 'get_shift_role_by_id.dart'; + +part 'list_shift_roles_by_shift_id.dart'; + +part 'list_shift_roles_by_role_id.dart'; + +part 'list_shift_roles_by_shift_id_and_time_range.dart'; + +part 'list_shift_roles_by_vendor_id.dart'; + +part 'create_team_hud_department.dart'; + +part 'update_team_hud_department.dart'; + +part 'delete_team_hud_department.dart'; + +part 'create_team_member.dart'; + +part 'update_team_member.dart'; + +part 'update_team_member_invite_status.dart'; + +part 'accept_invite_by_code.dart'; + +part 'cancel_invite_by_code.dart'; + +part 'delete_team_member.dart'; + +part 'create_user.dart'; + +part 'update_user.dart'; + +part 'delete_user.dart'; + +part 'get_vendor_by_id.dart'; + +part 'get_vendor_by_user_id.dart'; + +part 'list_vendors.dart'; + +part 'create_shift.dart'; + +part 'update_shift.dart'; + +part 'delete_shift.dart'; + +part 'list_shifts.dart'; + +part 'get_shift_by_id.dart'; + +part 'filter_shifts.dart'; + +part 'get_shifts_by_business_id.dart'; + +part 'get_shifts_by_vendor_id.dart'; + +part 'create_shift_role.dart'; + +part 'update_shift_role.dart'; + +part 'delete_shift_role.dart'; + +part 'list_courses.dart'; + +part 'get_course_by_id.dart'; + +part 'filter_courses.dart'; + +part 'list_documents.dart'; + +part 'get_document_by_id.dart'; + +part 'filter_documents.dart'; + +part 'create_attire_option.dart'; + +part 'update_attire_option.dart'; + +part 'delete_attire_option.dart'; + +part 'create_category.dart'; + +part 'update_category.dart'; + +part 'delete_category.dart'; + +part 'list_conversations.dart'; + +part 'get_conversation_by_id.dart'; + +part 'list_conversations_by_type.dart'; + +part 'list_conversations_by_status.dart'; + +part 'filter_conversations.dart'; + +part 'list_attire_options.dart'; + +part 'get_attire_option_by_id.dart'; + +part 'filter_attire_options.dart'; + +part 'create_staff.dart'; + +part 'update_staff.dart'; + +part 'delete_staff.dart'; + +part 'create_staff_document.dart'; + +part 'update_staff_document.dart'; + +part 'delete_staff_document.dart'; + +part 'create_staff_role.dart'; + +part 'delete_staff_role.dart'; + +part 'list_tax_forms.dart'; + +part 'get_tax_form_by_id.dart'; + +part 'get_tax_forms_bystaff_id.dart'; + +part 'filter_tax_forms.dart'; + +part 'list_teams.dart'; + +part 'get_team_by_id.dart'; + +part 'get_teams_by_owner_id.dart'; + +part 'list_team_hud_departments.dart'; + +part 'get_team_hud_department_by_id.dart'; + +part 'list_team_hud_departments_by_team_hub_id.dart'; + +part 'create_certificate.dart'; + +part 'update_certificate.dart'; + +part 'delete_certificate.dart'; + +part 'list_custom_rate_cards.dart'; + +part 'get_custom_rate_card_by_id.dart'; + +part 'create_faq_data.dart'; + +part 'update_faq_data.dart'; + +part 'delete_faq_data.dart'; + +part 'list_messages.dart'; + +part 'get_message_by_id.dart'; + +part 'get_messages_by_conversation_id.dart'; + +part 'create_staff_availability_stats.dart'; + +part 'update_staff_availability_stats.dart'; + +part 'delete_staff_availability_stats.dart'; + +part 'get_staff_document_by_key.dart'; + +part 'list_staff_documents_by_staff_id.dart'; + +part 'list_staff_documents_by_document_type.dart'; + +part 'list_staff_documents_by_status.dart'; + +part 'get_workforce_by_id.dart'; + +part 'get_workforce_by_vendor_and_staff.dart'; + +part 'list_workforce_by_vendor_id.dart'; + +part 'list_workforce_by_staff_id.dart'; + +part 'get_workforce_by_vendor_and_number.dart'; + +part 'create_activity_log.dart'; + +part 'update_activity_log.dart'; + +part 'mark_activity_log_as_read.dart'; + +part 'mark_activity_logs_as_read.dart'; + +part 'delete_activity_log.dart'; + +part 'list_emergency_contacts.dart'; + +part 'get_emergency_contact_by_id.dart'; + +part 'get_emergency_contacts_by_staff_id.dart'; + +part 'list_faq_datas.dart'; + +part 'get_faq_data_by_id.dart'; + +part 'filter_faq_datas.dart'; + +part 'create_staff_availability.dart'; + +part 'update_staff_availability.dart'; + +part 'delete_staff_availability.dart'; + +part 'list_staff_availability_stats.dart'; + +part 'get_staff_availability_stats_by_staff_id.dart'; + +part 'filter_staff_availability_stats.dart'; + +part 'create_team_hub.dart'; + +part 'update_team_hub.dart'; + +part 'delete_team_hub.dart'; + +part 'create_user_conversation.dart'; + +part 'update_user_conversation.dart'; + +part 'mark_conversation_as_read.dart'; + +part 'increment_unread_for_user.dart'; + +part 'delete_user_conversation.dart'; + +part 'list_businesses.dart'; + +part 'get_businesses_by_user_id.dart'; + +part 'get_business_by_id.dart'; + +part 'create_member_task.dart'; + +part 'delete_member_task.dart'; + +part 'get_staff_course_by_id.dart'; + +part 'list_staff_courses_by_staff_id.dart'; + +part 'list_staff_courses_by_course_id.dart'; + +part 'get_staff_course_by_staff_and_course.dart'; + +part 'create_task.dart'; + +part 'update_task.dart'; + +part 'delete_task.dart'; + +part 'list_tasks.dart'; + +part 'get_task_by_id.dart'; + +part 'get_tasks_by_owner_id.dart'; + +part 'filter_tasks.dart'; + +part 'list_assignments.dart'; + +part 'get_assignment_by_id.dart'; + +part 'list_assignments_by_workforce_id.dart'; + +part 'list_assignments_by_workforce_ids.dart'; + +part 'list_assignments_by_shift_role.dart'; + +part 'filter_assignments.dart'; + +part 'list_invoices.dart'; + +part 'get_invoice_by_id.dart'; + +part 'list_invoices_by_vendor_id.dart'; + +part 'list_invoices_by_business_id.dart'; + +part 'list_invoices_by_order_id.dart'; + +part 'list_invoices_by_status.dart'; + +part 'filter_invoices.dart'; + +part 'list_overdue_invoices.dart'; + +part 'list_task_comments.dart'; + +part 'get_task_comment_by_id.dart'; + +part 'get_task_comments_by_task_id.dart'; + +part 'create_vendor_benefit_plan.dart'; + +part 'update_vendor_benefit_plan.dart'; + +part 'delete_vendor_benefit_plan.dart'; + +part 'list_vendor_rates.dart'; + +part 'get_vendor_rate_by_id.dart'; + +part 'list_applications.dart'; + +part 'get_application_by_id.dart'; + +part 'get_applications_by_shift_id.dart'; + +part 'get_applications_by_shift_id_and_status.dart'; + +part 'get_applications_by_staff_id.dart'; + +part 'list_invoice_templates.dart'; + +part 'get_invoice_template_by_id.dart'; + +part 'list_invoice_templates_by_owner_id.dart'; + +part 'list_invoice_templates_by_vendor_id.dart'; + +part 'list_invoice_templates_by_business_id.dart'; + +part 'list_invoice_templates_by_order_id.dart'; + +part 'search_invoice_templates_by_owner_and_name.dart'; + +part 'list_roles.dart'; + +part 'get_role_by_id.dart'; + +part 'list_roles_by_vendor_id.dart'; + +part 'list_roles_byrole_category_id.dart'; + +part 'list_staff.dart'; + +part 'get_staff_by_id.dart'; + +part 'get_staff_by_user_id.dart'; + +part 'filter_staff.dart'; + +part 'create_task_comment.dart'; + +part 'update_task_comment.dart'; + +part 'delete_task_comment.dart'; + +part 'list_user_conversations.dart'; + +part 'get_user_conversation_by_key.dart'; + +part 'list_user_conversations_by_user_id.dart'; + +part 'list_unread_user_conversations_by_user_id.dart'; + +part 'list_user_conversations_by_conversation_id.dart'; + +part 'filter_user_conversations.dart'; + +part 'list_certificates.dart'; + +part 'get_certificate_by_id.dart'; + +part 'list_certificates_by_staff_id.dart'; + +part 'get_my_tasks.dart'; + +part 'get_member_task_by_id_key.dart'; + +part 'get_member_tasks_by_task_id.dart'; + +part 'list_recent_payments.dart'; + +part 'get_recent_payment_by_id.dart'; + +part 'list_recent_payments_by_staff_id.dart'; + +part 'list_recent_payments_by_application_id.dart'; + +part 'list_recent_payments_by_invoice_id.dart'; + +part 'list_recent_payments_by_status.dart'; + +part 'list_recent_payments_by_invoice_ids.dart'; + +part 'list_recent_payments_by_business_id.dart'; + +part 'create_tax_form.dart'; + +part 'update_tax_form.dart'; + +part 'delete_tax_form.dart'; + +part 'create_message.dart'; + +part 'update_message.dart'; + +part 'delete_message.dart'; + +part 'list_role_categories.dart'; + +part 'get_role_category_by_id.dart'; + +part 'get_role_categories_by_category.dart'; + +part 'create_application.dart'; + +part 'update_application_status.dart'; + +part 'delete_application.dart'; + +part 'create_assignment.dart'; + +part 'update_assignment.dart'; + +part 'delete_assignment.dart'; + +part 'create_benefits_data.dart'; + +part 'update_benefits_data.dart'; + +part 'delete_benefits_data.dart'; + +part 'list_users.dart'; + +part 'get_user_by_id.dart'; + +part 'filter_users.dart'; + +part 'list_client_feedbacks.dart'; + +part 'get_client_feedback_by_id.dart'; + +part 'list_client_feedbacks_by_business_id.dart'; + +part 'list_client_feedbacks_by_vendor_id.dart'; + +part 'list_client_feedbacks_by_business_and_vendor.dart'; + +part 'filter_client_feedbacks.dart'; + +part 'list_client_feedback_ratings_by_vendor_id.dart'; + +part 'create_custom_rate_card.dart'; + +part 'update_custom_rate_card.dart'; + +part 'delete_custom_rate_card.dart'; + +part 'create_role_category.dart'; + +part 'update_role_category.dart'; + +part 'delete_role_category.dart'; + +part 'create_staff_course.dart'; + +part 'update_staff_course.dart'; + +part 'delete_staff_course.dart'; + +part 'list_staff_roles.dart'; + +part 'get_staff_role_by_key.dart'; + +part 'list_staff_roles_by_staff_id.dart'; + +part 'list_staff_roles_by_role_id.dart'; + +part 'filter_staff_roles.dart'; + +part 'create_account.dart'; + +part 'update_account.dart'; + +part 'delete_account.dart'; + +part 'list_accounts.dart'; + +part 'get_account_by_id.dart'; + +part 'get_accounts_by_owner_id.dart'; + +part 'filter_accounts.dart'; + +part 'create_course.dart'; + +part 'update_course.dart'; + +part 'delete_course.dart'; + +part 'create_emergency_contact.dart'; + +part 'update_emergency_contact.dart'; + +part 'delete_emergency_contact.dart'; + +part 'create_invoice_template.dart'; + +part 'update_invoice_template.dart'; + +part 'delete_invoice_template.dart'; + +part 'list_orders.dart'; + +part 'get_order_by_id.dart'; + +part 'get_orders_by_business_id.dart'; + +part 'get_orders_by_vendor_id.dart'; + +part 'get_orders_by_status.dart'; + +part 'get_orders_by_date_range.dart'; + +part 'get_rapid_orders.dart'; + +part 'list_shifts_for_coverage.dart'; + +part 'list_applications_for_coverage.dart'; + +part 'list_shifts_for_daily_ops_by_business.dart'; + +part 'list_shifts_for_daily_ops_by_vendor.dart'; + +part 'list_applications_for_daily_ops.dart'; + +part 'list_shifts_for_forecast_by_business.dart'; + +part 'list_shifts_for_forecast_by_vendor.dart'; + +part 'list_shifts_for_no_show_range_by_business.dart'; + +part 'list_shifts_for_no_show_range_by_vendor.dart'; + +part 'list_applications_for_no_show_range.dart'; + +part 'list_staff_for_no_show_report.dart'; + +part 'list_invoices_for_spend_by_business.dart'; + +part 'list_invoices_for_spend_by_vendor.dart'; + +part 'list_invoices_for_spend_by_order.dart'; + +part 'list_timesheets_for_spend.dart'; + +part 'list_shifts_for_performance_by_business.dart'; + +part 'list_shifts_for_performance_by_vendor.dart'; + +part 'list_applications_for_performance.dart'; + +part 'list_staff_for_performance.dart'; + +part 'create_role.dart'; + +part 'update_role.dart'; + +part 'delete_role.dart'; + +part 'list_benefits_data.dart'; + +part 'get_benefits_data_by_key.dart'; + +part 'list_benefits_data_by_staff_id.dart'; + +part 'list_benefits_data_by_vendor_benefit_plan_id.dart'; + +part 'list_benefits_data_by_vendor_benefit_plan_ids.dart'; + +part 'create_order.dart'; + +part 'update_order.dart'; + +part 'delete_order.dart'; + +part 'list_staff_availabilities.dart'; + +part 'list_staff_availabilities_by_staff_id.dart'; + +part 'get_staff_availability_by_key.dart'; + +part 'list_staff_availabilities_by_day.dart'; + +part 'list_team_members.dart'; + +part 'get_team_member_by_id.dart'; + +part 'get_team_members_by_team_id.dart'; + +part 'list_vendor_benefit_plans.dart'; + +part 'get_vendor_benefit_plan_by_id.dart'; + +part 'list_vendor_benefit_plans_by_vendor_id.dart'; + +part 'list_active_vendor_benefit_plans_by_vendor_id.dart'; + +part 'filter_vendor_benefit_plans.dart'; + + + + enum AccountType { + + CHECKING, + + SAVINGS, + + } + + String accountTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue accountTypeDeserializer(dynamic data) { + switch (data) { + + case 'CHECKING': + return const Known(AccountType.CHECKING); + + case 'SAVINGS': + return const Known(AccountType.SAVINGS); + + default: + return Unknown(data); + } + } + + + enum ActivityIconType { + + INVOICE, + + CHECK, + + ALERT, + + MESSAGE, + + CALENDAR, + + } + + String activityIconTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue activityIconTypeDeserializer(dynamic data) { + switch (data) { + + case 'INVOICE': + return const Known(ActivityIconType.INVOICE); + + case 'CHECK': + return const Known(ActivityIconType.CHECK); + + case 'ALERT': + return const Known(ActivityIconType.ALERT); + + case 'MESSAGE': + return const Known(ActivityIconType.MESSAGE); + + case 'CALENDAR': + return const Known(ActivityIconType.CALENDAR); + + default: + return Unknown(data); + } + } + + + enum ActivityType { + + ORDER_CREATED, + + SHIFT_UPDATE, + + COMPLIANCE_ALERT, + + MESSAGE_RECEIVED, + + SYSTEM_UPDATE, + + } + + String activityTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue activityTypeDeserializer(dynamic data) { + switch (data) { + + case 'ORDER_CREATED': + return const Known(ActivityType.ORDER_CREATED); + + case 'SHIFT_UPDATE': + return const Known(ActivityType.SHIFT_UPDATE); + + case 'COMPLIANCE_ALERT': + return const Known(ActivityType.COMPLIANCE_ALERT); + + case 'MESSAGE_RECEIVED': + return const Known(ActivityType.MESSAGE_RECEIVED); + + case 'SYSTEM_UPDATE': + return const Known(ActivityType.SYSTEM_UPDATE); + + default: + return Unknown(data); + } + } + + + enum ApplicationOrigin { + + STAFF, + + EMPLOYER, + + } + + String applicationOriginSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue applicationOriginDeserializer(dynamic data) { + switch (data) { + + case 'STAFF': + return const Known(ApplicationOrigin.STAFF); + + case 'EMPLOYER': + return const Known(ApplicationOrigin.EMPLOYER); + + default: + return Unknown(data); + } + } + + + enum ApplicationStatus { + + PENDING, + + ACCEPTED, + + REJECTED, + + CONFIRMED, + + CHECKED_IN, + + CHECKED_OUT, + + LATE, + + NO_SHOW, + + } + + String applicationStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue applicationStatusDeserializer(dynamic data) { + switch (data) { + + case 'PENDING': + return const Known(ApplicationStatus.PENDING); + + case 'ACCEPTED': + return const Known(ApplicationStatus.ACCEPTED); + + case 'REJECTED': + return const Known(ApplicationStatus.REJECTED); + + case 'CONFIRMED': + return const Known(ApplicationStatus.CONFIRMED); + + case 'CHECKED_IN': + return const Known(ApplicationStatus.CHECKED_IN); + + case 'CHECKED_OUT': + return const Known(ApplicationStatus.CHECKED_OUT); + + case 'LATE': + return const Known(ApplicationStatus.LATE); + + case 'NO_SHOW': + return const Known(ApplicationStatus.NO_SHOW); + + default: + return Unknown(data); + } + } + + + enum ApprovalStatus { + + APPROVED, + + } + + String approvalStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue approvalStatusDeserializer(dynamic data) { + switch (data) { + + case 'APPROVED': + return const Known(ApprovalStatus.APPROVED); + + default: + return Unknown(data); + } + } + + + enum AssignmentStatus { + + PENDING, + + CONFIRMED, + + OPEN, + + COMPLETED, + + CANCELED, + + ACTIVE, + + } + + String assignmentStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue assignmentStatusDeserializer(dynamic data) { + switch (data) { + + case 'PENDING': + return const Known(AssignmentStatus.PENDING); + + case 'CONFIRMED': + return const Known(AssignmentStatus.CONFIRMED); + + case 'OPEN': + return const Known(AssignmentStatus.OPEN); + + case 'COMPLETED': + return const Known(AssignmentStatus.COMPLETED); + + case 'CANCELED': + return const Known(AssignmentStatus.CANCELED); + + case 'ACTIVE': + return const Known(AssignmentStatus.ACTIVE); + + default: + return Unknown(data); + } + } + + + enum AvailabilitySlot { + + MORNING, + + AFTERNOON, + + EVENING, + + } + + String availabilitySlotSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue availabilitySlotDeserializer(dynamic data) { + switch (data) { + + case 'MORNING': + return const Known(AvailabilitySlot.MORNING); + + case 'AFTERNOON': + return const Known(AvailabilitySlot.AFTERNOON); + + case 'EVENING': + return const Known(AvailabilitySlot.EVENING); + + default: + return Unknown(data); + } + } + + + enum AvailabilityStatus { + + CONFIRMED_AVAILABLE, + + UNKNOWN, + + BLOCKED, + + } + + String availabilityStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue availabilityStatusDeserializer(dynamic data) { + switch (data) { + + case 'CONFIRMED_AVAILABLE': + return const Known(AvailabilityStatus.CONFIRMED_AVAILABLE); + + case 'UNKNOWN': + return const Known(AvailabilityStatus.UNKNOWN); + + case 'BLOCKED': + return const Known(AvailabilityStatus.BLOCKED); + + default: + return Unknown(data); + } + } + + + enum BackgroundCheckStatus { + + PENDING, + + CLEARED, + + FAILED, + + EXPIRED, + + NOT_REQUIRED, + + } + + String backgroundCheckStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue backgroundCheckStatusDeserializer(dynamic data) { + switch (data) { + + case 'PENDING': + return const Known(BackgroundCheckStatus.PENDING); + + case 'CLEARED': + return const Known(BackgroundCheckStatus.CLEARED); + + case 'FAILED': + return const Known(BackgroundCheckStatus.FAILED); + + case 'EXPIRED': + return const Known(BackgroundCheckStatus.EXPIRED); + + case 'NOT_REQUIRED': + return const Known(BackgroundCheckStatus.NOT_REQUIRED); + + default: + return Unknown(data); + } + } + + + enum BreakDuration { + + MIN_15, + + MIN_30, + + NO_BREAK, + + } + + String breakDurationSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue breakDurationDeserializer(dynamic data) { + switch (data) { + + case 'MIN_15': + return const Known(BreakDuration.MIN_15); + + case 'MIN_30': + return const Known(BreakDuration.MIN_30); + + case 'NO_BREAK': + return const Known(BreakDuration.NO_BREAK); + + default: + return Unknown(data); + } + } + + + enum BusinessArea { + + BAY_AREA, + + SOUTHERN_CALIFORNIA, + + NORTHERN_CALIFORNIA, + + CENTRAL_VALLEY, + + OTHER, + + } + + String businessAreaSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue businessAreaDeserializer(dynamic data) { + switch (data) { + + case 'BAY_AREA': + return const Known(BusinessArea.BAY_AREA); + + case 'SOUTHERN_CALIFORNIA': + return const Known(BusinessArea.SOUTHERN_CALIFORNIA); + + case 'NORTHERN_CALIFORNIA': + return const Known(BusinessArea.NORTHERN_CALIFORNIA); + + case 'CENTRAL_VALLEY': + return const Known(BusinessArea.CENTRAL_VALLEY); + + case 'OTHER': + return const Known(BusinessArea.OTHER); + + default: + return Unknown(data); + } + } + + + enum BusinessRateGroup { + + STANDARD, + + PREMIUM, + + ENTERPRISE, + + CUSTOM, + + } + + String businessRateGroupSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue businessRateGroupDeserializer(dynamic data) { + switch (data) { + + case 'STANDARD': + return const Known(BusinessRateGroup.STANDARD); + + case 'PREMIUM': + return const Known(BusinessRateGroup.PREMIUM); + + case 'ENTERPRISE': + return const Known(BusinessRateGroup.ENTERPRISE); + + case 'CUSTOM': + return const Known(BusinessRateGroup.CUSTOM); + + default: + return Unknown(data); + } + } + + + enum BusinessSector { + + BON_APPETIT, + + EUREST, + + ARAMARK, + + EPICUREAN_GROUP, + + CHARTWELLS, + + OTHER, + + } + + String businessSectorSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue businessSectorDeserializer(dynamic data) { + switch (data) { + + case 'BON_APPETIT': + return const Known(BusinessSector.BON_APPETIT); + + case 'EUREST': + return const Known(BusinessSector.EUREST); + + case 'ARAMARK': + return const Known(BusinessSector.ARAMARK); + + case 'EPICUREAN_GROUP': + return const Known(BusinessSector.EPICUREAN_GROUP); + + case 'CHARTWELLS': + return const Known(BusinessSector.CHARTWELLS); + + case 'OTHER': + return const Known(BusinessSector.OTHER); + + default: + return Unknown(data); + } + } + + + enum BusinessStatus { + + ACTIVE, + + INACTIVE, + + PENDING, + + } + + String businessStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue businessStatusDeserializer(dynamic data) { + switch (data) { + + case 'ACTIVE': + return const Known(BusinessStatus.ACTIVE); + + case 'INACTIVE': + return const Known(BusinessStatus.INACTIVE); + + case 'PENDING': + return const Known(BusinessStatus.PENDING); + + default: + return Unknown(data); + } + } + + + enum CategoryType { + + KITCHEN_AND_CULINARY, + + CONCESSIONS, + + FACILITIES, + + BARTENDING, + + SECURITY, + + EVENT_STAFF, + + MANAGEMENT, + + TECHNICAL, + + OTHER, + + } + + String categoryTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue categoryTypeDeserializer(dynamic data) { + switch (data) { + + case 'KITCHEN_AND_CULINARY': + return const Known(CategoryType.KITCHEN_AND_CULINARY); + + case 'CONCESSIONS': + return const Known(CategoryType.CONCESSIONS); + + case 'FACILITIES': + return const Known(CategoryType.FACILITIES); + + case 'BARTENDING': + return const Known(CategoryType.BARTENDING); + + case 'SECURITY': + return const Known(CategoryType.SECURITY); + + case 'EVENT_STAFF': + return const Known(CategoryType.EVENT_STAFF); + + case 'MANAGEMENT': + return const Known(CategoryType.MANAGEMENT); + + case 'TECHNICAL': + return const Known(CategoryType.TECHNICAL); + + case 'OTHER': + return const Known(CategoryType.OTHER); + + default: + return Unknown(data); + } + } + + + enum CertificateStatus { + + CURRENT, + + EXPIRING_SOON, + + COMPLETED, + + PENDING, + + EXPIRED, + + EXPIRING, + + NOT_STARTED, + + } + + String certificateStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue certificateStatusDeserializer(dynamic data) { + switch (data) { + + case 'CURRENT': + return const Known(CertificateStatus.CURRENT); + + case 'EXPIRING_SOON': + return const Known(CertificateStatus.EXPIRING_SOON); + + case 'COMPLETED': + return const Known(CertificateStatus.COMPLETED); + + case 'PENDING': + return const Known(CertificateStatus.PENDING); + + case 'EXPIRED': + return const Known(CertificateStatus.EXPIRED); + + case 'EXPIRING': + return const Known(CertificateStatus.EXPIRING); + + case 'NOT_STARTED': + return const Known(CertificateStatus.NOT_STARTED); + + default: + return Unknown(data); + } + } + + + enum ComplianceType { + + BACKGROUND_CHECK, + + FOOD_HANDLER, + + RBS, + + LEGAL, + + OPERATIONAL, + + SAFETY, + + TRAINING, + + LICENSE, + + OTHER, + + } + + String complianceTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue complianceTypeDeserializer(dynamic data) { + switch (data) { + + case 'BACKGROUND_CHECK': + return const Known(ComplianceType.BACKGROUND_CHECK); + + case 'FOOD_HANDLER': + return const Known(ComplianceType.FOOD_HANDLER); + + case 'RBS': + return const Known(ComplianceType.RBS); + + case 'LEGAL': + return const Known(ComplianceType.LEGAL); + + case 'OPERATIONAL': + return const Known(ComplianceType.OPERATIONAL); + + case 'SAFETY': + return const Known(ComplianceType.SAFETY); + + case 'TRAINING': + return const Known(ComplianceType.TRAINING); + + case 'LICENSE': + return const Known(ComplianceType.LICENSE); + + case 'OTHER': + return const Known(ComplianceType.OTHER); + + default: + return Unknown(data); + } + } + + + enum ConversationStatus { + + ACTIVE, + + } + + String conversationStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue conversationStatusDeserializer(dynamic data) { + switch (data) { + + case 'ACTIVE': + return const Known(ConversationStatus.ACTIVE); + + default: + return Unknown(data); + } + } + + + enum ConversationType { + + CLIENT_VENDOR, + + GROUP_STAFF, + + STAFF_CLIENT, + + STAFF_ADMIN, + + VENDOR_ADMIN, + + CLIENT_ADMIN, + + GROUP_ORDER_STAFF, + + } + + String conversationTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue conversationTypeDeserializer(dynamic data) { + switch (data) { + + case 'CLIENT_VENDOR': + return const Known(ConversationType.CLIENT_VENDOR); + + case 'GROUP_STAFF': + return const Known(ConversationType.GROUP_STAFF); + + case 'STAFF_CLIENT': + return const Known(ConversationType.STAFF_CLIENT); + + case 'STAFF_ADMIN': + return const Known(ConversationType.STAFF_ADMIN); + + case 'VENDOR_ADMIN': + return const Known(ConversationType.VENDOR_ADMIN); + + case 'CLIENT_ADMIN': + return const Known(ConversationType.CLIENT_ADMIN); + + case 'GROUP_ORDER_STAFF': + return const Known(ConversationType.GROUP_ORDER_STAFF); + + default: + return Unknown(data); + } + } + + + enum DayOfWeek { + + SUNDAY, + + MONDAY, + + TUESDAY, + + WEDNESDAY, + + THURSDAY, + + FRIDAY, + + SATURDAY, + + } + + String dayOfWeekSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue dayOfWeekDeserializer(dynamic data) { + switch (data) { + + case 'SUNDAY': + return const Known(DayOfWeek.SUNDAY); + + case 'MONDAY': + return const Known(DayOfWeek.MONDAY); + + case 'TUESDAY': + return const Known(DayOfWeek.TUESDAY); + + case 'WEDNESDAY': + return const Known(DayOfWeek.WEDNESDAY); + + case 'THURSDAY': + return const Known(DayOfWeek.THURSDAY); + + case 'FRIDAY': + return const Known(DayOfWeek.FRIDAY); + + case 'SATURDAY': + return const Known(DayOfWeek.SATURDAY); + + default: + return Unknown(data); + } + } + + + enum DepartmentType { + + OPERATIONS, + + SALES, + + HR, + + FINANCE, + + IT, + + MARKETING, + + CUSTOMER_SERVICE, + + LOGISTICS, + + } + + String departmentTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue departmentTypeDeserializer(dynamic data) { + switch (data) { + + case 'OPERATIONS': + return const Known(DepartmentType.OPERATIONS); + + case 'SALES': + return const Known(DepartmentType.SALES); + + case 'HR': + return const Known(DepartmentType.HR); + + case 'FINANCE': + return const Known(DepartmentType.FINANCE); + + case 'IT': + return const Known(DepartmentType.IT); + + case 'MARKETING': + return const Known(DepartmentType.MARKETING); + + case 'CUSTOMER_SERVICE': + return const Known(DepartmentType.CUSTOMER_SERVICE); + + case 'LOGISTICS': + return const Known(DepartmentType.LOGISTICS); + + default: + return Unknown(data); + } + } + + + enum DocumentStatus { + + UPLOADED, + + PENDING, + + EXPIRING, + + MISSING, + + VERIFIED, + + } + + String documentStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue documentStatusDeserializer(dynamic data) { + switch (data) { + + case 'UPLOADED': + return const Known(DocumentStatus.UPLOADED); + + case 'PENDING': + return const Known(DocumentStatus.PENDING); + + case 'EXPIRING': + return const Known(DocumentStatus.EXPIRING); + + case 'MISSING': + return const Known(DocumentStatus.MISSING); + + case 'VERIFIED': + return const Known(DocumentStatus.VERIFIED); + + default: + return Unknown(data); + } + } + + + enum DocumentType { + + W4_FORM, + + I9_FORM, + + STATE_TAX_FORM, + + DIRECT_DEPOSIT, + + ID_COPY, + + SSN_CARD, + + WORK_PERMIT, + + } + + String documentTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue documentTypeDeserializer(dynamic data) { + switch (data) { + + case 'W4_FORM': + return const Known(DocumentType.W4_FORM); + + case 'I9_FORM': + return const Known(DocumentType.I9_FORM); + + case 'STATE_TAX_FORM': + return const Known(DocumentType.STATE_TAX_FORM); + + case 'DIRECT_DEPOSIT': + return const Known(DocumentType.DIRECT_DEPOSIT); + + case 'ID_COPY': + return const Known(DocumentType.ID_COPY); + + case 'SSN_CARD': + return const Known(DocumentType.SSN_CARD); + + case 'WORK_PERMIT': + return const Known(DocumentType.WORK_PERMIT); + + default: + return Unknown(data); + } + } + + + enum EmploymentType { + + FULL_TIME, + + PART_TIME, + + ON_CALL, + + WEEKENDS, + + SPECIFIC_DAYS, + + SEASONAL, + + MEDICAL_LEAVE, + + } + + String employmentTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue employmentTypeDeserializer(dynamic data) { + switch (data) { + + case 'FULL_TIME': + return const Known(EmploymentType.FULL_TIME); + + case 'PART_TIME': + return const Known(EmploymentType.PART_TIME); + + case 'ON_CALL': + return const Known(EmploymentType.ON_CALL); + + case 'WEEKENDS': + return const Known(EmploymentType.WEEKENDS); + + case 'SPECIFIC_DAYS': + return const Known(EmploymentType.SPECIFIC_DAYS); + + case 'SEASONAL': + return const Known(EmploymentType.SEASONAL); + + case 'MEDICAL_LEAVE': + return const Known(EmploymentType.MEDICAL_LEAVE); + + default: + return Unknown(data); + } + } + + + enum EnglishProficiency { + + FLUENT, + + INTERMEDIATE, + + BASIC, + + NONE, + + } + + String englishProficiencySerializer(EnumValue e) { + return e.stringValue; + } + EnumValue englishProficiencyDeserializer(dynamic data) { + switch (data) { + + case 'FLUENT': + return const Known(EnglishProficiency.FLUENT); + + case 'INTERMEDIATE': + return const Known(EnglishProficiency.INTERMEDIATE); + + case 'BASIC': + return const Known(EnglishProficiency.BASIC); + + case 'NONE': + return const Known(EnglishProficiency.NONE); + + default: + return Unknown(data); + } + } + + + enum InovicePaymentTerms { + + NET_30, + + NET_45, + + NET_60, + + } + + String inovicePaymentTermsSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue inovicePaymentTermsDeserializer(dynamic data) { + switch (data) { + + case 'NET_30': + return const Known(InovicePaymentTerms.NET_30); + + case 'NET_45': + return const Known(InovicePaymentTerms.NET_45); + + case 'NET_60': + return const Known(InovicePaymentTerms.NET_60); + + default: + return Unknown(data); + } + } + + + enum InovicePaymentTermsTemp { + + NET_30, + + NET_45, + + NET_60, + + } + + String inovicePaymentTermsTempSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue inovicePaymentTermsTempDeserializer(dynamic data) { + switch (data) { + + case 'NET_30': + return const Known(InovicePaymentTermsTemp.NET_30); + + case 'NET_45': + return const Known(InovicePaymentTermsTemp.NET_45); + + case 'NET_60': + return const Known(InovicePaymentTermsTemp.NET_60); + + default: + return Unknown(data); + } + } + + + enum InvoiceStatus { + + PAID, + + PENDING, + + OVERDUE, + + PENDING_REVIEW, + + APPROVED, + + DISPUTED, + + DRAFT, + + } + + String invoiceStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue invoiceStatusDeserializer(dynamic data) { + switch (data) { + + case 'PAID': + return const Known(InvoiceStatus.PAID); + + case 'PENDING': + return const Known(InvoiceStatus.PENDING); + + case 'OVERDUE': + return const Known(InvoiceStatus.OVERDUE); + + case 'PENDING_REVIEW': + return const Known(InvoiceStatus.PENDING_REVIEW); + + case 'APPROVED': + return const Known(InvoiceStatus.APPROVED); + + case 'DISPUTED': + return const Known(InvoiceStatus.DISPUTED); + + case 'DRAFT': + return const Known(InvoiceStatus.DRAFT); + + default: + return Unknown(data); + } + } + + + enum OrderDuration { + + WEEKLY, + + MONTHLY, + + } + + String orderDurationSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue orderDurationDeserializer(dynamic data) { + switch (data) { + + case 'WEEKLY': + return const Known(OrderDuration.WEEKLY); + + case 'MONTHLY': + return const Known(OrderDuration.MONTHLY); + + default: + return Unknown(data); + } + } + + + enum OrderStatus { + + DRAFT, + + POSTED, + + FILLED, + + COMPLETED, + + CANCELLED, + + PENDING, + + FULLY_STAFFED, + + PARTIAL_STAFFED, + + } + + String orderStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue orderStatusDeserializer(dynamic data) { + switch (data) { + + case 'DRAFT': + return const Known(OrderStatus.DRAFT); + + case 'POSTED': + return const Known(OrderStatus.POSTED); + + case 'FILLED': + return const Known(OrderStatus.FILLED); + + case 'COMPLETED': + return const Known(OrderStatus.COMPLETED); + + case 'CANCELLED': + return const Known(OrderStatus.CANCELLED); + + case 'PENDING': + return const Known(OrderStatus.PENDING); + + case 'FULLY_STAFFED': + return const Known(OrderStatus.FULLY_STAFFED); + + case 'PARTIAL_STAFFED': + return const Known(OrderStatus.PARTIAL_STAFFED); + + default: + return Unknown(data); + } + } + + + enum OrderType { + + ONE_TIME, + + PERMANENT, + + RECURRING, + + RAPID, + + } + + String orderTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue orderTypeDeserializer(dynamic data) { + switch (data) { + + case 'ONE_TIME': + return const Known(OrderType.ONE_TIME); + + case 'PERMANENT': + return const Known(OrderType.PERMANENT); + + case 'RECURRING': + return const Known(OrderType.RECURRING); + + case 'RAPID': + return const Known(OrderType.RAPID); + + default: + return Unknown(data); + } + } + + + enum RecentPaymentStatus { + + PAID, + + PENDING, + + FAILED, + + } + + String recentPaymentStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue recentPaymentStatusDeserializer(dynamic data) { + switch (data) { + + case 'PAID': + return const Known(RecentPaymentStatus.PAID); + + case 'PENDING': + return const Known(RecentPaymentStatus.PENDING); + + case 'FAILED': + return const Known(RecentPaymentStatus.FAILED); + + default: + return Unknown(data); + } + } + + + enum RelationshipType { + + FAMILY, + + SPOUSE, + + FRIEND, + + OTHER, + + } + + String relationshipTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue relationshipTypeDeserializer(dynamic data) { + switch (data) { + + case 'FAMILY': + return const Known(RelationshipType.FAMILY); + + case 'SPOUSE': + return const Known(RelationshipType.SPOUSE); + + case 'FRIEND': + return const Known(RelationshipType.FRIEND); + + case 'OTHER': + return const Known(RelationshipType.OTHER); + + default: + return Unknown(data); + } + } + + + enum RoleCategoryType { + + KITCHEN_AND_CULINARY, + + CONCESSIONS, + + FACILITIES, + + BARTENDING, + + SECURITY, + + EVENT_STAFF, + + MANAGEMENT, + + TECHNICAL, + + OTHER, + + } + + String roleCategoryTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue roleCategoryTypeDeserializer(dynamic data) { + switch (data) { + + case 'KITCHEN_AND_CULINARY': + return const Known(RoleCategoryType.KITCHEN_AND_CULINARY); + + case 'CONCESSIONS': + return const Known(RoleCategoryType.CONCESSIONS); + + case 'FACILITIES': + return const Known(RoleCategoryType.FACILITIES); + + case 'BARTENDING': + return const Known(RoleCategoryType.BARTENDING); + + case 'SECURITY': + return const Known(RoleCategoryType.SECURITY); + + case 'EVENT_STAFF': + return const Known(RoleCategoryType.EVENT_STAFF); + + case 'MANAGEMENT': + return const Known(RoleCategoryType.MANAGEMENT); + + case 'TECHNICAL': + return const Known(RoleCategoryType.TECHNICAL); + + case 'OTHER': + return const Known(RoleCategoryType.OTHER); + + default: + return Unknown(data); + } + } + + + enum RoleType { + + SKILLED, + + BEGINNER, + + CROSS_TRAINED, + + } + + String roleTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue roleTypeDeserializer(dynamic data) { + switch (data) { + + case 'SKILLED': + return const Known(RoleType.SKILLED); + + case 'BEGINNER': + return const Known(RoleType.BEGINNER); + + case 'CROSS_TRAINED': + return const Known(RoleType.CROSS_TRAINED); + + default: + return Unknown(data); + } + } + + + enum ShiftStatus { + + DRAFT, + + FILLED, + + PENDING, + + ASSIGNED, + + CONFIRMED, + + OPEN, + + IN_PROGRESS, + + COMPLETED, + + CANCELED, + + } + + String shiftStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue shiftStatusDeserializer(dynamic data) { + switch (data) { + + case 'DRAFT': + return const Known(ShiftStatus.DRAFT); + + case 'FILLED': + return const Known(ShiftStatus.FILLED); + + case 'PENDING': + return const Known(ShiftStatus.PENDING); + + case 'ASSIGNED': + return const Known(ShiftStatus.ASSIGNED); + + case 'CONFIRMED': + return const Known(ShiftStatus.CONFIRMED); + + case 'OPEN': + return const Known(ShiftStatus.OPEN); + + case 'IN_PROGRESS': + return const Known(ShiftStatus.IN_PROGRESS); + + case 'COMPLETED': + return const Known(ShiftStatus.COMPLETED); + + case 'CANCELED': + return const Known(ShiftStatus.CANCELED); + + default: + return Unknown(data); + } + } + + + enum TaskPriority { + + LOW, + + NORMAL, + + HIGH, + + } + + String taskPrioritySerializer(EnumValue e) { + return e.stringValue; + } + EnumValue taskPriorityDeserializer(dynamic data) { + switch (data) { + + case 'LOW': + return const Known(TaskPriority.LOW); + + case 'NORMAL': + return const Known(TaskPriority.NORMAL); + + case 'HIGH': + return const Known(TaskPriority.HIGH); + + default: + return Unknown(data); + } + } + + + enum TaskStatus { + + PENDING, + + IN_PROGRESS, + + COMPLETED, + + } + + String taskStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue taskStatusDeserializer(dynamic data) { + switch (data) { + + case 'PENDING': + return const Known(TaskStatus.PENDING); + + case 'IN_PROGRESS': + return const Known(TaskStatus.IN_PROGRESS); + + case 'COMPLETED': + return const Known(TaskStatus.COMPLETED); + + default: + return Unknown(data); + } + } + + + enum TaxFormStatus { + + NOT_STARTED, + + DRAFT, + + SUBMITTED, + + APPROVED, + + REJECTED, + + } + + String taxFormStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue taxFormStatusDeserializer(dynamic data) { + switch (data) { + + case 'NOT_STARTED': + return const Known(TaxFormStatus.NOT_STARTED); + + case 'DRAFT': + return const Known(TaxFormStatus.DRAFT); + + case 'SUBMITTED': + return const Known(TaxFormStatus.SUBMITTED); + + case 'APPROVED': + return const Known(TaxFormStatus.APPROVED); + + case 'REJECTED': + return const Known(TaxFormStatus.REJECTED); + + default: + return Unknown(data); + } + } + + + enum TaxFormType { + + I9, + + W4, + + } + + String taxFormTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue taxFormTypeDeserializer(dynamic data) { + switch (data) { + + case 'I9': + return const Known(TaxFormType.I9); + + case 'W4': + return const Known(TaxFormType.W4); + + default: + return Unknown(data); + } + } + + + enum TeamMemberInviteStatus { + + PENDING, + + ACCEPTED, + + CANCELLED, + + } + + String teamMemberInviteStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue teamMemberInviteStatusDeserializer(dynamic data) { + switch (data) { + + case 'PENDING': + return const Known(TeamMemberInviteStatus.PENDING); + + case 'ACCEPTED': + return const Known(TeamMemberInviteStatus.ACCEPTED); + + case 'CANCELLED': + return const Known(TeamMemberInviteStatus.CANCELLED); + + default: + return Unknown(data); + } + } + + + enum TeamMemberRole { + + OWNER, + + ADMIN, + + MEMBER, + + MANAGER, + + VIEWER, + + } + + String teamMemberRoleSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue teamMemberRoleDeserializer(dynamic data) { + switch (data) { + + case 'OWNER': + return const Known(TeamMemberRole.OWNER); + + case 'ADMIN': + return const Known(TeamMemberRole.ADMIN); + + case 'MEMBER': + return const Known(TeamMemberRole.MEMBER); + + case 'MANAGER': + return const Known(TeamMemberRole.MANAGER); + + case 'VIEWER': + return const Known(TeamMemberRole.VIEWER); + + default: + return Unknown(data); + } + } + + + enum UserBaseRole { + + ADMIN, + + USER, + + } + + String userBaseRoleSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue userBaseRoleDeserializer(dynamic data) { + switch (data) { + + case 'ADMIN': + return const Known(UserBaseRole.ADMIN); + + case 'USER': + return const Known(UserBaseRole.USER); + + default: + return Unknown(data); + } + } + + + enum ValidationStatus { + + APPROVED, + + PENDING_EXPERT_REVIEW, + + REJECTED, + + AI_VERIFIED, + + AI_FLAGGED, + + MANUAL_REVIEW_NEEDED, + + } + + String validationStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue validationStatusDeserializer(dynamic data) { + switch (data) { + + case 'APPROVED': + return const Known(ValidationStatus.APPROVED); + + case 'PENDING_EXPERT_REVIEW': + return const Known(ValidationStatus.PENDING_EXPERT_REVIEW); + + case 'REJECTED': + return const Known(ValidationStatus.REJECTED); + + case 'AI_VERIFIED': + return const Known(ValidationStatus.AI_VERIFIED); + + case 'AI_FLAGGED': + return const Known(ValidationStatus.AI_FLAGGED); + + case 'MANUAL_REVIEW_NEEDED': + return const Known(ValidationStatus.MANUAL_REVIEW_NEEDED); + + default: + return Unknown(data); + } + } + + + enum VendorTier { + + PREFERRED, + + APPROVED, + + STANDARD, + + } + + String vendorTierSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue vendorTierDeserializer(dynamic data) { + switch (data) { + + case 'PREFERRED': + return const Known(VendorTier.PREFERRED); + + case 'APPROVED': + return const Known(VendorTier.APPROVED); + + case 'STANDARD': + return const Known(VendorTier.STANDARD); + + default: + return Unknown(data); + } + } + + + enum WorkforceEmploymentType { + + W2, + + W1099, + + TEMPORARY, + + CONTRACT, + + } + + String workforceEmploymentTypeSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue workforceEmploymentTypeDeserializer(dynamic data) { + switch (data) { + + case 'W2': + return const Known(WorkforceEmploymentType.W2); + + case 'W1099': + return const Known(WorkforceEmploymentType.W1099); + + case 'TEMPORARY': + return const Known(WorkforceEmploymentType.TEMPORARY); + + case 'CONTRACT': + return const Known(WorkforceEmploymentType.CONTRACT); + + default: + return Unknown(data); + } + } + + + enum WorkforceStatus { + + ACTIVE, + + INACTIVE, + + } + + String workforceStatusSerializer(EnumValue e) { + return e.stringValue; + } + EnumValue workforceStatusDeserializer(dynamic data) { + switch (data) { + + case 'ACTIVE': + return const Known(WorkforceStatus.ACTIVE); + + case 'INACTIVE': + return const Known(WorkforceStatus.INACTIVE); + + default: + return Unknown(data); + } + } + + + + +String enumSerializer(Enum e) { + return e.name; +} + + + +/// A sealed class representing either a known enum value or an unknown string value. +@immutable +sealed class EnumValue { + const EnumValue(); + + + + /// The string representation of the value. + String get stringValue; + @override + String toString() { + return "EnumValue($stringValue)"; + } +} + +/// Represents a known, valid enum value. +class Known extends EnumValue { + /// The actual enum value. + final T value; + + const Known(this.value); + + @override + String get stringValue => value.name; + + @override + String toString() { + return "Known($stringValue)"; + } +} +/// Represents an unknown or unrecognized enum value. +class Unknown extends EnumValue { + /// The raw string value that couldn't be mapped to a known enum. + @override + final String stringValue; + + const Unknown(this.stringValue); + @override + String toString() { + return "Unknown($stringValue)"; + } +} + +class ExampleConnector { + + + CreateDocumentVariablesBuilder createDocument ({required DocumentType documentType, required String name, }) { + return CreateDocumentVariablesBuilder(dataConnect, documentType: documentType,name: name,); + } + + + UpdateDocumentVariablesBuilder updateDocument ({required String id, }) { + return UpdateDocumentVariablesBuilder(dataConnect, id: id,); + } + + + DeleteDocumentVariablesBuilder deleteDocument ({required String id, }) { + return DeleteDocumentVariablesBuilder(dataConnect, id: id,); + } + + + CreateConversationVariablesBuilder createConversation () { + return CreateConversationVariablesBuilder(dataConnect, ); + } + + + UpdateConversationVariablesBuilder updateConversation ({required String id, }) { + return UpdateConversationVariablesBuilder(dataConnect, id: id,); + } + + + UpdateConversationLastMessageVariablesBuilder updateConversationLastMessage ({required String id, }) { + return UpdateConversationLastMessageVariablesBuilder(dataConnect, id: id,); + } + + + DeleteConversationVariablesBuilder deleteConversation ({required String id, }) { + return DeleteConversationVariablesBuilder(dataConnect, id: id,); + } + + + ListHubsVariablesBuilder listHubs () { + return ListHubsVariablesBuilder(dataConnect, ); + } + + + GetHubByIdVariablesBuilder getHubById ({required String id, }) { + return GetHubByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetHubsByOwnerIdVariablesBuilder getHubsByOwnerId ({required String ownerId, }) { + return GetHubsByOwnerIdVariablesBuilder(dataConnect, ownerId: ownerId,); + } + + + FilterHubsVariablesBuilder filterHubs () { + return FilterHubsVariablesBuilder(dataConnect, ); + } + + + CreateInvoiceVariablesBuilder createInvoice ({required InvoiceStatus status, required String vendorId, required String businessId, required String orderId, required String invoiceNumber, required Timestamp issueDate, required Timestamp dueDate, required double amount, }) { + return CreateInvoiceVariablesBuilder(dataConnect, status: status,vendorId: vendorId,businessId: businessId,orderId: orderId,invoiceNumber: invoiceNumber,issueDate: issueDate,dueDate: dueDate,amount: amount,); + } + + + UpdateInvoiceVariablesBuilder updateInvoice ({required String id, }) { + return UpdateInvoiceVariablesBuilder(dataConnect, id: id,); + } + + + DeleteInvoiceVariablesBuilder deleteInvoice ({required String id, }) { + return DeleteInvoiceVariablesBuilder(dataConnect, id: id,); + } + + + CreateVendorRateVariablesBuilder createVendorRate ({required String vendorId, }) { + return CreateVendorRateVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + UpdateVendorRateVariablesBuilder updateVendorRate ({required String id, }) { + return UpdateVendorRateVariablesBuilder(dataConnect, id: id,); + } + + + DeleteVendorRateVariablesBuilder deleteVendorRate ({required String id, }) { + return DeleteVendorRateVariablesBuilder(dataConnect, id: id,); + } + + + ListCategoriesVariablesBuilder listCategories () { + return ListCategoriesVariablesBuilder(dataConnect, ); + } + + + GetCategoryByIdVariablesBuilder getCategoryById ({required String id, }) { + return GetCategoryByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterCategoriesVariablesBuilder filterCategories () { + return FilterCategoriesVariablesBuilder(dataConnect, ); + } + + + CreateClientFeedbackVariablesBuilder createClientFeedback ({required String businessId, required String vendorId, }) { + return CreateClientFeedbackVariablesBuilder(dataConnect, businessId: businessId,vendorId: vendorId,); + } + + + UpdateClientFeedbackVariablesBuilder updateClientFeedback ({required String id, }) { + return UpdateClientFeedbackVariablesBuilder(dataConnect, id: id,); + } + + + DeleteClientFeedbackVariablesBuilder deleteClientFeedback ({required String id, }) { + return DeleteClientFeedbackVariablesBuilder(dataConnect, id: id,); + } + + + CreateTeamVariablesBuilder createTeam ({required String teamName, required String ownerId, required String ownerName, required String ownerRole, }) { + return CreateTeamVariablesBuilder(dataConnect, teamName: teamName,ownerId: ownerId,ownerName: ownerName,ownerRole: ownerRole,); + } + + + UpdateTeamVariablesBuilder updateTeam ({required String id, }) { + return UpdateTeamVariablesBuilder(dataConnect, id: id,); + } + + + DeleteTeamVariablesBuilder deleteTeam ({required String id, }) { + return DeleteTeamVariablesBuilder(dataConnect, id: id,); + } + + + ListTeamHubsVariablesBuilder listTeamHubs () { + return ListTeamHubsVariablesBuilder(dataConnect, ); + } + + + GetTeamHubByIdVariablesBuilder getTeamHubById ({required String id, }) { + return GetTeamHubByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetTeamHubsByTeamIdVariablesBuilder getTeamHubsByTeamId ({required String teamId, }) { + return GetTeamHubsByTeamIdVariablesBuilder(dataConnect, teamId: teamId,); + } + + + ListTeamHubsByOwnerIdVariablesBuilder listTeamHubsByOwnerId ({required String ownerId, }) { + return ListTeamHubsByOwnerIdVariablesBuilder(dataConnect, ownerId: ownerId,); + } + + + CreateVendorVariablesBuilder createVendor ({required String userId, required String companyName, }) { + return CreateVendorVariablesBuilder(dataConnect, userId: userId,companyName: companyName,); + } + + + UpdateVendorVariablesBuilder updateVendor ({required String id, }) { + return UpdateVendorVariablesBuilder(dataConnect, id: id,); + } + + + DeleteVendorVariablesBuilder deleteVendor ({required String id, }) { + return DeleteVendorVariablesBuilder(dataConnect, id: id,); + } + + + CreateWorkforceVariablesBuilder createWorkforce ({required String vendorId, required String staffId, required String workforceNumber, }) { + return CreateWorkforceVariablesBuilder(dataConnect, vendorId: vendorId,staffId: staffId,workforceNumber: workforceNumber,); + } + + + UpdateWorkforceVariablesBuilder updateWorkforce ({required String id, }) { + return UpdateWorkforceVariablesBuilder(dataConnect, id: id,); + } + + + DeactivateWorkforceVariablesBuilder deactivateWorkforce ({required String id, }) { + return DeactivateWorkforceVariablesBuilder(dataConnect, id: id,); + } + + + CreateBusinessVariablesBuilder createBusiness ({required String businessName, required String userId, required BusinessRateGroup rateGroup, required BusinessStatus status, }) { + return CreateBusinessVariablesBuilder(dataConnect, businessName: businessName,userId: userId,rateGroup: rateGroup,status: status,); + } + + + UpdateBusinessVariablesBuilder updateBusiness ({required String id, }) { + return UpdateBusinessVariablesBuilder(dataConnect, id: id,); + } + + + DeleteBusinessVariablesBuilder deleteBusiness ({required String id, }) { + return DeleteBusinessVariablesBuilder(dataConnect, id: id,); + } + + + ListActivityLogsVariablesBuilder listActivityLogs () { + return ListActivityLogsVariablesBuilder(dataConnect, ); + } + + + GetActivityLogByIdVariablesBuilder getActivityLogById ({required String id, }) { + return GetActivityLogByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListActivityLogsByUserIdVariablesBuilder listActivityLogsByUserId ({required String userId, }) { + return ListActivityLogsByUserIdVariablesBuilder(dataConnect, userId: userId,); + } + + + ListUnreadActivityLogsByUserIdVariablesBuilder listUnreadActivityLogsByUserId ({required String userId, }) { + return ListUnreadActivityLogsByUserIdVariablesBuilder(dataConnect, userId: userId,); + } + + + FilterActivityLogsVariablesBuilder filterActivityLogs () { + return FilterActivityLogsVariablesBuilder(dataConnect, ); + } + + + CreateHubVariablesBuilder createHub ({required String name, required String ownerId, }) { + return CreateHubVariablesBuilder(dataConnect, name: name,ownerId: ownerId,); + } + + + UpdateHubVariablesBuilder updateHub ({required String id, }) { + return UpdateHubVariablesBuilder(dataConnect, id: id,); + } + + + DeleteHubVariablesBuilder deleteHub ({required String id, }) { + return DeleteHubVariablesBuilder(dataConnect, id: id,); + } + + + CreateLevelVariablesBuilder createLevel ({required String name, required int xpRequired, }) { + return CreateLevelVariablesBuilder(dataConnect, name: name,xpRequired: xpRequired,); + } + + + UpdateLevelVariablesBuilder updateLevel ({required String id, }) { + return UpdateLevelVariablesBuilder(dataConnect, id: id,); + } + + + DeleteLevelVariablesBuilder deleteLevel ({required String id, }) { + return DeleteLevelVariablesBuilder(dataConnect, id: id,); + } + + + ListLevelsVariablesBuilder listLevels () { + return ListLevelsVariablesBuilder(dataConnect, ); + } + + + GetLevelByIdVariablesBuilder getLevelById ({required String id, }) { + return GetLevelByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterLevelsVariablesBuilder filterLevels () { + return FilterLevelsVariablesBuilder(dataConnect, ); + } + + + CreateRecentPaymentVariablesBuilder createRecentPayment ({required String staffId, required String applicationId, required String invoiceId, }) { + return CreateRecentPaymentVariablesBuilder(dataConnect, staffId: staffId,applicationId: applicationId,invoiceId: invoiceId,); + } + + + UpdateRecentPaymentVariablesBuilder updateRecentPayment ({required String id, }) { + return UpdateRecentPaymentVariablesBuilder(dataConnect, id: id,); + } + + + DeleteRecentPaymentVariablesBuilder deleteRecentPayment ({required String id, }) { + return DeleteRecentPaymentVariablesBuilder(dataConnect, id: id,); + } + + + GetShiftRoleByIdVariablesBuilder getShiftRoleById ({required String shiftId, required String roleId, }) { + return GetShiftRoleByIdVariablesBuilder(dataConnect, shiftId: shiftId,roleId: roleId,); + } + + + ListShiftRolesByShiftIdVariablesBuilder listShiftRolesByShiftId ({required String shiftId, }) { + return ListShiftRolesByShiftIdVariablesBuilder(dataConnect, shiftId: shiftId,); + } + + + ListShiftRolesByRoleIdVariablesBuilder listShiftRolesByRoleId ({required String roleId, }) { + return ListShiftRolesByRoleIdVariablesBuilder(dataConnect, roleId: roleId,); + } + + + ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder listShiftRolesByShiftIdAndTimeRange ({required String shiftId, required Timestamp start, required Timestamp end, }) { + return ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder(dataConnect, shiftId: shiftId,start: start,end: end,); + } + + + ListShiftRolesByVendorIdVariablesBuilder listShiftRolesByVendorId ({required String vendorId, }) { + return ListShiftRolesByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + CreateTeamHudDepartmentVariablesBuilder createTeamHudDepartment ({required String name, required String teamHubId, }) { + return CreateTeamHudDepartmentVariablesBuilder(dataConnect, name: name,teamHubId: teamHubId,); + } + + + UpdateTeamHudDepartmentVariablesBuilder updateTeamHudDepartment ({required String id, }) { + return UpdateTeamHudDepartmentVariablesBuilder(dataConnect, id: id,); + } + + + DeleteTeamHudDepartmentVariablesBuilder deleteTeamHudDepartment ({required String id, }) { + return DeleteTeamHudDepartmentVariablesBuilder(dataConnect, id: id,); + } + + + CreateTeamMemberVariablesBuilder createTeamMember ({required String teamId, required TeamMemberRole role, required String userId, }) { + return CreateTeamMemberVariablesBuilder(dataConnect, teamId: teamId,role: role,userId: userId,); + } + + + UpdateTeamMemberVariablesBuilder updateTeamMember ({required String id, }) { + return UpdateTeamMemberVariablesBuilder(dataConnect, id: id,); + } + + + UpdateTeamMemberInviteStatusVariablesBuilder updateTeamMemberInviteStatus ({required String id, required TeamMemberInviteStatus inviteStatus, }) { + return UpdateTeamMemberInviteStatusVariablesBuilder(dataConnect, id: id,inviteStatus: inviteStatus,); + } + + + AcceptInviteByCodeVariablesBuilder acceptInviteByCode ({required String inviteCode, }) { + return AcceptInviteByCodeVariablesBuilder(dataConnect, inviteCode: inviteCode,); + } + + + CancelInviteByCodeVariablesBuilder cancelInviteByCode ({required String inviteCode, }) { + return CancelInviteByCodeVariablesBuilder(dataConnect, inviteCode: inviteCode,); + } + + + DeleteTeamMemberVariablesBuilder deleteTeamMember ({required String id, }) { + return DeleteTeamMemberVariablesBuilder(dataConnect, id: id,); + } + + + CreateUserVariablesBuilder createUser ({required String id, required UserBaseRole role, }) { + return CreateUserVariablesBuilder(dataConnect, id: id,role: role,); + } + + + UpdateUserVariablesBuilder updateUser ({required String id, }) { + return UpdateUserVariablesBuilder(dataConnect, id: id,); + } + + + DeleteUserVariablesBuilder deleteUser ({required String id, }) { + return DeleteUserVariablesBuilder(dataConnect, id: id,); + } + + + GetVendorByIdVariablesBuilder getVendorById ({required String id, }) { + return GetVendorByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetVendorByUserIdVariablesBuilder getVendorByUserId ({required String userId, }) { + return GetVendorByUserIdVariablesBuilder(dataConnect, userId: userId,); + } + + + ListVendorsVariablesBuilder listVendors () { + return ListVendorsVariablesBuilder(dataConnect, ); + } + + + CreateShiftVariablesBuilder createShift ({required String title, required String orderId, }) { + return CreateShiftVariablesBuilder(dataConnect, title: title,orderId: orderId,); + } + + + UpdateShiftVariablesBuilder updateShift ({required String id, }) { + return UpdateShiftVariablesBuilder(dataConnect, id: id,); + } + + + DeleteShiftVariablesBuilder deleteShift ({required String id, }) { + return DeleteShiftVariablesBuilder(dataConnect, id: id,); + } + + + ListShiftsVariablesBuilder listShifts () { + return ListShiftsVariablesBuilder(dataConnect, ); + } + + + GetShiftByIdVariablesBuilder getShiftById ({required String id, }) { + return GetShiftByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterShiftsVariablesBuilder filterShifts () { + return FilterShiftsVariablesBuilder(dataConnect, ); + } + + + GetShiftsByBusinessIdVariablesBuilder getShiftsByBusinessId ({required String businessId, }) { + return GetShiftsByBusinessIdVariablesBuilder(dataConnect, businessId: businessId,); + } + + + GetShiftsByVendorIdVariablesBuilder getShiftsByVendorId ({required String vendorId, }) { + return GetShiftsByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + CreateShiftRoleVariablesBuilder createShiftRole ({required String shiftId, required String roleId, required int count, }) { + return CreateShiftRoleVariablesBuilder(dataConnect, shiftId: shiftId,roleId: roleId,count: count,); + } + + + UpdateShiftRoleVariablesBuilder updateShiftRole ({required String shiftId, required String roleId, }) { + return UpdateShiftRoleVariablesBuilder(dataConnect, shiftId: shiftId,roleId: roleId,); + } + + + DeleteShiftRoleVariablesBuilder deleteShiftRole ({required String shiftId, required String roleId, }) { + return DeleteShiftRoleVariablesBuilder(dataConnect, shiftId: shiftId,roleId: roleId,); + } + + + ListCoursesVariablesBuilder listCourses () { + return ListCoursesVariablesBuilder(dataConnect, ); + } + + + GetCourseByIdVariablesBuilder getCourseById ({required String id, }) { + return GetCourseByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterCoursesVariablesBuilder filterCourses () { + return FilterCoursesVariablesBuilder(dataConnect, ); + } + + + ListDocumentsVariablesBuilder listDocuments () { + return ListDocumentsVariablesBuilder(dataConnect, ); + } + + + GetDocumentByIdVariablesBuilder getDocumentById ({required String id, }) { + return GetDocumentByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterDocumentsVariablesBuilder filterDocuments () { + return FilterDocumentsVariablesBuilder(dataConnect, ); + } + + + CreateAttireOptionVariablesBuilder createAttireOption ({required String itemId, required String label, }) { + return CreateAttireOptionVariablesBuilder(dataConnect, itemId: itemId,label: label,); + } + + + UpdateAttireOptionVariablesBuilder updateAttireOption ({required String id, }) { + return UpdateAttireOptionVariablesBuilder(dataConnect, id: id,); + } + + + DeleteAttireOptionVariablesBuilder deleteAttireOption ({required String id, }) { + return DeleteAttireOptionVariablesBuilder(dataConnect, id: id,); + } + + + CreateCategoryVariablesBuilder createCategory ({required String categoryId, required String label, }) { + return CreateCategoryVariablesBuilder(dataConnect, categoryId: categoryId,label: label,); + } + + + UpdateCategoryVariablesBuilder updateCategory ({required String id, }) { + return UpdateCategoryVariablesBuilder(dataConnect, id: id,); + } + + + DeleteCategoryVariablesBuilder deleteCategory ({required String id, }) { + return DeleteCategoryVariablesBuilder(dataConnect, id: id,); + } + + + ListConversationsVariablesBuilder listConversations () { + return ListConversationsVariablesBuilder(dataConnect, ); + } + + + GetConversationByIdVariablesBuilder getConversationById ({required String id, }) { + return GetConversationByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListConversationsByTypeVariablesBuilder listConversationsByType ({required ConversationType conversationType, }) { + return ListConversationsByTypeVariablesBuilder(dataConnect, conversationType: conversationType,); + } + + + ListConversationsByStatusVariablesBuilder listConversationsByStatus ({required ConversationStatus status, }) { + return ListConversationsByStatusVariablesBuilder(dataConnect, status: status,); + } + + + FilterConversationsVariablesBuilder filterConversations () { + return FilterConversationsVariablesBuilder(dataConnect, ); + } + + + ListAttireOptionsVariablesBuilder listAttireOptions () { + return ListAttireOptionsVariablesBuilder(dataConnect, ); + } + + + GetAttireOptionByIdVariablesBuilder getAttireOptionById ({required String id, }) { + return GetAttireOptionByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterAttireOptionsVariablesBuilder filterAttireOptions () { + return FilterAttireOptionsVariablesBuilder(dataConnect, ); + } + + + CreateStaffVariablesBuilder createStaff ({required String userId, required String fullName, }) { + return CreateStaffVariablesBuilder(dataConnect, userId: userId,fullName: fullName,); + } + + + UpdateStaffVariablesBuilder updateStaff ({required String id, }) { + return UpdateStaffVariablesBuilder(dataConnect, id: id,); + } + + + DeleteStaffVariablesBuilder deleteStaff ({required String id, }) { + return DeleteStaffVariablesBuilder(dataConnect, id: id,); + } + + + CreateStaffDocumentVariablesBuilder createStaffDocument ({required String staffId, required String staffName, required String documentId, required DocumentStatus status, }) { + return CreateStaffDocumentVariablesBuilder(dataConnect, staffId: staffId,staffName: staffName,documentId: documentId,status: status,); + } + + + UpdateStaffDocumentVariablesBuilder updateStaffDocument ({required String staffId, required String documentId, }) { + return UpdateStaffDocumentVariablesBuilder(dataConnect, staffId: staffId,documentId: documentId,); + } + + + DeleteStaffDocumentVariablesBuilder deleteStaffDocument ({required String staffId, required String documentId, }) { + return DeleteStaffDocumentVariablesBuilder(dataConnect, staffId: staffId,documentId: documentId,); + } + + + CreateStaffRoleVariablesBuilder createStaffRole ({required String staffId, required String roleId, }) { + return CreateStaffRoleVariablesBuilder(dataConnect, staffId: staffId,roleId: roleId,); + } + + + DeleteStaffRoleVariablesBuilder deleteStaffRole ({required String staffId, required String roleId, }) { + return DeleteStaffRoleVariablesBuilder(dataConnect, staffId: staffId,roleId: roleId,); + } + + + ListTaxFormsVariablesBuilder listTaxForms () { + return ListTaxFormsVariablesBuilder(dataConnect, ); + } + + + GetTaxFormByIdVariablesBuilder getTaxFormById ({required String id, }) { + return GetTaxFormByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetTaxFormsBystaffIdVariablesBuilder getTaxFormsBystaffId ({required String staffId, }) { + return GetTaxFormsBystaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + FilterTaxFormsVariablesBuilder filterTaxForms () { + return FilterTaxFormsVariablesBuilder(dataConnect, ); + } + + + ListTeamsVariablesBuilder listTeams () { + return ListTeamsVariablesBuilder(dataConnect, ); + } + + + GetTeamByIdVariablesBuilder getTeamById ({required String id, }) { + return GetTeamByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetTeamsByOwnerIdVariablesBuilder getTeamsByOwnerId ({required String ownerId, }) { + return GetTeamsByOwnerIdVariablesBuilder(dataConnect, ownerId: ownerId,); + } + + + ListTeamHudDepartmentsVariablesBuilder listTeamHudDepartments () { + return ListTeamHudDepartmentsVariablesBuilder(dataConnect, ); + } + + + GetTeamHudDepartmentByIdVariablesBuilder getTeamHudDepartmentById ({required String id, }) { + return GetTeamHudDepartmentByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListTeamHudDepartmentsByTeamHubIdVariablesBuilder listTeamHudDepartmentsByTeamHubId ({required String teamHubId, }) { + return ListTeamHudDepartmentsByTeamHubIdVariablesBuilder(dataConnect, teamHubId: teamHubId,); + } + + + CreateCertificateVariablesBuilder createCertificate ({required String name, required CertificateStatus status, required String staffId, }) { + return CreateCertificateVariablesBuilder(dataConnect, name: name,status: status,staffId: staffId,); + } + + + UpdateCertificateVariablesBuilder updateCertificate ({required String id, }) { + return UpdateCertificateVariablesBuilder(dataConnect, id: id,); + } + + + DeleteCertificateVariablesBuilder deleteCertificate ({required String id, }) { + return DeleteCertificateVariablesBuilder(dataConnect, id: id,); + } + + + ListCustomRateCardsVariablesBuilder listCustomRateCards () { + return ListCustomRateCardsVariablesBuilder(dataConnect, ); + } + + + GetCustomRateCardByIdVariablesBuilder getCustomRateCardById ({required String id, }) { + return GetCustomRateCardByIdVariablesBuilder(dataConnect, id: id,); + } + + + CreateFaqDataVariablesBuilder createFaqData ({required String category, }) { + return CreateFaqDataVariablesBuilder(dataConnect, category: category,); + } + + + UpdateFaqDataVariablesBuilder updateFaqData ({required String id, }) { + return UpdateFaqDataVariablesBuilder(dataConnect, id: id,); + } + + + DeleteFaqDataVariablesBuilder deleteFaqData ({required String id, }) { + return DeleteFaqDataVariablesBuilder(dataConnect, id: id,); + } + + + ListMessagesVariablesBuilder listMessages () { + return ListMessagesVariablesBuilder(dataConnect, ); + } + + + GetMessageByIdVariablesBuilder getMessageById ({required String id, }) { + return GetMessageByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetMessagesByConversationIdVariablesBuilder getMessagesByConversationId ({required String conversationId, }) { + return GetMessagesByConversationIdVariablesBuilder(dataConnect, conversationId: conversationId,); + } + + + CreateStaffAvailabilityStatsVariablesBuilder createStaffAvailabilityStats ({required String staffId, }) { + return CreateStaffAvailabilityStatsVariablesBuilder(dataConnect, staffId: staffId,); + } + + + UpdateStaffAvailabilityStatsVariablesBuilder updateStaffAvailabilityStats ({required String staffId, }) { + return UpdateStaffAvailabilityStatsVariablesBuilder(dataConnect, staffId: staffId,); + } + + + DeleteStaffAvailabilityStatsVariablesBuilder deleteStaffAvailabilityStats ({required String staffId, }) { + return DeleteStaffAvailabilityStatsVariablesBuilder(dataConnect, staffId: staffId,); + } + + + GetStaffDocumentByKeyVariablesBuilder getStaffDocumentByKey ({required String staffId, required String documentId, }) { + return GetStaffDocumentByKeyVariablesBuilder(dataConnect, staffId: staffId,documentId: documentId,); + } + + + ListStaffDocumentsByStaffIdVariablesBuilder listStaffDocumentsByStaffId ({required String staffId, }) { + return ListStaffDocumentsByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + ListStaffDocumentsByDocumentTypeVariablesBuilder listStaffDocumentsByDocumentType ({required DocumentType documentType, }) { + return ListStaffDocumentsByDocumentTypeVariablesBuilder(dataConnect, documentType: documentType,); + } + + + ListStaffDocumentsByStatusVariablesBuilder listStaffDocumentsByStatus ({required DocumentStatus status, }) { + return ListStaffDocumentsByStatusVariablesBuilder(dataConnect, status: status,); + } + + + GetWorkforceByIdVariablesBuilder getWorkforceById ({required String id, }) { + return GetWorkforceByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetWorkforceByVendorAndStaffVariablesBuilder getWorkforceByVendorAndStaff ({required String vendorId, required String staffId, }) { + return GetWorkforceByVendorAndStaffVariablesBuilder(dataConnect, vendorId: vendorId,staffId: staffId,); + } + + + ListWorkforceByVendorIdVariablesBuilder listWorkforceByVendorId ({required String vendorId, }) { + return ListWorkforceByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + ListWorkforceByStaffIdVariablesBuilder listWorkforceByStaffId ({required String staffId, }) { + return ListWorkforceByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + GetWorkforceByVendorAndNumberVariablesBuilder getWorkforceByVendorAndNumber ({required String vendorId, required String workforceNumber, }) { + return GetWorkforceByVendorAndNumberVariablesBuilder(dataConnect, vendorId: vendorId,workforceNumber: workforceNumber,); + } + + + CreateActivityLogVariablesBuilder createActivityLog ({required String userId, required Timestamp date, required String title, required String description, required ActivityType activityType, }) { + return CreateActivityLogVariablesBuilder(dataConnect, userId: userId,date: date,title: title,description: description,activityType: activityType,); + } + + + UpdateActivityLogVariablesBuilder updateActivityLog ({required String id, }) { + return UpdateActivityLogVariablesBuilder(dataConnect, id: id,); + } + + + MarkActivityLogAsReadVariablesBuilder markActivityLogAsRead ({required String id, }) { + return MarkActivityLogAsReadVariablesBuilder(dataConnect, id: id,); + } + + + MarkActivityLogsAsReadVariablesBuilder markActivityLogsAsRead ({required List ids, }) { + return MarkActivityLogsAsReadVariablesBuilder(dataConnect, ids: ids,); + } + + + DeleteActivityLogVariablesBuilder deleteActivityLog ({required String id, }) { + return DeleteActivityLogVariablesBuilder(dataConnect, id: id,); + } + + + ListEmergencyContactsVariablesBuilder listEmergencyContacts () { + return ListEmergencyContactsVariablesBuilder(dataConnect, ); + } + + + GetEmergencyContactByIdVariablesBuilder getEmergencyContactById ({required String id, }) { + return GetEmergencyContactByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetEmergencyContactsByStaffIdVariablesBuilder getEmergencyContactsByStaffId ({required String staffId, }) { + return GetEmergencyContactsByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + ListFaqDatasVariablesBuilder listFaqDatas () { + return ListFaqDatasVariablesBuilder(dataConnect, ); + } + + + GetFaqDataByIdVariablesBuilder getFaqDataById ({required String id, }) { + return GetFaqDataByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterFaqDatasVariablesBuilder filterFaqDatas () { + return FilterFaqDatasVariablesBuilder(dataConnect, ); + } + + + CreateStaffAvailabilityVariablesBuilder createStaffAvailability ({required String staffId, required DayOfWeek day, required AvailabilitySlot slot, }) { + return CreateStaffAvailabilityVariablesBuilder(dataConnect, staffId: staffId,day: day,slot: slot,); + } + + + UpdateStaffAvailabilityVariablesBuilder updateStaffAvailability ({required String staffId, required DayOfWeek day, required AvailabilitySlot slot, }) { + return UpdateStaffAvailabilityVariablesBuilder(dataConnect, staffId: staffId,day: day,slot: slot,); + } + + + DeleteStaffAvailabilityVariablesBuilder deleteStaffAvailability ({required String staffId, required DayOfWeek day, required AvailabilitySlot slot, }) { + return DeleteStaffAvailabilityVariablesBuilder(dataConnect, staffId: staffId,day: day,slot: slot,); + } + + + ListStaffAvailabilityStatsVariablesBuilder listStaffAvailabilityStats () { + return ListStaffAvailabilityStatsVariablesBuilder(dataConnect, ); + } + + + GetStaffAvailabilityStatsByStaffIdVariablesBuilder getStaffAvailabilityStatsByStaffId ({required String staffId, }) { + return GetStaffAvailabilityStatsByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + FilterStaffAvailabilityStatsVariablesBuilder filterStaffAvailabilityStats () { + return FilterStaffAvailabilityStatsVariablesBuilder(dataConnect, ); + } + + + CreateTeamHubVariablesBuilder createTeamHub ({required String teamId, required String hubName, required String address, required String city, required String state, required String zipCode, required String managerName, }) { + return CreateTeamHubVariablesBuilder(dataConnect, teamId: teamId,hubName: hubName,address: address,city: city,state: state,zipCode: zipCode,managerName: managerName,); + } + + + UpdateTeamHubVariablesBuilder updateTeamHub ({required String id, }) { + return UpdateTeamHubVariablesBuilder(dataConnect, id: id,); + } + + + DeleteTeamHubVariablesBuilder deleteTeamHub ({required String id, }) { + return DeleteTeamHubVariablesBuilder(dataConnect, id: id,); + } + + + CreateUserConversationVariablesBuilder createUserConversation ({required String conversationId, required String userId, }) { + return CreateUserConversationVariablesBuilder(dataConnect, conversationId: conversationId,userId: userId,); + } + + + UpdateUserConversationVariablesBuilder updateUserConversation ({required String conversationId, required String userId, }) { + return UpdateUserConversationVariablesBuilder(dataConnect, conversationId: conversationId,userId: userId,); + } + + + MarkConversationAsReadVariablesBuilder markConversationAsRead ({required String conversationId, required String userId, }) { + return MarkConversationAsReadVariablesBuilder(dataConnect, conversationId: conversationId,userId: userId,); + } + + + IncrementUnreadForUserVariablesBuilder incrementUnreadForUser ({required String conversationId, required String userId, required int unreadCount, }) { + return IncrementUnreadForUserVariablesBuilder(dataConnect, conversationId: conversationId,userId: userId,unreadCount: unreadCount,); + } + + + DeleteUserConversationVariablesBuilder deleteUserConversation ({required String conversationId, required String userId, }) { + return DeleteUserConversationVariablesBuilder(dataConnect, conversationId: conversationId,userId: userId,); + } + + + ListBusinessesVariablesBuilder listBusinesses () { + return ListBusinessesVariablesBuilder(dataConnect, ); + } + + + GetBusinessesByUserIdVariablesBuilder getBusinessesByUserId ({required String userId, }) { + return GetBusinessesByUserIdVariablesBuilder(dataConnect, userId: userId,); + } + + + GetBusinessByIdVariablesBuilder getBusinessById ({required String id, }) { + return GetBusinessByIdVariablesBuilder(dataConnect, id: id,); + } + + + CreateMemberTaskVariablesBuilder createMemberTask ({required String teamMemberId, required String taskId, }) { + return CreateMemberTaskVariablesBuilder(dataConnect, teamMemberId: teamMemberId,taskId: taskId,); + } + + + DeleteMemberTaskVariablesBuilder deleteMemberTask ({required String teamMemberId, required String taskId, }) { + return DeleteMemberTaskVariablesBuilder(dataConnect, teamMemberId: teamMemberId,taskId: taskId,); + } + + + GetStaffCourseByIdVariablesBuilder getStaffCourseById ({required String id, }) { + return GetStaffCourseByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListStaffCoursesByStaffIdVariablesBuilder listStaffCoursesByStaffId ({required String staffId, }) { + return ListStaffCoursesByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + ListStaffCoursesByCourseIdVariablesBuilder listStaffCoursesByCourseId ({required String courseId, }) { + return ListStaffCoursesByCourseIdVariablesBuilder(dataConnect, courseId: courseId,); + } + + + GetStaffCourseByStaffAndCourseVariablesBuilder getStaffCourseByStaffAndCourse ({required String staffId, required String courseId, }) { + return GetStaffCourseByStaffAndCourseVariablesBuilder(dataConnect, staffId: staffId,courseId: courseId,); + } + + + CreateTaskVariablesBuilder createTask ({required String taskName, required TaskPriority priority, required TaskStatus status, required String ownerId, }) { + return CreateTaskVariablesBuilder(dataConnect, taskName: taskName,priority: priority,status: status,ownerId: ownerId,); + } + + + UpdateTaskVariablesBuilder updateTask ({required String id, }) { + return UpdateTaskVariablesBuilder(dataConnect, id: id,); + } + + + DeleteTaskVariablesBuilder deleteTask ({required String id, }) { + return DeleteTaskVariablesBuilder(dataConnect, id: id,); + } + + + ListTasksVariablesBuilder listTasks () { + return ListTasksVariablesBuilder(dataConnect, ); + } + + + GetTaskByIdVariablesBuilder getTaskById ({required String id, }) { + return GetTaskByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetTasksByOwnerIdVariablesBuilder getTasksByOwnerId ({required String ownerId, }) { + return GetTasksByOwnerIdVariablesBuilder(dataConnect, ownerId: ownerId,); + } + + + FilterTasksVariablesBuilder filterTasks () { + return FilterTasksVariablesBuilder(dataConnect, ); + } + + + ListAssignmentsVariablesBuilder listAssignments () { + return ListAssignmentsVariablesBuilder(dataConnect, ); + } + + + GetAssignmentByIdVariablesBuilder getAssignmentById ({required String id, }) { + return GetAssignmentByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListAssignmentsByWorkforceIdVariablesBuilder listAssignmentsByWorkforceId ({required String workforceId, }) { + return ListAssignmentsByWorkforceIdVariablesBuilder(dataConnect, workforceId: workforceId,); + } + + + ListAssignmentsByWorkforceIdsVariablesBuilder listAssignmentsByWorkforceIds ({required List workforceIds, }) { + return ListAssignmentsByWorkforceIdsVariablesBuilder(dataConnect, workforceIds: workforceIds,); + } + + + ListAssignmentsByShiftRoleVariablesBuilder listAssignmentsByShiftRole ({required String shiftId, required String roleId, }) { + return ListAssignmentsByShiftRoleVariablesBuilder(dataConnect, shiftId: shiftId,roleId: roleId,); + } + + + FilterAssignmentsVariablesBuilder filterAssignments ({required List shiftIds, required List roleIds, }) { + return FilterAssignmentsVariablesBuilder(dataConnect, shiftIds: shiftIds,roleIds: roleIds,); + } + + + ListInvoicesVariablesBuilder listInvoices () { + return ListInvoicesVariablesBuilder(dataConnect, ); + } + + + GetInvoiceByIdVariablesBuilder getInvoiceById ({required String id, }) { + return GetInvoiceByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListInvoicesByVendorIdVariablesBuilder listInvoicesByVendorId ({required String vendorId, }) { + return ListInvoicesByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + ListInvoicesByBusinessIdVariablesBuilder listInvoicesByBusinessId ({required String businessId, }) { + return ListInvoicesByBusinessIdVariablesBuilder(dataConnect, businessId: businessId,); + } + + + ListInvoicesByOrderIdVariablesBuilder listInvoicesByOrderId ({required String orderId, }) { + return ListInvoicesByOrderIdVariablesBuilder(dataConnect, orderId: orderId,); + } + + + ListInvoicesByStatusVariablesBuilder listInvoicesByStatus ({required InvoiceStatus status, }) { + return ListInvoicesByStatusVariablesBuilder(dataConnect, status: status,); + } + + + FilterInvoicesVariablesBuilder filterInvoices () { + return FilterInvoicesVariablesBuilder(dataConnect, ); + } + + + ListOverdueInvoicesVariablesBuilder listOverdueInvoices ({required Timestamp now, }) { + return ListOverdueInvoicesVariablesBuilder(dataConnect, now: now,); + } + + + ListTaskCommentsVariablesBuilder listTaskComments () { + return ListTaskCommentsVariablesBuilder(dataConnect, ); + } + + + GetTaskCommentByIdVariablesBuilder getTaskCommentById ({required String id, }) { + return GetTaskCommentByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetTaskCommentsByTaskIdVariablesBuilder getTaskCommentsByTaskId ({required String taskId, }) { + return GetTaskCommentsByTaskIdVariablesBuilder(dataConnect, taskId: taskId,); + } + + + CreateVendorBenefitPlanVariablesBuilder createVendorBenefitPlan ({required String vendorId, required String title, }) { + return CreateVendorBenefitPlanVariablesBuilder(dataConnect, vendorId: vendorId,title: title,); + } + + + UpdateVendorBenefitPlanVariablesBuilder updateVendorBenefitPlan ({required String id, }) { + return UpdateVendorBenefitPlanVariablesBuilder(dataConnect, id: id,); + } + + + DeleteVendorBenefitPlanVariablesBuilder deleteVendorBenefitPlan ({required String id, }) { + return DeleteVendorBenefitPlanVariablesBuilder(dataConnect, id: id,); + } + + + ListVendorRatesVariablesBuilder listVendorRates () { + return ListVendorRatesVariablesBuilder(dataConnect, ); + } + + + GetVendorRateByIdVariablesBuilder getVendorRateById ({required String id, }) { + return GetVendorRateByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListApplicationsVariablesBuilder listApplications () { + return ListApplicationsVariablesBuilder(dataConnect, ); + } + + + GetApplicationByIdVariablesBuilder getApplicationById ({required String id, }) { + return GetApplicationByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetApplicationsByShiftIdVariablesBuilder getApplicationsByShiftId ({required String shiftId, }) { + return GetApplicationsByShiftIdVariablesBuilder(dataConnect, shiftId: shiftId,); + } + + + GetApplicationsByShiftIdAndStatusVariablesBuilder getApplicationsByShiftIdAndStatus ({required String shiftId, required ApplicationStatus status, }) { + return GetApplicationsByShiftIdAndStatusVariablesBuilder(dataConnect, shiftId: shiftId,status: status,); + } + + + GetApplicationsByStaffIdVariablesBuilder getApplicationsByStaffId ({required String staffId, }) { + return GetApplicationsByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + ListInvoiceTemplatesVariablesBuilder listInvoiceTemplates () { + return ListInvoiceTemplatesVariablesBuilder(dataConnect, ); + } + + + GetInvoiceTemplateByIdVariablesBuilder getInvoiceTemplateById ({required String id, }) { + return GetInvoiceTemplateByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListInvoiceTemplatesByOwnerIdVariablesBuilder listInvoiceTemplatesByOwnerId ({required String ownerId, }) { + return ListInvoiceTemplatesByOwnerIdVariablesBuilder(dataConnect, ownerId: ownerId,); + } + + + ListInvoiceTemplatesByVendorIdVariablesBuilder listInvoiceTemplatesByVendorId ({required String vendorId, }) { + return ListInvoiceTemplatesByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + ListInvoiceTemplatesByBusinessIdVariablesBuilder listInvoiceTemplatesByBusinessId ({required String businessId, }) { + return ListInvoiceTemplatesByBusinessIdVariablesBuilder(dataConnect, businessId: businessId,); + } + + + ListInvoiceTemplatesByOrderIdVariablesBuilder listInvoiceTemplatesByOrderId ({required String orderId, }) { + return ListInvoiceTemplatesByOrderIdVariablesBuilder(dataConnect, orderId: orderId,); + } + + + SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder searchInvoiceTemplatesByOwnerAndName ({required String ownerId, required String name, }) { + return SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder(dataConnect, ownerId: ownerId,name: name,); + } + + + ListRolesVariablesBuilder listRoles () { + return ListRolesVariablesBuilder(dataConnect, ); + } + + + GetRoleByIdVariablesBuilder getRoleById ({required String id, }) { + return GetRoleByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListRolesByVendorIdVariablesBuilder listRolesByVendorId ({required String vendorId, }) { + return ListRolesByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + ListRolesByroleCategoryIdVariablesBuilder listRolesByroleCategoryId ({required String roleCategoryId, }) { + return ListRolesByroleCategoryIdVariablesBuilder(dataConnect, roleCategoryId: roleCategoryId,); + } + + + ListStaffVariablesBuilder listStaff () { + return ListStaffVariablesBuilder(dataConnect, ); + } + + + GetStaffByIdVariablesBuilder getStaffById ({required String id, }) { + return GetStaffByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetStaffByUserIdVariablesBuilder getStaffByUserId ({required String userId, }) { + return GetStaffByUserIdVariablesBuilder(dataConnect, userId: userId,); + } + + + FilterStaffVariablesBuilder filterStaff () { + return FilterStaffVariablesBuilder(dataConnect, ); + } + + + CreateTaskCommentVariablesBuilder createTaskComment ({required String taskId, required String teamMemberId, required String comment, }) { + return CreateTaskCommentVariablesBuilder(dataConnect, taskId: taskId,teamMemberId: teamMemberId,comment: comment,); + } + + + UpdateTaskCommentVariablesBuilder updateTaskComment ({required String id, }) { + return UpdateTaskCommentVariablesBuilder(dataConnect, id: id,); + } + + + DeleteTaskCommentVariablesBuilder deleteTaskComment ({required String id, }) { + return DeleteTaskCommentVariablesBuilder(dataConnect, id: id,); + } + + + ListUserConversationsVariablesBuilder listUserConversations () { + return ListUserConversationsVariablesBuilder(dataConnect, ); + } + + + GetUserConversationByKeyVariablesBuilder getUserConversationByKey ({required String conversationId, required String userId, }) { + return GetUserConversationByKeyVariablesBuilder(dataConnect, conversationId: conversationId,userId: userId,); + } + + + ListUserConversationsByUserIdVariablesBuilder listUserConversationsByUserId ({required String userId, }) { + return ListUserConversationsByUserIdVariablesBuilder(dataConnect, userId: userId,); + } + + + ListUnreadUserConversationsByUserIdVariablesBuilder listUnreadUserConversationsByUserId ({required String userId, }) { + return ListUnreadUserConversationsByUserIdVariablesBuilder(dataConnect, userId: userId,); + } + + + ListUserConversationsByConversationIdVariablesBuilder listUserConversationsByConversationId ({required String conversationId, }) { + return ListUserConversationsByConversationIdVariablesBuilder(dataConnect, conversationId: conversationId,); + } + + + FilterUserConversationsVariablesBuilder filterUserConversations () { + return FilterUserConversationsVariablesBuilder(dataConnect, ); + } + + + ListCertificatesVariablesBuilder listCertificates () { + return ListCertificatesVariablesBuilder(dataConnect, ); + } + + + GetCertificateByIdVariablesBuilder getCertificateById ({required String id, }) { + return GetCertificateByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListCertificatesByStaffIdVariablesBuilder listCertificatesByStaffId ({required String staffId, }) { + return ListCertificatesByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + GetMyTasksVariablesBuilder getMyTasks ({required String teamMemberId, }) { + return GetMyTasksVariablesBuilder(dataConnect, teamMemberId: teamMemberId,); + } + + + GetMemberTaskByIdKeyVariablesBuilder getMemberTaskByIdKey ({required String teamMemberId, required String taskId, }) { + return GetMemberTaskByIdKeyVariablesBuilder(dataConnect, teamMemberId: teamMemberId,taskId: taskId,); + } + + + GetMemberTasksByTaskIdVariablesBuilder getMemberTasksByTaskId ({required String taskId, }) { + return GetMemberTasksByTaskIdVariablesBuilder(dataConnect, taskId: taskId,); + } + + + ListRecentPaymentsVariablesBuilder listRecentPayments () { + return ListRecentPaymentsVariablesBuilder(dataConnect, ); + } + + + GetRecentPaymentByIdVariablesBuilder getRecentPaymentById ({required String id, }) { + return GetRecentPaymentByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListRecentPaymentsByStaffIdVariablesBuilder listRecentPaymentsByStaffId ({required String staffId, }) { + return ListRecentPaymentsByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + ListRecentPaymentsByApplicationIdVariablesBuilder listRecentPaymentsByApplicationId ({required String applicationId, }) { + return ListRecentPaymentsByApplicationIdVariablesBuilder(dataConnect, applicationId: applicationId,); + } + + + ListRecentPaymentsByInvoiceIdVariablesBuilder listRecentPaymentsByInvoiceId ({required String invoiceId, }) { + return ListRecentPaymentsByInvoiceIdVariablesBuilder(dataConnect, invoiceId: invoiceId,); + } + + + ListRecentPaymentsByStatusVariablesBuilder listRecentPaymentsByStatus ({required RecentPaymentStatus status, }) { + return ListRecentPaymentsByStatusVariablesBuilder(dataConnect, status: status,); + } + + + ListRecentPaymentsByInvoiceIdsVariablesBuilder listRecentPaymentsByInvoiceIds ({required List invoiceIds, }) { + return ListRecentPaymentsByInvoiceIdsVariablesBuilder(dataConnect, invoiceIds: invoiceIds,); + } + + + ListRecentPaymentsByBusinessIdVariablesBuilder listRecentPaymentsByBusinessId ({required String businessId, }) { + return ListRecentPaymentsByBusinessIdVariablesBuilder(dataConnect, businessId: businessId,); + } + + + CreateTaxFormVariablesBuilder createTaxForm ({required TaxFormType formType, required String title, required String staffId, }) { + return CreateTaxFormVariablesBuilder(dataConnect, formType: formType,title: title,staffId: staffId,); + } + + + UpdateTaxFormVariablesBuilder updateTaxForm ({required String id, }) { + return UpdateTaxFormVariablesBuilder(dataConnect, id: id,); + } + + + DeleteTaxFormVariablesBuilder deleteTaxForm ({required String id, }) { + return DeleteTaxFormVariablesBuilder(dataConnect, id: id,); + } + + + CreateMessageVariablesBuilder createMessage ({required String conversationId, required String senderId, required String content, }) { + return CreateMessageVariablesBuilder(dataConnect, conversationId: conversationId,senderId: senderId,content: content,); + } + + + UpdateMessageVariablesBuilder updateMessage ({required String id, }) { + return UpdateMessageVariablesBuilder(dataConnect, id: id,); + } + + + DeleteMessageVariablesBuilder deleteMessage ({required String id, }) { + return DeleteMessageVariablesBuilder(dataConnect, id: id,); + } + + + ListRoleCategoriesVariablesBuilder listRoleCategories () { + return ListRoleCategoriesVariablesBuilder(dataConnect, ); + } + + + GetRoleCategoryByIdVariablesBuilder getRoleCategoryById ({required String id, }) { + return GetRoleCategoryByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetRoleCategoriesByCategoryVariablesBuilder getRoleCategoriesByCategory ({required RoleCategoryType category, }) { + return GetRoleCategoriesByCategoryVariablesBuilder(dataConnect, category: category,); + } + + + CreateApplicationVariablesBuilder createApplication ({required String shiftId, required String staffId, required ApplicationStatus status, required ApplicationOrigin origin, required String roleId, }) { + return CreateApplicationVariablesBuilder(dataConnect, shiftId: shiftId,staffId: staffId,status: status,origin: origin,roleId: roleId,); + } + + + UpdateApplicationStatusVariablesBuilder updateApplicationStatus ({required String id, required String roleId, }) { + return UpdateApplicationStatusVariablesBuilder(dataConnect, id: id,roleId: roleId,); + } + + + DeleteApplicationVariablesBuilder deleteApplication ({required String id, }) { + return DeleteApplicationVariablesBuilder(dataConnect, id: id,); + } + + + CreateAssignmentVariablesBuilder createAssignment ({required String workforceId, required String roleId, required String shiftId, }) { + return CreateAssignmentVariablesBuilder(dataConnect, workforceId: workforceId,roleId: roleId,shiftId: shiftId,); + } + + + UpdateAssignmentVariablesBuilder updateAssignment ({required String id, required String roleId, required String shiftId, }) { + return UpdateAssignmentVariablesBuilder(dataConnect, id: id,roleId: roleId,shiftId: shiftId,); + } + + + DeleteAssignmentVariablesBuilder deleteAssignment ({required String id, }) { + return DeleteAssignmentVariablesBuilder(dataConnect, id: id,); + } + + + CreateBenefitsDataVariablesBuilder createBenefitsData ({required String vendorBenefitPlanId, required String staffId, required int current, }) { + return CreateBenefitsDataVariablesBuilder(dataConnect, vendorBenefitPlanId: vendorBenefitPlanId,staffId: staffId,current: current,); + } + + + UpdateBenefitsDataVariablesBuilder updateBenefitsData ({required String staffId, required String vendorBenefitPlanId, }) { + return UpdateBenefitsDataVariablesBuilder(dataConnect, staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,); + } + + + DeleteBenefitsDataVariablesBuilder deleteBenefitsData ({required String staffId, required String vendorBenefitPlanId, }) { + return DeleteBenefitsDataVariablesBuilder(dataConnect, staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,); + } + + + ListUsersVariablesBuilder listUsers () { + return ListUsersVariablesBuilder(dataConnect, ); + } + + + GetUserByIdVariablesBuilder getUserById ({required String id, }) { + return GetUserByIdVariablesBuilder(dataConnect, id: id,); + } + + + FilterUsersVariablesBuilder filterUsers () { + return FilterUsersVariablesBuilder(dataConnect, ); + } + + + ListClientFeedbacksVariablesBuilder listClientFeedbacks () { + return ListClientFeedbacksVariablesBuilder(dataConnect, ); + } + + + GetClientFeedbackByIdVariablesBuilder getClientFeedbackById ({required String id, }) { + return GetClientFeedbackByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListClientFeedbacksByBusinessIdVariablesBuilder listClientFeedbacksByBusinessId ({required String businessId, }) { + return ListClientFeedbacksByBusinessIdVariablesBuilder(dataConnect, businessId: businessId,); + } + + + ListClientFeedbacksByVendorIdVariablesBuilder listClientFeedbacksByVendorId ({required String vendorId, }) { + return ListClientFeedbacksByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + ListClientFeedbacksByBusinessAndVendorVariablesBuilder listClientFeedbacksByBusinessAndVendor ({required String businessId, required String vendorId, }) { + return ListClientFeedbacksByBusinessAndVendorVariablesBuilder(dataConnect, businessId: businessId,vendorId: vendorId,); + } + + + FilterClientFeedbacksVariablesBuilder filterClientFeedbacks () { + return FilterClientFeedbacksVariablesBuilder(dataConnect, ); + } + + + ListClientFeedbackRatingsByVendorIdVariablesBuilder listClientFeedbackRatingsByVendorId ({required String vendorId, }) { + return ListClientFeedbackRatingsByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + CreateCustomRateCardVariablesBuilder createCustomRateCard ({required String name, }) { + return CreateCustomRateCardVariablesBuilder(dataConnect, name: name,); + } + + + UpdateCustomRateCardVariablesBuilder updateCustomRateCard ({required String id, }) { + return UpdateCustomRateCardVariablesBuilder(dataConnect, id: id,); + } + + + DeleteCustomRateCardVariablesBuilder deleteCustomRateCard ({required String id, }) { + return DeleteCustomRateCardVariablesBuilder(dataConnect, id: id,); + } + + + CreateRoleCategoryVariablesBuilder createRoleCategory ({required String roleName, required RoleCategoryType category, }) { + return CreateRoleCategoryVariablesBuilder(dataConnect, roleName: roleName,category: category,); + } + + + UpdateRoleCategoryVariablesBuilder updateRoleCategory ({required String id, }) { + return UpdateRoleCategoryVariablesBuilder(dataConnect, id: id,); + } + + + DeleteRoleCategoryVariablesBuilder deleteRoleCategory ({required String id, }) { + return DeleteRoleCategoryVariablesBuilder(dataConnect, id: id,); + } + + + CreateStaffCourseVariablesBuilder createStaffCourse ({required String staffId, required String courseId, }) { + return CreateStaffCourseVariablesBuilder(dataConnect, staffId: staffId,courseId: courseId,); + } + + + UpdateStaffCourseVariablesBuilder updateStaffCourse ({required String id, }) { + return UpdateStaffCourseVariablesBuilder(dataConnect, id: id,); + } + + + DeleteStaffCourseVariablesBuilder deleteStaffCourse ({required String id, }) { + return DeleteStaffCourseVariablesBuilder(dataConnect, id: id,); + } + + + ListStaffRolesVariablesBuilder listStaffRoles () { + return ListStaffRolesVariablesBuilder(dataConnect, ); + } + + + GetStaffRoleByKeyVariablesBuilder getStaffRoleByKey ({required String staffId, required String roleId, }) { + return GetStaffRoleByKeyVariablesBuilder(dataConnect, staffId: staffId,roleId: roleId,); + } + + + ListStaffRolesByStaffIdVariablesBuilder listStaffRolesByStaffId ({required String staffId, }) { + return ListStaffRolesByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + ListStaffRolesByRoleIdVariablesBuilder listStaffRolesByRoleId ({required String roleId, }) { + return ListStaffRolesByRoleIdVariablesBuilder(dataConnect, roleId: roleId,); + } + + + FilterStaffRolesVariablesBuilder filterStaffRoles () { + return FilterStaffRolesVariablesBuilder(dataConnect, ); + } + + + CreateAccountVariablesBuilder createAccount ({required String bank, required AccountType type, required String last4, required String ownerId, }) { + return CreateAccountVariablesBuilder(dataConnect, bank: bank,type: type,last4: last4,ownerId: ownerId,); + } + + + UpdateAccountVariablesBuilder updateAccount ({required String id, }) { + return UpdateAccountVariablesBuilder(dataConnect, id: id,); + } + + + DeleteAccountVariablesBuilder deleteAccount ({required String id, }) { + return DeleteAccountVariablesBuilder(dataConnect, id: id,); + } + + + ListAccountsVariablesBuilder listAccounts () { + return ListAccountsVariablesBuilder(dataConnect, ); + } + + + GetAccountByIdVariablesBuilder getAccountById ({required String id, }) { + return GetAccountByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetAccountsByOwnerIdVariablesBuilder getAccountsByOwnerId ({required String ownerId, }) { + return GetAccountsByOwnerIdVariablesBuilder(dataConnect, ownerId: ownerId,); + } + + + FilterAccountsVariablesBuilder filterAccounts () { + return FilterAccountsVariablesBuilder(dataConnect, ); + } + + + CreateCourseVariablesBuilder createCourse ({required String categoryId, }) { + return CreateCourseVariablesBuilder(dataConnect, categoryId: categoryId,); + } + + + UpdateCourseVariablesBuilder updateCourse ({required String id, required String categoryId, }) { + return UpdateCourseVariablesBuilder(dataConnect, id: id,categoryId: categoryId,); + } + + + DeleteCourseVariablesBuilder deleteCourse ({required String id, }) { + return DeleteCourseVariablesBuilder(dataConnect, id: id,); + } + + + CreateEmergencyContactVariablesBuilder createEmergencyContact ({required String name, required String phone, required RelationshipType relationship, required String staffId, }) { + return CreateEmergencyContactVariablesBuilder(dataConnect, name: name,phone: phone,relationship: relationship,staffId: staffId,); + } + + + UpdateEmergencyContactVariablesBuilder updateEmergencyContact ({required String id, }) { + return UpdateEmergencyContactVariablesBuilder(dataConnect, id: id,); + } + + + DeleteEmergencyContactVariablesBuilder deleteEmergencyContact ({required String id, }) { + return DeleteEmergencyContactVariablesBuilder(dataConnect, id: id,); + } + + + CreateInvoiceTemplateVariablesBuilder createInvoiceTemplate ({required String name, required String ownerId, }) { + return CreateInvoiceTemplateVariablesBuilder(dataConnect, name: name,ownerId: ownerId,); + } + + + UpdateInvoiceTemplateVariablesBuilder updateInvoiceTemplate ({required String id, }) { + return UpdateInvoiceTemplateVariablesBuilder(dataConnect, id: id,); + } + + + DeleteInvoiceTemplateVariablesBuilder deleteInvoiceTemplate ({required String id, }) { + return DeleteInvoiceTemplateVariablesBuilder(dataConnect, id: id,); + } + + + ListOrdersVariablesBuilder listOrders () { + return ListOrdersVariablesBuilder(dataConnect, ); + } + + + GetOrderByIdVariablesBuilder getOrderById ({required String id, }) { + return GetOrderByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetOrdersByBusinessIdVariablesBuilder getOrdersByBusinessId ({required String businessId, }) { + return GetOrdersByBusinessIdVariablesBuilder(dataConnect, businessId: businessId,); + } + + + GetOrdersByVendorIdVariablesBuilder getOrdersByVendorId ({required String vendorId, }) { + return GetOrdersByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + GetOrdersByStatusVariablesBuilder getOrdersByStatus ({required OrderStatus status, }) { + return GetOrdersByStatusVariablesBuilder(dataConnect, status: status,); + } + + + GetOrdersByDateRangeVariablesBuilder getOrdersByDateRange ({required Timestamp start, required Timestamp end, }) { + return GetOrdersByDateRangeVariablesBuilder(dataConnect, start: start,end: end,); + } + + + GetRapidOrdersVariablesBuilder getRapidOrders () { + return GetRapidOrdersVariablesBuilder(dataConnect, ); + } + + + ListShiftsForCoverageVariablesBuilder listShiftsForCoverage ({required String businessId, required Timestamp startDate, required Timestamp endDate, }) { + return ListShiftsForCoverageVariablesBuilder(dataConnect, businessId: businessId,startDate: startDate,endDate: endDate,); + } + + + ListApplicationsForCoverageVariablesBuilder listApplicationsForCoverage ({required List shiftIds, }) { + return ListApplicationsForCoverageVariablesBuilder(dataConnect, shiftIds: shiftIds,); + } + + + ListShiftsForDailyOpsByBusinessVariablesBuilder listShiftsForDailyOpsByBusiness ({required String businessId, required Timestamp date, }) { + return ListShiftsForDailyOpsByBusinessVariablesBuilder(dataConnect, businessId: businessId,date: date,); + } + + + ListShiftsForDailyOpsByVendorVariablesBuilder listShiftsForDailyOpsByVendor ({required String vendorId, required Timestamp date, }) { + return ListShiftsForDailyOpsByVendorVariablesBuilder(dataConnect, vendorId: vendorId,date: date,); + } + + + ListApplicationsForDailyOpsVariablesBuilder listApplicationsForDailyOps ({required List shiftIds, }) { + return ListApplicationsForDailyOpsVariablesBuilder(dataConnect, shiftIds: shiftIds,); + } + + + ListShiftsForForecastByBusinessVariablesBuilder listShiftsForForecastByBusiness ({required String businessId, required Timestamp startDate, required Timestamp endDate, }) { + return ListShiftsForForecastByBusinessVariablesBuilder(dataConnect, businessId: businessId,startDate: startDate,endDate: endDate,); + } + + + ListShiftsForForecastByVendorVariablesBuilder listShiftsForForecastByVendor ({required String vendorId, required Timestamp startDate, required Timestamp endDate, }) { + return ListShiftsForForecastByVendorVariablesBuilder(dataConnect, vendorId: vendorId,startDate: startDate,endDate: endDate,); + } + + + ListShiftsForNoShowRangeByBusinessVariablesBuilder listShiftsForNoShowRangeByBusiness ({required String businessId, required Timestamp startDate, required Timestamp endDate, }) { + return ListShiftsForNoShowRangeByBusinessVariablesBuilder(dataConnect, businessId: businessId,startDate: startDate,endDate: endDate,); + } + + + ListShiftsForNoShowRangeByVendorVariablesBuilder listShiftsForNoShowRangeByVendor ({required String vendorId, required Timestamp startDate, required Timestamp endDate, }) { + return ListShiftsForNoShowRangeByVendorVariablesBuilder(dataConnect, vendorId: vendorId,startDate: startDate,endDate: endDate,); + } + + + ListApplicationsForNoShowRangeVariablesBuilder listApplicationsForNoShowRange ({required List shiftIds, }) { + return ListApplicationsForNoShowRangeVariablesBuilder(dataConnect, shiftIds: shiftIds,); + } + + + ListStaffForNoShowReportVariablesBuilder listStaffForNoShowReport ({required List staffIds, }) { + return ListStaffForNoShowReportVariablesBuilder(dataConnect, staffIds: staffIds,); + } + + + ListInvoicesForSpendByBusinessVariablesBuilder listInvoicesForSpendByBusiness ({required String businessId, required Timestamp startDate, required Timestamp endDate, }) { + return ListInvoicesForSpendByBusinessVariablesBuilder(dataConnect, businessId: businessId,startDate: startDate,endDate: endDate,); + } + + + ListInvoicesForSpendByVendorVariablesBuilder listInvoicesForSpendByVendor ({required String vendorId, required Timestamp startDate, required Timestamp endDate, }) { + return ListInvoicesForSpendByVendorVariablesBuilder(dataConnect, vendorId: vendorId,startDate: startDate,endDate: endDate,); + } + + + ListInvoicesForSpendByOrderVariablesBuilder listInvoicesForSpendByOrder ({required String orderId, required Timestamp startDate, required Timestamp endDate, }) { + return ListInvoicesForSpendByOrderVariablesBuilder(dataConnect, orderId: orderId,startDate: startDate,endDate: endDate,); + } + + + ListTimesheetsForSpendVariablesBuilder listTimesheetsForSpend ({required Timestamp startTime, required Timestamp endTime, }) { + return ListTimesheetsForSpendVariablesBuilder(dataConnect, startTime: startTime,endTime: endTime,); + } + + + ListShiftsForPerformanceByBusinessVariablesBuilder listShiftsForPerformanceByBusiness ({required String businessId, required Timestamp startDate, required Timestamp endDate, }) { + return ListShiftsForPerformanceByBusinessVariablesBuilder(dataConnect, businessId: businessId,startDate: startDate,endDate: endDate,); + } + + + ListShiftsForPerformanceByVendorVariablesBuilder listShiftsForPerformanceByVendor ({required String vendorId, required Timestamp startDate, required Timestamp endDate, }) { + return ListShiftsForPerformanceByVendorVariablesBuilder(dataConnect, vendorId: vendorId,startDate: startDate,endDate: endDate,); + } + + + ListApplicationsForPerformanceVariablesBuilder listApplicationsForPerformance ({required List shiftIds, }) { + return ListApplicationsForPerformanceVariablesBuilder(dataConnect, shiftIds: shiftIds,); + } + + + ListStaffForPerformanceVariablesBuilder listStaffForPerformance ({required List staffIds, }) { + return ListStaffForPerformanceVariablesBuilder(dataConnect, staffIds: staffIds,); + } + + + CreateRoleVariablesBuilder createRole ({required String name, required double costPerHour, required String vendorId, required String roleCategoryId, }) { + return CreateRoleVariablesBuilder(dataConnect, name: name,costPerHour: costPerHour,vendorId: vendorId,roleCategoryId: roleCategoryId,); + } + + + UpdateRoleVariablesBuilder updateRole ({required String id, required String roleCategoryId, }) { + return UpdateRoleVariablesBuilder(dataConnect, id: id,roleCategoryId: roleCategoryId,); + } + + + DeleteRoleVariablesBuilder deleteRole ({required String id, }) { + return DeleteRoleVariablesBuilder(dataConnect, id: id,); + } + + + ListBenefitsDataVariablesBuilder listBenefitsData () { + return ListBenefitsDataVariablesBuilder(dataConnect, ); + } + + + GetBenefitsDataByKeyVariablesBuilder getBenefitsDataByKey ({required String staffId, required String vendorBenefitPlanId, }) { + return GetBenefitsDataByKeyVariablesBuilder(dataConnect, staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,); + } + + + ListBenefitsDataByStaffIdVariablesBuilder listBenefitsDataByStaffId ({required String staffId, }) { + return ListBenefitsDataByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder listBenefitsDataByVendorBenefitPlanId ({required String vendorBenefitPlanId, }) { + return ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder(dataConnect, vendorBenefitPlanId: vendorBenefitPlanId,); + } + + + ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder listBenefitsDataByVendorBenefitPlanIds ({required List vendorBenefitPlanIds, }) { + return ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder(dataConnect, vendorBenefitPlanIds: vendorBenefitPlanIds,); + } + + + CreateOrderVariablesBuilder createOrder ({required String vendorId, required String businessId, required OrderType orderType, }) { + return CreateOrderVariablesBuilder(dataConnect, vendorId: vendorId,businessId: businessId,orderType: orderType,); + } + + + UpdateOrderVariablesBuilder updateOrder ({required String id, }) { + return UpdateOrderVariablesBuilder(dataConnect, id: id,); + } + + + DeleteOrderVariablesBuilder deleteOrder ({required String id, }) { + return DeleteOrderVariablesBuilder(dataConnect, id: id,); + } + + + ListStaffAvailabilitiesVariablesBuilder listStaffAvailabilities () { + return ListStaffAvailabilitiesVariablesBuilder(dataConnect, ); + } + + + ListStaffAvailabilitiesByStaffIdVariablesBuilder listStaffAvailabilitiesByStaffId ({required String staffId, }) { + return ListStaffAvailabilitiesByStaffIdVariablesBuilder(dataConnect, staffId: staffId,); + } + + + GetStaffAvailabilityByKeyVariablesBuilder getStaffAvailabilityByKey ({required String staffId, required DayOfWeek day, required AvailabilitySlot slot, }) { + return GetStaffAvailabilityByKeyVariablesBuilder(dataConnect, staffId: staffId,day: day,slot: slot,); + } + + + ListStaffAvailabilitiesByDayVariablesBuilder listStaffAvailabilitiesByDay ({required DayOfWeek day, }) { + return ListStaffAvailabilitiesByDayVariablesBuilder(dataConnect, day: day,); + } + + + ListTeamMembersVariablesBuilder listTeamMembers () { + return ListTeamMembersVariablesBuilder(dataConnect, ); + } + + + GetTeamMemberByIdVariablesBuilder getTeamMemberById ({required String id, }) { + return GetTeamMemberByIdVariablesBuilder(dataConnect, id: id,); + } + + + GetTeamMembersByTeamIdVariablesBuilder getTeamMembersByTeamId ({required String teamId, }) { + return GetTeamMembersByTeamIdVariablesBuilder(dataConnect, teamId: teamId,); + } + + + ListVendorBenefitPlansVariablesBuilder listVendorBenefitPlans () { + return ListVendorBenefitPlansVariablesBuilder(dataConnect, ); + } + + + GetVendorBenefitPlanByIdVariablesBuilder getVendorBenefitPlanById ({required String id, }) { + return GetVendorBenefitPlanByIdVariablesBuilder(dataConnect, id: id,); + } + + + ListVendorBenefitPlansByVendorIdVariablesBuilder listVendorBenefitPlansByVendorId ({required String vendorId, }) { + return ListVendorBenefitPlansByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + ListActiveVendorBenefitPlansByVendorIdVariablesBuilder listActiveVendorBenefitPlansByVendorId ({required String vendorId, }) { + return ListActiveVendorBenefitPlansByVendorIdVariablesBuilder(dataConnect, vendorId: vendorId,); + } + + + FilterVendorBenefitPlansVariablesBuilder filterVendorBenefitPlans () { + return FilterVendorBenefitPlansVariablesBuilder(dataConnect, ); + } + + + static ConnectorConfig connectorConfig = ConnectorConfig( + 'us-central1', + 'example', + 'krow-workforce-db', + ); + + ExampleConnector({required this.dataConnect}); + static ExampleConnector get instance { + return ExampleConnector( + dataConnect: FirebaseDataConnect.instanceFor( + connectorConfig: connectorConfig, + sdkType: CallerSDKType.generated)); + } + + FirebaseDataConnect dataConnect; +} diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_account_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_account_by_id.dart new file mode 100644 index 00000000..5e4d9836 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_account_by_id.dart @@ -0,0 +1,174 @@ +part of 'generated.dart'; + +class GetAccountByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetAccountByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetAccountByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetAccountByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetAccountByIdVariables vars= GetAccountByIdVariables(id: id,); + return _dataConnect.query("getAccountById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetAccountByIdAccount { + final String id; + final String bank; + final EnumValue type; + final String last4; + final bool? isPrimary; + final String ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetAccountByIdAccount.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + bank = nativeFromJson(json['bank']), + type = accountTypeDeserializer(json['type']), + last4 = nativeFromJson(json['last4']), + isPrimary = json['isPrimary'] == null ? null : nativeFromJson(json['isPrimary']), + ownerId = nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAccountByIdAccount otherTyped = other as GetAccountByIdAccount; + return id == otherTyped.id && + bank == otherTyped.bank && + type == otherTyped.type && + last4 == otherTyped.last4 && + isPrimary == otherTyped.isPrimary && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['bank'] = nativeToJson(bank); + json['type'] = + accountTypeSerializer(type) + ; + json['last4'] = nativeToJson(last4); + if (isPrimary != null) { + json['isPrimary'] = nativeToJson(isPrimary); + } + json['ownerId'] = nativeToJson(ownerId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetAccountByIdAccount({ + required this.id, + required this.bank, + required this.type, + required this.last4, + this.isPrimary, + required this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetAccountByIdData { + final GetAccountByIdAccount? account; + GetAccountByIdData.fromJson(dynamic json): + + account = json['account'] == null ? null : GetAccountByIdAccount.fromJson(json['account']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAccountByIdData otherTyped = other as GetAccountByIdData; + return account == otherTyped.account; + + } + @override + int get hashCode => account.hashCode; + + + Map toJson() { + Map json = {}; + if (account != null) { + json['account'] = account!.toJson(); + } + return json; + } + + GetAccountByIdData({ + this.account, + }); +} + +@immutable +class GetAccountByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetAccountByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAccountByIdVariables otherTyped = other as GetAccountByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetAccountByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_accounts_by_owner_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_accounts_by_owner_id.dart new file mode 100644 index 00000000..2d704e46 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_accounts_by_owner_id.dart @@ -0,0 +1,174 @@ +part of 'generated.dart'; + +class GetAccountsByOwnerIdVariablesBuilder { + String ownerId; + + final FirebaseDataConnect _dataConnect; + GetAccountsByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => GetAccountsByOwnerIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetAccountsByOwnerIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetAccountsByOwnerIdVariables vars= GetAccountsByOwnerIdVariables(ownerId: ownerId,); + return _dataConnect.query("getAccountsByOwnerId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetAccountsByOwnerIdAccounts { + final String id; + final String bank; + final EnumValue type; + final String last4; + final bool? isPrimary; + final String ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetAccountsByOwnerIdAccounts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + bank = nativeFromJson(json['bank']), + type = accountTypeDeserializer(json['type']), + last4 = nativeFromJson(json['last4']), + isPrimary = json['isPrimary'] == null ? null : nativeFromJson(json['isPrimary']), + ownerId = nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAccountsByOwnerIdAccounts otherTyped = other as GetAccountsByOwnerIdAccounts; + return id == otherTyped.id && + bank == otherTyped.bank && + type == otherTyped.type && + last4 == otherTyped.last4 && + isPrimary == otherTyped.isPrimary && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['bank'] = nativeToJson(bank); + json['type'] = + accountTypeSerializer(type) + ; + json['last4'] = nativeToJson(last4); + if (isPrimary != null) { + json['isPrimary'] = nativeToJson(isPrimary); + } + json['ownerId'] = nativeToJson(ownerId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetAccountsByOwnerIdAccounts({ + required this.id, + required this.bank, + required this.type, + required this.last4, + this.isPrimary, + required this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetAccountsByOwnerIdData { + final List accounts; + GetAccountsByOwnerIdData.fromJson(dynamic json): + + accounts = (json['accounts'] as List) + .map((e) => GetAccountsByOwnerIdAccounts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAccountsByOwnerIdData otherTyped = other as GetAccountsByOwnerIdData; + return accounts == otherTyped.accounts; + + } + @override + int get hashCode => accounts.hashCode; + + + Map toJson() { + Map json = {}; + json['accounts'] = accounts.map((e) => e.toJson()).toList(); + return json; + } + + GetAccountsByOwnerIdData({ + required this.accounts, + }); +} + +@immutable +class GetAccountsByOwnerIdVariables { + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetAccountsByOwnerIdVariables.fromJson(Map json): + + ownerId = nativeFromJson(json['ownerId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAccountsByOwnerIdVariables otherTyped = other as GetAccountsByOwnerIdVariables; + return ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => ownerId.hashCode; + + + Map toJson() { + Map json = {}; + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + GetAccountsByOwnerIdVariables({ + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_activity_log_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_activity_log_by_id.dart new file mode 100644 index 00000000..e236b0b5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_activity_log_by_id.dart @@ -0,0 +1,216 @@ +part of 'generated.dart'; + +class GetActivityLogByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetActivityLogByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetActivityLogByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetActivityLogByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetActivityLogByIdVariables vars= GetActivityLogByIdVariables(id: id,); + return _dataConnect.query("getActivityLogById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetActivityLogByIdActivityLog { + final String id; + final String userId; + final Timestamp date; + final String? hourStart; + final String? hourEnd; + final String? totalhours; + final EnumValue? iconType; + final String? iconColor; + final String title; + final String description; + final bool? isRead; + final EnumValue activityType; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetActivityLogByIdActivityLog.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + date = Timestamp.fromJson(json['date']), + hourStart = json['hourStart'] == null ? null : nativeFromJson(json['hourStart']), + hourEnd = json['hourEnd'] == null ? null : nativeFromJson(json['hourEnd']), + totalhours = json['totalhours'] == null ? null : nativeFromJson(json['totalhours']), + iconType = json['iconType'] == null ? null : activityIconTypeDeserializer(json['iconType']), + iconColor = json['iconColor'] == null ? null : nativeFromJson(json['iconColor']), + title = nativeFromJson(json['title']), + description = nativeFromJson(json['description']), + isRead = json['isRead'] == null ? null : nativeFromJson(json['isRead']), + activityType = activityTypeDeserializer(json['activityType']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetActivityLogByIdActivityLog otherTyped = other as GetActivityLogByIdActivityLog; + return id == otherTyped.id && + userId == otherTyped.userId && + date == otherTyped.date && + hourStart == otherTyped.hourStart && + hourEnd == otherTyped.hourEnd && + totalhours == otherTyped.totalhours && + iconType == otherTyped.iconType && + iconColor == otherTyped.iconColor && + title == otherTyped.title && + description == otherTyped.description && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, date.hashCode, hourStart.hashCode, hourEnd.hashCode, totalhours.hashCode, iconType.hashCode, iconColor.hashCode, title.hashCode, description.hashCode, isRead.hashCode, activityType.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['date'] = date.toJson(); + if (hourStart != null) { + json['hourStart'] = nativeToJson(hourStart); + } + if (hourEnd != null) { + json['hourEnd'] = nativeToJson(hourEnd); + } + if (totalhours != null) { + json['totalhours'] = nativeToJson(totalhours); + } + if (iconType != null) { + json['iconType'] = + activityIconTypeSerializer(iconType!) + ; + } + if (iconColor != null) { + json['iconColor'] = nativeToJson(iconColor); + } + json['title'] = nativeToJson(title); + json['description'] = nativeToJson(description); + if (isRead != null) { + json['isRead'] = nativeToJson(isRead); + } + json['activityType'] = + activityTypeSerializer(activityType) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetActivityLogByIdActivityLog({ + required this.id, + required this.userId, + required this.date, + this.hourStart, + this.hourEnd, + this.totalhours, + this.iconType, + this.iconColor, + required this.title, + required this.description, + this.isRead, + required this.activityType, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetActivityLogByIdData { + final GetActivityLogByIdActivityLog? activityLog; + GetActivityLogByIdData.fromJson(dynamic json): + + activityLog = json['activityLog'] == null ? null : GetActivityLogByIdActivityLog.fromJson(json['activityLog']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetActivityLogByIdData otherTyped = other as GetActivityLogByIdData; + return activityLog == otherTyped.activityLog; + + } + @override + int get hashCode => activityLog.hashCode; + + + Map toJson() { + Map json = {}; + if (activityLog != null) { + json['activityLog'] = activityLog!.toJson(); + } + return json; + } + + GetActivityLogByIdData({ + this.activityLog, + }); +} + +@immutable +class GetActivityLogByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetActivityLogByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetActivityLogByIdVariables otherTyped = other as GetActivityLogByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetActivityLogByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_application_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_application_by_id.dart new file mode 100644 index 00000000..7acf7ce8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_application_by_id.dart @@ -0,0 +1,545 @@ +part of 'generated.dart'; + +class GetApplicationByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetApplicationByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetApplicationByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetApplicationByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetApplicationByIdVariables vars= GetApplicationByIdVariables(id: id,); + return _dataConnect.query("getApplicationById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetApplicationByIdApplication { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + final Timestamp? appliedAt; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final EnumValue origin; + final Timestamp? createdAt; + final GetApplicationByIdApplicationShift shift; + final GetApplicationByIdApplicationShiftRole shiftRole; + GetApplicationByIdApplication.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']), + appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + origin = applicationOriginDeserializer(json['origin']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + shift = GetApplicationByIdApplicationShift.fromJson(json['shift']), + shiftRole = GetApplicationByIdApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdApplication otherTyped = other as GetApplicationByIdApplication; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + appliedAt == otherTyped.appliedAt && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + origin == otherTyped.origin && + createdAt == otherTyped.createdAt && + shift == otherTyped.shift && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, appliedAt.hashCode, checkInTime.hashCode, checkOutTime.hashCode, origin.hashCode, createdAt.hashCode, shift.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + if (appliedAt != null) { + json['appliedAt'] = appliedAt!.toJson(); + } + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['origin'] = + applicationOriginSerializer(origin) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['shift'] = shift.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + GetApplicationByIdApplication({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + this.appliedAt, + this.checkInTime, + this.checkOutTime, + required this.origin, + this.createdAt, + required this.shift, + required this.shiftRole, + }); +} + +@immutable +class GetApplicationByIdApplicationShift { + final String id; + final String title; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final String? location; + final EnumValue? status; + final GetApplicationByIdApplicationShiftOrder order; + GetApplicationByIdApplicationShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + order = GetApplicationByIdApplicationShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdApplicationShift otherTyped = other as GetApplicationByIdApplicationShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + location == otherTyped.location && + status == otherTyped.status && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + json['order'] = order.toJson(); + return json; + } + + GetApplicationByIdApplicationShift({ + required this.id, + required this.title, + this.date, + this.startTime, + this.endTime, + this.location, + this.status, + required this.order, + }); +} + +@immutable +class GetApplicationByIdApplicationShiftOrder { + final String id; + final String? eventName; + final String? location; + final GetApplicationByIdApplicationShiftOrderBusiness business; + final GetApplicationByIdApplicationShiftOrderVendor vendor; + GetApplicationByIdApplicationShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + business = GetApplicationByIdApplicationShiftOrderBusiness.fromJson(json['business']), + vendor = GetApplicationByIdApplicationShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdApplicationShiftOrder otherTyped = other as GetApplicationByIdApplicationShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetApplicationByIdApplicationShiftOrder({ + required this.id, + this.eventName, + this.location, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetApplicationByIdApplicationShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetApplicationByIdApplicationShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdApplicationShiftOrderBusiness otherTyped = other as GetApplicationByIdApplicationShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetApplicationByIdApplicationShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetApplicationByIdApplicationShiftOrderVendor { + final String id; + final String companyName; + GetApplicationByIdApplicationShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdApplicationShiftOrderVendor otherTyped = other as GetApplicationByIdApplicationShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetApplicationByIdApplicationShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetApplicationByIdApplicationShiftRole { + final String id; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final GetApplicationByIdApplicationShiftRoleRole role; + GetApplicationByIdApplicationShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = GetApplicationByIdApplicationShiftRoleRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdApplicationShiftRole otherTyped = other as GetApplicationByIdApplicationShiftRole; + return id == otherTyped.id && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + return json; + } + + GetApplicationByIdApplicationShiftRole({ + required this.id, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + }); +} + +@immutable +class GetApplicationByIdApplicationShiftRoleRole { + final String id; + final String name; + final double costPerHour; + GetApplicationByIdApplicationShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdApplicationShiftRoleRole otherTyped = other as GetApplicationByIdApplicationShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetApplicationByIdApplicationShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetApplicationByIdData { + final GetApplicationByIdApplication? application; + GetApplicationByIdData.fromJson(dynamic json): + + application = json['application'] == null ? null : GetApplicationByIdApplication.fromJson(json['application']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdData otherTyped = other as GetApplicationByIdData; + return application == otherTyped.application; + + } + @override + int get hashCode => application.hashCode; + + + Map toJson() { + Map json = {}; + if (application != null) { + json['application'] = application!.toJson(); + } + return json; + } + + GetApplicationByIdData({ + this.application, + }); +} + +@immutable +class GetApplicationByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetApplicationByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationByIdVariables otherTyped = other as GetApplicationByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetApplicationByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_shift_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_shift_id.dart new file mode 100644 index 00000000..3998aa70 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_shift_id.dart @@ -0,0 +1,545 @@ +part of 'generated.dart'; + +class GetApplicationsByShiftIdVariablesBuilder { + String shiftId; + + final FirebaseDataConnect _dataConnect; + GetApplicationsByShiftIdVariablesBuilder(this._dataConnect, {required this.shiftId,}); + Deserializer dataDeserializer = (dynamic json) => GetApplicationsByShiftIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetApplicationsByShiftIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetApplicationsByShiftIdVariables vars= GetApplicationsByShiftIdVariables(shiftId: shiftId,); + return _dataConnect.query("getApplicationsByShiftId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetApplicationsByShiftIdApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + final Timestamp? appliedAt; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final EnumValue origin; + final Timestamp? createdAt; + final GetApplicationsByShiftIdApplicationsShift shift; + final GetApplicationsByShiftIdApplicationsShiftRole shiftRole; + GetApplicationsByShiftIdApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']), + appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + origin = applicationOriginDeserializer(json['origin']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + shift = GetApplicationsByShiftIdApplicationsShift.fromJson(json['shift']), + shiftRole = GetApplicationsByShiftIdApplicationsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdApplications otherTyped = other as GetApplicationsByShiftIdApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + appliedAt == otherTyped.appliedAt && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + origin == otherTyped.origin && + createdAt == otherTyped.createdAt && + shift == otherTyped.shift && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, appliedAt.hashCode, checkInTime.hashCode, checkOutTime.hashCode, origin.hashCode, createdAt.hashCode, shift.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + if (appliedAt != null) { + json['appliedAt'] = appliedAt!.toJson(); + } + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['origin'] = + applicationOriginSerializer(origin) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['shift'] = shift.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + GetApplicationsByShiftIdApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + this.appliedAt, + this.checkInTime, + this.checkOutTime, + required this.origin, + this.createdAt, + required this.shift, + required this.shiftRole, + }); +} + +@immutable +class GetApplicationsByShiftIdApplicationsShift { + final String id; + final String title; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final String? location; + final EnumValue? status; + final GetApplicationsByShiftIdApplicationsShiftOrder order; + GetApplicationsByShiftIdApplicationsShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + order = GetApplicationsByShiftIdApplicationsShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdApplicationsShift otherTyped = other as GetApplicationsByShiftIdApplicationsShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + location == otherTyped.location && + status == otherTyped.status && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + json['order'] = order.toJson(); + return json; + } + + GetApplicationsByShiftIdApplicationsShift({ + required this.id, + required this.title, + this.date, + this.startTime, + this.endTime, + this.location, + this.status, + required this.order, + }); +} + +@immutable +class GetApplicationsByShiftIdApplicationsShiftOrder { + final String id; + final String? eventName; + final String? location; + final GetApplicationsByShiftIdApplicationsShiftOrderBusiness business; + final GetApplicationsByShiftIdApplicationsShiftOrderVendor vendor; + GetApplicationsByShiftIdApplicationsShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + business = GetApplicationsByShiftIdApplicationsShiftOrderBusiness.fromJson(json['business']), + vendor = GetApplicationsByShiftIdApplicationsShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdApplicationsShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetApplicationsByShiftIdApplicationsShiftOrder({ + required this.id, + this.eventName, + this.location, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetApplicationsByShiftIdApplicationsShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetApplicationsByShiftIdApplicationsShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdApplicationsShiftOrderBusiness otherTyped = other as GetApplicationsByShiftIdApplicationsShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetApplicationsByShiftIdApplicationsShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetApplicationsByShiftIdApplicationsShiftOrderVendor { + final String id; + final String companyName; + GetApplicationsByShiftIdApplicationsShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdApplicationsShiftOrderVendor otherTyped = other as GetApplicationsByShiftIdApplicationsShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetApplicationsByShiftIdApplicationsShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetApplicationsByShiftIdApplicationsShiftRole { + final String id; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final GetApplicationsByShiftIdApplicationsShiftRoleRole role; + GetApplicationsByShiftIdApplicationsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = GetApplicationsByShiftIdApplicationsShiftRoleRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdApplicationsShiftRole otherTyped = other as GetApplicationsByShiftIdApplicationsShiftRole; + return id == otherTyped.id && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + return json; + } + + GetApplicationsByShiftIdApplicationsShiftRole({ + required this.id, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + }); +} + +@immutable +class GetApplicationsByShiftIdApplicationsShiftRoleRole { + final String id; + final String name; + final double costPerHour; + GetApplicationsByShiftIdApplicationsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdApplicationsShiftRoleRole otherTyped = other as GetApplicationsByShiftIdApplicationsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetApplicationsByShiftIdApplicationsShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetApplicationsByShiftIdData { + final List applications; + GetApplicationsByShiftIdData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => GetApplicationsByShiftIdApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdData otherTyped = other as GetApplicationsByShiftIdData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + GetApplicationsByShiftIdData({ + required this.applications, + }); +} + +@immutable +class GetApplicationsByShiftIdVariables { + final String shiftId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetApplicationsByShiftIdVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdVariables otherTyped = other as GetApplicationsByShiftIdVariables; + return shiftId == otherTyped.shiftId; + + } + @override + int get hashCode => shiftId.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + return json; + } + + GetApplicationsByShiftIdVariables({ + required this.shiftId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_shift_id_and_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_shift_id_and_status.dart new file mode 100644 index 00000000..61d44d9e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_shift_id_and_status.dart @@ -0,0 +1,587 @@ +part of 'generated.dart'; + +class GetApplicationsByShiftIdAndStatusVariablesBuilder { + String shiftId; + ApplicationStatus status; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetApplicationsByShiftIdAndStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetApplicationsByShiftIdAndStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetApplicationsByShiftIdAndStatusVariablesBuilder(this._dataConnect, {required this.shiftId,required this.status,}); + Deserializer dataDeserializer = (dynamic json) => GetApplicationsByShiftIdAndStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetApplicationsByShiftIdAndStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetApplicationsByShiftIdAndStatusVariables vars= GetApplicationsByShiftIdAndStatusVariables(shiftId: shiftId,status: status,offset: _offset,limit: _limit,); + return _dataConnect.query("getApplicationsByShiftIdAndStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetApplicationsByShiftIdAndStatusApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + final Timestamp? appliedAt; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final EnumValue origin; + final Timestamp? createdAt; + final GetApplicationsByShiftIdAndStatusApplicationsShift shift; + final GetApplicationsByShiftIdAndStatusApplicationsShiftRole shiftRole; + GetApplicationsByShiftIdAndStatusApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']), + appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + origin = applicationOriginDeserializer(json['origin']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + shift = GetApplicationsByShiftIdAndStatusApplicationsShift.fromJson(json['shift']), + shiftRole = GetApplicationsByShiftIdAndStatusApplicationsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusApplications otherTyped = other as GetApplicationsByShiftIdAndStatusApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + appliedAt == otherTyped.appliedAt && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + origin == otherTyped.origin && + createdAt == otherTyped.createdAt && + shift == otherTyped.shift && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, appliedAt.hashCode, checkInTime.hashCode, checkOutTime.hashCode, origin.hashCode, createdAt.hashCode, shift.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + if (appliedAt != null) { + json['appliedAt'] = appliedAt!.toJson(); + } + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['origin'] = + applicationOriginSerializer(origin) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['shift'] = shift.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + GetApplicationsByShiftIdAndStatusApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + this.appliedAt, + this.checkInTime, + this.checkOutTime, + required this.origin, + this.createdAt, + required this.shift, + required this.shiftRole, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusApplicationsShift { + final String id; + final String title; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final String? location; + final EnumValue? status; + final GetApplicationsByShiftIdAndStatusApplicationsShiftOrder order; + GetApplicationsByShiftIdAndStatusApplicationsShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + order = GetApplicationsByShiftIdAndStatusApplicationsShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusApplicationsShift otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + location == otherTyped.location && + status == otherTyped.status && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + json['order'] = order.toJson(); + return json; + } + + GetApplicationsByShiftIdAndStatusApplicationsShift({ + required this.id, + required this.title, + this.date, + this.startTime, + this.endTime, + this.location, + this.status, + required this.order, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusApplicationsShiftOrder { + final String id; + final String? eventName; + final String? location; + final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness business; + final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor vendor; + GetApplicationsByShiftIdAndStatusApplicationsShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + business = GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness.fromJson(json['business']), + vendor = GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusApplicationsShiftOrder otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetApplicationsByShiftIdAndStatusApplicationsShiftOrder({ + required this.id, + this.eventName, + this.location, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetApplicationsByShiftIdAndStatusApplicationsShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor { + final String id; + final String companyName; + GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetApplicationsByShiftIdAndStatusApplicationsShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusApplicationsShiftRole { + final String id; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final GetApplicationsByShiftIdAndStatusApplicationsShiftRoleRole role; + GetApplicationsByShiftIdAndStatusApplicationsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = GetApplicationsByShiftIdAndStatusApplicationsShiftRoleRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusApplicationsShiftRole otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftRole; + return id == otherTyped.id && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + return json; + } + + GetApplicationsByShiftIdAndStatusApplicationsShiftRole({ + required this.id, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusApplicationsShiftRoleRole { + final String id; + final String name; + final double costPerHour; + GetApplicationsByShiftIdAndStatusApplicationsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusApplicationsShiftRoleRole otherTyped = other as GetApplicationsByShiftIdAndStatusApplicationsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetApplicationsByShiftIdAndStatusApplicationsShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusData { + final List applications; + GetApplicationsByShiftIdAndStatusData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => GetApplicationsByShiftIdAndStatusApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusData otherTyped = other as GetApplicationsByShiftIdAndStatusData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + GetApplicationsByShiftIdAndStatusData({ + required this.applications, + }); +} + +@immutable +class GetApplicationsByShiftIdAndStatusVariables { + final String shiftId; + final ApplicationStatus status; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetApplicationsByShiftIdAndStatusVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + status = ApplicationStatus.values.byName(json['status']) { + + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByShiftIdAndStatusVariables otherTyped = other as GetApplicationsByShiftIdAndStatusVariables; + return shiftId == otherTyped.shiftId && + status == otherTyped.status && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, status.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['status'] = + status.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetApplicationsByShiftIdAndStatusVariables({ + required this.shiftId, + required this.status, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_staff_id.dart new file mode 100644 index 00000000..ddfa760a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_applications_by_staff_id.dart @@ -0,0 +1,578 @@ +part of 'generated.dart'; + +class GetApplicationsByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetApplicationsByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetApplicationsByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetApplicationsByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => GetApplicationsByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetApplicationsByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetApplicationsByStaffIdVariables vars= GetApplicationsByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("getApplicationsByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetApplicationsByStaffIdApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + final Timestamp? appliedAt; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final EnumValue origin; + final Timestamp? createdAt; + final GetApplicationsByStaffIdApplicationsShift shift; + final GetApplicationsByStaffIdApplicationsShiftRole shiftRole; + GetApplicationsByStaffIdApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']), + appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + origin = applicationOriginDeserializer(json['origin']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + shift = GetApplicationsByStaffIdApplicationsShift.fromJson(json['shift']), + shiftRole = GetApplicationsByStaffIdApplicationsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdApplications otherTyped = other as GetApplicationsByStaffIdApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + appliedAt == otherTyped.appliedAt && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + origin == otherTyped.origin && + createdAt == otherTyped.createdAt && + shift == otherTyped.shift && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, appliedAt.hashCode, checkInTime.hashCode, checkOutTime.hashCode, origin.hashCode, createdAt.hashCode, shift.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + if (appliedAt != null) { + json['appliedAt'] = appliedAt!.toJson(); + } + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['origin'] = + applicationOriginSerializer(origin) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['shift'] = shift.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + GetApplicationsByStaffIdApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + this.appliedAt, + this.checkInTime, + this.checkOutTime, + required this.origin, + this.createdAt, + required this.shift, + required this.shiftRole, + }); +} + +@immutable +class GetApplicationsByStaffIdApplicationsShift { + final String id; + final String title; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final String? location; + final EnumValue? status; + final GetApplicationsByStaffIdApplicationsShiftOrder order; + GetApplicationsByStaffIdApplicationsShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + order = GetApplicationsByStaffIdApplicationsShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdApplicationsShift otherTyped = other as GetApplicationsByStaffIdApplicationsShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + location == otherTyped.location && + status == otherTyped.status && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + json['order'] = order.toJson(); + return json; + } + + GetApplicationsByStaffIdApplicationsShift({ + required this.id, + required this.title, + this.date, + this.startTime, + this.endTime, + this.location, + this.status, + required this.order, + }); +} + +@immutable +class GetApplicationsByStaffIdApplicationsShiftOrder { + final String id; + final String? eventName; + final String? location; + final GetApplicationsByStaffIdApplicationsShiftOrderBusiness business; + final GetApplicationsByStaffIdApplicationsShiftOrderVendor vendor; + GetApplicationsByStaffIdApplicationsShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + business = GetApplicationsByStaffIdApplicationsShiftOrderBusiness.fromJson(json['business']), + vendor = GetApplicationsByStaffIdApplicationsShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdApplicationsShiftOrder otherTyped = other as GetApplicationsByStaffIdApplicationsShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetApplicationsByStaffIdApplicationsShiftOrder({ + required this.id, + this.eventName, + this.location, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetApplicationsByStaffIdApplicationsShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetApplicationsByStaffIdApplicationsShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdApplicationsShiftOrderBusiness otherTyped = other as GetApplicationsByStaffIdApplicationsShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetApplicationsByStaffIdApplicationsShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetApplicationsByStaffIdApplicationsShiftOrderVendor { + final String id; + final String companyName; + GetApplicationsByStaffIdApplicationsShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdApplicationsShiftOrderVendor otherTyped = other as GetApplicationsByStaffIdApplicationsShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetApplicationsByStaffIdApplicationsShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetApplicationsByStaffIdApplicationsShiftRole { + final String id; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final GetApplicationsByStaffIdApplicationsShiftRoleRole role; + GetApplicationsByStaffIdApplicationsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = GetApplicationsByStaffIdApplicationsShiftRoleRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdApplicationsShiftRole otherTyped = other as GetApplicationsByStaffIdApplicationsShiftRole; + return id == otherTyped.id && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + return json; + } + + GetApplicationsByStaffIdApplicationsShiftRole({ + required this.id, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + }); +} + +@immutable +class GetApplicationsByStaffIdApplicationsShiftRoleRole { + final String id; + final String name; + final double costPerHour; + GetApplicationsByStaffIdApplicationsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdApplicationsShiftRoleRole otherTyped = other as GetApplicationsByStaffIdApplicationsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetApplicationsByStaffIdApplicationsShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetApplicationsByStaffIdData { + final List applications; + GetApplicationsByStaffIdData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => GetApplicationsByStaffIdApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdData otherTyped = other as GetApplicationsByStaffIdData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + GetApplicationsByStaffIdData({ + required this.applications, + }); +} + +@immutable +class GetApplicationsByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetApplicationsByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetApplicationsByStaffIdVariables otherTyped = other as GetApplicationsByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetApplicationsByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_assignment_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_assignment_by_id.dart new file mode 100644 index 00000000..4a63320e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_assignment_by_id.dart @@ -0,0 +1,707 @@ +part of 'generated.dart'; + +class GetAssignmentByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetAssignmentByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetAssignmentByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetAssignmentByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetAssignmentByIdVariables vars= GetAssignmentByIdVariables(id: id,); + return _dataConnect.query("getAssignmentById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetAssignmentByIdAssignment { + final String id; + final String? title; + final String? description; + final String? instructions; + final EnumValue? status; + final bool? tipsAvailable; + final bool? travelTime; + final bool? mealProvided; + final bool? parkingAvailable; + final bool? gasCompensation; + final List? managers; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetAssignmentByIdAssignmentWorkforce workforce; + final GetAssignmentByIdAssignmentShiftRole shiftRole; + GetAssignmentByIdAssignment.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + instructions = json['instructions'] == null ? null : nativeFromJson(json['instructions']), + status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']), + tipsAvailable = json['tipsAvailable'] == null ? null : nativeFromJson(json['tipsAvailable']), + travelTime = json['travelTime'] == null ? null : nativeFromJson(json['travelTime']), + mealProvided = json['mealProvided'] == null ? null : nativeFromJson(json['mealProvided']), + parkingAvailable = json['parkingAvailable'] == null ? null : nativeFromJson(json['parkingAvailable']), + gasCompensation = json['gasCompensation'] == null ? null : nativeFromJson(json['gasCompensation']), + managers = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + workforce = GetAssignmentByIdAssignmentWorkforce.fromJson(json['workforce']), + shiftRole = GetAssignmentByIdAssignmentShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignment otherTyped = other as GetAssignmentByIdAssignment; + return id == otherTyped.id && + title == otherTyped.title && + description == otherTyped.description && + instructions == otherTyped.instructions && + status == otherTyped.status && + tipsAvailable == otherTyped.tipsAvailable && + travelTime == otherTyped.travelTime && + mealProvided == otherTyped.mealProvided && + parkingAvailable == otherTyped.parkingAvailable && + gasCompensation == otherTyped.gasCompensation && + managers == otherTyped.managers && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + workforce == otherTyped.workforce && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, description.hashCode, instructions.hashCode, status.hashCode, tipsAvailable.hashCode, travelTime.hashCode, mealProvided.hashCode, parkingAvailable.hashCode, gasCompensation.hashCode, managers.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, workforce.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (instructions != null) { + json['instructions'] = nativeToJson(instructions); + } + if (status != null) { + json['status'] = + assignmentStatusSerializer(status!) + ; + } + if (tipsAvailable != null) { + json['tipsAvailable'] = nativeToJson(tipsAvailable); + } + if (travelTime != null) { + json['travelTime'] = nativeToJson(travelTime); + } + if (mealProvided != null) { + json['mealProvided'] = nativeToJson(mealProvided); + } + if (parkingAvailable != null) { + json['parkingAvailable'] = nativeToJson(parkingAvailable); + } + if (gasCompensation != null) { + json['gasCompensation'] = nativeToJson(gasCompensation); + } + if (managers != null) { + json['managers'] = managers?.map((e) => e!.toJson()).toList(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['workforce'] = workforce.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + GetAssignmentByIdAssignment({ + required this.id, + this.title, + this.description, + this.instructions, + this.status, + this.tipsAvailable, + this.travelTime, + this.mealProvided, + this.parkingAvailable, + this.gasCompensation, + this.managers, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.workforce, + required this.shiftRole, + }); +} + +@immutable +class GetAssignmentByIdAssignmentWorkforce { + final String id; + final String workforceNumber; + final EnumValue? status; + final GetAssignmentByIdAssignmentWorkforceStaff staff; + GetAssignmentByIdAssignmentWorkforce.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workforceNumber = nativeFromJson(json['workforceNumber']), + status = json['status'] == null ? null : workforceStatusDeserializer(json['status']), + staff = GetAssignmentByIdAssignmentWorkforceStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentWorkforce otherTyped = other as GetAssignmentByIdAssignmentWorkforce; + return id == otherTyped.id && + workforceNumber == otherTyped.workforceNumber && + status == otherTyped.status && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workforceNumber.hashCode, status.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['workforceNumber'] = nativeToJson(workforceNumber); + if (status != null) { + json['status'] = + workforceStatusSerializer(status!) + ; + } + json['staff'] = staff.toJson(); + return json; + } + + GetAssignmentByIdAssignmentWorkforce({ + required this.id, + required this.workforceNumber, + this.status, + required this.staff, + }); +} + +@immutable +class GetAssignmentByIdAssignmentWorkforceStaff { + final String id; + final String fullName; + GetAssignmentByIdAssignmentWorkforceStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentWorkforceStaff otherTyped = other as GetAssignmentByIdAssignmentWorkforceStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + GetAssignmentByIdAssignmentWorkforceStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class GetAssignmentByIdAssignmentShiftRole { + final String id; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final EnumValue? breakType; + final String? uniform; + final String? department; + final GetAssignmentByIdAssignmentShiftRoleRole role; + final GetAssignmentByIdAssignmentShiftRoleShift shift; + GetAssignmentByIdAssignmentShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']), + uniform = json['uniform'] == null ? null : nativeFromJson(json['uniform']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + role = GetAssignmentByIdAssignmentShiftRoleRole.fromJson(json['role']), + shift = GetAssignmentByIdAssignmentShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentShiftRole otherTyped = other as GetAssignmentByIdAssignmentShiftRole; + return id == otherTyped.id && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + breakType == otherTyped.breakType && + uniform == otherTyped.uniform && + department == otherTyped.department && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, breakType.hashCode, uniform.hashCode, department.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (breakType != null) { + json['breakType'] = + breakDurationSerializer(breakType!) + ; + } + if (uniform != null) { + json['uniform'] = nativeToJson(uniform); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + GetAssignmentByIdAssignmentShiftRole({ + required this.id, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + this.breakType, + this.uniform, + this.department, + required this.role, + required this.shift, + }); +} + +@immutable +class GetAssignmentByIdAssignmentShiftRoleRole { + final String id; + final String name; + final double costPerHour; + GetAssignmentByIdAssignmentShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentShiftRoleRole otherTyped = other as GetAssignmentByIdAssignmentShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetAssignmentByIdAssignmentShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetAssignmentByIdAssignmentShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? location; + final String? locationAddress; + final double? latitude; + final double? longitude; + final EnumValue? status; + final List? managers; + final GetAssignmentByIdAssignmentShiftRoleShiftOrder order; + GetAssignmentByIdAssignmentShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + latitude = json['latitude'] == null ? null : nativeFromJson(json['latitude']), + longitude = json['longitude'] == null ? null : nativeFromJson(json['longitude']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + managers = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + order = GetAssignmentByIdAssignmentShiftRoleShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentShiftRoleShift otherTyped = other as GetAssignmentByIdAssignmentShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + status == otherTyped.status && + managers == otherTyped.managers && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, status.hashCode, managers.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (latitude != null) { + json['latitude'] = nativeToJson(latitude); + } + if (longitude != null) { + json['longitude'] = nativeToJson(longitude); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (managers != null) { + json['managers'] = managers?.map((e) => e!.toJson()).toList(); + } + json['order'] = order.toJson(); + return json; + } + + GetAssignmentByIdAssignmentShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.location, + this.locationAddress, + this.latitude, + this.longitude, + this.status, + this.managers, + required this.order, + }); +} + +@immutable +class GetAssignmentByIdAssignmentShiftRoleShiftOrder { + final String id; + final String? eventName; + final EnumValue orderType; + final GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness business; + final GetAssignmentByIdAssignmentShiftRoleShiftOrderVendor vendor; + GetAssignmentByIdAssignmentShiftRoleShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + orderType = orderTypeDeserializer(json['orderType']), + business = GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness.fromJson(json['business']), + vendor = GetAssignmentByIdAssignmentShiftRoleShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentShiftRoleShiftOrder otherTyped = other as GetAssignmentByIdAssignmentShiftRoleShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + orderType == otherTyped.orderType && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, orderType.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['orderType'] = + orderTypeSerializer(orderType) + ; + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetAssignmentByIdAssignmentShiftRoleShiftOrder({ + required this.id, + this.eventName, + required this.orderType, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness otherTyped = other as GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetAssignmentByIdAssignmentShiftRoleShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetAssignmentByIdAssignmentShiftRoleShiftOrderVendor { + final String id; + final String companyName; + GetAssignmentByIdAssignmentShiftRoleShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdAssignmentShiftRoleShiftOrderVendor otherTyped = other as GetAssignmentByIdAssignmentShiftRoleShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetAssignmentByIdAssignmentShiftRoleShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetAssignmentByIdData { + final GetAssignmentByIdAssignment? assignment; + GetAssignmentByIdData.fromJson(dynamic json): + + assignment = json['assignment'] == null ? null : GetAssignmentByIdAssignment.fromJson(json['assignment']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdData otherTyped = other as GetAssignmentByIdData; + return assignment == otherTyped.assignment; + + } + @override + int get hashCode => assignment.hashCode; + + + Map toJson() { + Map json = {}; + if (assignment != null) { + json['assignment'] = assignment!.toJson(); + } + return json; + } + + GetAssignmentByIdData({ + this.assignment, + }); +} + +@immutable +class GetAssignmentByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetAssignmentByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAssignmentByIdVariables otherTyped = other as GetAssignmentByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetAssignmentByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_attire_option_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_attire_option_by_id.dart new file mode 100644 index 00000000..a889f163 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_attire_option_by_id.dart @@ -0,0 +1,169 @@ +part of 'generated.dart'; + +class GetAttireOptionByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetAttireOptionByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetAttireOptionByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetAttireOptionByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetAttireOptionByIdVariables vars= GetAttireOptionByIdVariables(id: id,); + return _dataConnect.query("getAttireOptionById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetAttireOptionByIdAttireOption { + final String id; + final String itemId; + final String label; + final String? icon; + final String? imageUrl; + final bool? isMandatory; + final String? vendorId; + final Timestamp? createdAt; + GetAttireOptionByIdAttireOption.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + itemId = nativeFromJson(json['itemId']), + label = nativeFromJson(json['label']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + imageUrl = json['imageUrl'] == null ? null : nativeFromJson(json['imageUrl']), + isMandatory = json['isMandatory'] == null ? null : nativeFromJson(json['isMandatory']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAttireOptionByIdAttireOption otherTyped = other as GetAttireOptionByIdAttireOption; + return id == otherTyped.id && + itemId == otherTyped.itemId && + label == otherTyped.label && + icon == otherTyped.icon && + imageUrl == otherTyped.imageUrl && + isMandatory == otherTyped.isMandatory && + vendorId == otherTyped.vendorId && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, itemId.hashCode, label.hashCode, icon.hashCode, imageUrl.hashCode, isMandatory.hashCode, vendorId.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['itemId'] = nativeToJson(itemId); + json['label'] = nativeToJson(label); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (imageUrl != null) { + json['imageUrl'] = nativeToJson(imageUrl); + } + if (isMandatory != null) { + json['isMandatory'] = nativeToJson(isMandatory); + } + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + GetAttireOptionByIdAttireOption({ + required this.id, + required this.itemId, + required this.label, + this.icon, + this.imageUrl, + this.isMandatory, + this.vendorId, + this.createdAt, + }); +} + +@immutable +class GetAttireOptionByIdData { + final GetAttireOptionByIdAttireOption? attireOption; + GetAttireOptionByIdData.fromJson(dynamic json): + + attireOption = json['attireOption'] == null ? null : GetAttireOptionByIdAttireOption.fromJson(json['attireOption']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAttireOptionByIdData otherTyped = other as GetAttireOptionByIdData; + return attireOption == otherTyped.attireOption; + + } + @override + int get hashCode => attireOption.hashCode; + + + Map toJson() { + Map json = {}; + if (attireOption != null) { + json['attireOption'] = attireOption!.toJson(); + } + return json; + } + + GetAttireOptionByIdData({ + this.attireOption, + }); +} + +@immutable +class GetAttireOptionByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetAttireOptionByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetAttireOptionByIdVariables otherTyped = other as GetAttireOptionByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetAttireOptionByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_benefits_data_by_key.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_benefits_data_by_key.dart new file mode 100644 index 00000000..90a2870b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_benefits_data_by_key.dart @@ -0,0 +1,266 @@ +part of 'generated.dart'; + +class GetBenefitsDataByKeyVariablesBuilder { + String staffId; + String vendorBenefitPlanId; + + final FirebaseDataConnect _dataConnect; + GetBenefitsDataByKeyVariablesBuilder(this._dataConnect, {required this.staffId,required this.vendorBenefitPlanId,}); + Deserializer dataDeserializer = (dynamic json) => GetBenefitsDataByKeyData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetBenefitsDataByKeyVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetBenefitsDataByKeyVariables vars= GetBenefitsDataByKeyVariables(staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,); + return _dataConnect.query("getBenefitsDataByKey", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetBenefitsDataByKeyBenefitsData { + final String id; + final String vendorBenefitPlanId; + final int current; + final String staffId; + final GetBenefitsDataByKeyBenefitsDataStaff staff; + final GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan vendorBenefitPlan; + GetBenefitsDataByKeyBenefitsData.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + current = nativeFromJson(json['current']), + staffId = nativeFromJson(json['staffId']), + staff = GetBenefitsDataByKeyBenefitsDataStaff.fromJson(json['staff']), + vendorBenefitPlan = GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan.fromJson(json['vendorBenefitPlan']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBenefitsDataByKeyBenefitsData otherTyped = other as GetBenefitsDataByKeyBenefitsData; + return id == otherTyped.id && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + current == otherTyped.current && + staffId == otherTyped.staffId && + staff == otherTyped.staff && + vendorBenefitPlan == otherTyped.vendorBenefitPlan; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorBenefitPlanId.hashCode, current.hashCode, staffId.hashCode, staff.hashCode, vendorBenefitPlan.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['current'] = nativeToJson(current); + json['staffId'] = nativeToJson(staffId); + json['staff'] = staff.toJson(); + json['vendorBenefitPlan'] = vendorBenefitPlan.toJson(); + return json; + } + + GetBenefitsDataByKeyBenefitsData({ + required this.id, + required this.vendorBenefitPlanId, + required this.current, + required this.staffId, + required this.staff, + required this.vendorBenefitPlan, + }); +} + +@immutable +class GetBenefitsDataByKeyBenefitsDataStaff { + final String id; + final String fullName; + GetBenefitsDataByKeyBenefitsDataStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBenefitsDataByKeyBenefitsDataStaff otherTyped = other as GetBenefitsDataByKeyBenefitsDataStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + GetBenefitsDataByKeyBenefitsDataStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan otherTyped = other as GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + return json; + } + + GetBenefitsDataByKeyBenefitsDataVendorBenefitPlan({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + }); +} + +@immutable +class GetBenefitsDataByKeyData { + final GetBenefitsDataByKeyBenefitsData? benefitsData; + GetBenefitsDataByKeyData.fromJson(dynamic json): + + benefitsData = json['benefitsData'] == null ? null : GetBenefitsDataByKeyBenefitsData.fromJson(json['benefitsData']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBenefitsDataByKeyData otherTyped = other as GetBenefitsDataByKeyData; + return benefitsData == otherTyped.benefitsData; + + } + @override + int get hashCode => benefitsData.hashCode; + + + Map toJson() { + Map json = {}; + if (benefitsData != null) { + json['benefitsData'] = benefitsData!.toJson(); + } + return json; + } + + GetBenefitsDataByKeyData({ + this.benefitsData, + }); +} + +@immutable +class GetBenefitsDataByKeyVariables { + final String staffId; + final String vendorBenefitPlanId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetBenefitsDataByKeyVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBenefitsDataByKeyVariables otherTyped = other as GetBenefitsDataByKeyVariables; + return staffId == otherTyped.staffId && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, vendorBenefitPlanId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + return json; + } + + GetBenefitsDataByKeyVariables({ + required this.staffId, + required this.vendorBenefitPlanId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_business_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_business_by_id.dart new file mode 100644 index 00000000..50ee46b0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_business_by_id.dart @@ -0,0 +1,236 @@ +part of 'generated.dart'; + +class GetBusinessByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetBusinessByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetBusinessByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetBusinessByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetBusinessByIdVariables vars= GetBusinessByIdVariables(id: id,); + return _dataConnect.query("getBusinessById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetBusinessByIdBusiness { + final String id; + final String businessName; + final String? contactName; + final String userId; + final String? companyLogoUrl; + final String? phone; + final String? email; + final String? hubBuilding; + final String? address; + final String? city; + final EnumValue? area; + final EnumValue? sector; + final EnumValue rateGroup; + final EnumValue status; + final String? notes; + final Timestamp? createdAt; + final Timestamp? updatedAt; + GetBusinessByIdBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']), + userId = nativeFromJson(json['userId']), + companyLogoUrl = json['companyLogoUrl'] == null ? null : nativeFromJson(json['companyLogoUrl']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + hubBuilding = json['hubBuilding'] == null ? null : nativeFromJson(json['hubBuilding']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + area = json['area'] == null ? null : businessAreaDeserializer(json['area']), + sector = json['sector'] == null ? null : businessSectorDeserializer(json['sector']), + rateGroup = businessRateGroupDeserializer(json['rateGroup']), + status = businessStatusDeserializer(json['status']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBusinessByIdBusiness otherTyped = other as GetBusinessByIdBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + contactName == otherTyped.contactName && + userId == otherTyped.userId && + companyLogoUrl == otherTyped.companyLogoUrl && + phone == otherTyped.phone && + email == otherTyped.email && + hubBuilding == otherTyped.hubBuilding && + address == otherTyped.address && + city == otherTyped.city && + area == otherTyped.area && + sector == otherTyped.sector && + rateGroup == otherTyped.rateGroup && + status == otherTyped.status && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, contactName.hashCode, userId.hashCode, companyLogoUrl.hashCode, phone.hashCode, email.hashCode, hubBuilding.hashCode, address.hashCode, city.hashCode, area.hashCode, sector.hashCode, rateGroup.hashCode, status.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + json['userId'] = nativeToJson(userId); + if (companyLogoUrl != null) { + json['companyLogoUrl'] = nativeToJson(companyLogoUrl); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (hubBuilding != null) { + json['hubBuilding'] = nativeToJson(hubBuilding); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (area != null) { + json['area'] = + businessAreaSerializer(area!) + ; + } + if (sector != null) { + json['sector'] = + businessSectorSerializer(sector!) + ; + } + json['rateGroup'] = + businessRateGroupSerializer(rateGroup) + ; + json['status'] = + businessStatusSerializer(status) + ; + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + GetBusinessByIdBusiness({ + required this.id, + required this.businessName, + this.contactName, + required this.userId, + this.companyLogoUrl, + this.phone, + this.email, + this.hubBuilding, + this.address, + this.city, + this.area, + this.sector, + required this.rateGroup, + required this.status, + this.notes, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class GetBusinessByIdData { + final GetBusinessByIdBusiness? business; + GetBusinessByIdData.fromJson(dynamic json): + + business = json['business'] == null ? null : GetBusinessByIdBusiness.fromJson(json['business']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBusinessByIdData otherTyped = other as GetBusinessByIdData; + return business == otherTyped.business; + + } + @override + int get hashCode => business.hashCode; + + + Map toJson() { + Map json = {}; + if (business != null) { + json['business'] = business!.toJson(); + } + return json; + } + + GetBusinessByIdData({ + this.business, + }); +} + +@immutable +class GetBusinessByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetBusinessByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBusinessByIdVariables otherTyped = other as GetBusinessByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetBusinessByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_businesses_by_user_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_businesses_by_user_id.dart new file mode 100644 index 00000000..850b697a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_businesses_by_user_id.dart @@ -0,0 +1,236 @@ +part of 'generated.dart'; + +class GetBusinessesByUserIdVariablesBuilder { + String userId; + + final FirebaseDataConnect _dataConnect; + GetBusinessesByUserIdVariablesBuilder(this._dataConnect, {required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => GetBusinessesByUserIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetBusinessesByUserIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetBusinessesByUserIdVariables vars= GetBusinessesByUserIdVariables(userId: userId,); + return _dataConnect.query("getBusinessesByUserId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetBusinessesByUserIdBusinesses { + final String id; + final String businessName; + final String? contactName; + final String userId; + final String? companyLogoUrl; + final String? phone; + final String? email; + final String? hubBuilding; + final String? address; + final String? city; + final EnumValue? area; + final EnumValue? sector; + final EnumValue rateGroup; + final EnumValue status; + final String? notes; + final Timestamp? createdAt; + final Timestamp? updatedAt; + GetBusinessesByUserIdBusinesses.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']), + userId = nativeFromJson(json['userId']), + companyLogoUrl = json['companyLogoUrl'] == null ? null : nativeFromJson(json['companyLogoUrl']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + hubBuilding = json['hubBuilding'] == null ? null : nativeFromJson(json['hubBuilding']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + area = json['area'] == null ? null : businessAreaDeserializer(json['area']), + sector = json['sector'] == null ? null : businessSectorDeserializer(json['sector']), + rateGroup = businessRateGroupDeserializer(json['rateGroup']), + status = businessStatusDeserializer(json['status']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBusinessesByUserIdBusinesses otherTyped = other as GetBusinessesByUserIdBusinesses; + return id == otherTyped.id && + businessName == otherTyped.businessName && + contactName == otherTyped.contactName && + userId == otherTyped.userId && + companyLogoUrl == otherTyped.companyLogoUrl && + phone == otherTyped.phone && + email == otherTyped.email && + hubBuilding == otherTyped.hubBuilding && + address == otherTyped.address && + city == otherTyped.city && + area == otherTyped.area && + sector == otherTyped.sector && + rateGroup == otherTyped.rateGroup && + status == otherTyped.status && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, contactName.hashCode, userId.hashCode, companyLogoUrl.hashCode, phone.hashCode, email.hashCode, hubBuilding.hashCode, address.hashCode, city.hashCode, area.hashCode, sector.hashCode, rateGroup.hashCode, status.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + json['userId'] = nativeToJson(userId); + if (companyLogoUrl != null) { + json['companyLogoUrl'] = nativeToJson(companyLogoUrl); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (hubBuilding != null) { + json['hubBuilding'] = nativeToJson(hubBuilding); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (area != null) { + json['area'] = + businessAreaSerializer(area!) + ; + } + if (sector != null) { + json['sector'] = + businessSectorSerializer(sector!) + ; + } + json['rateGroup'] = + businessRateGroupSerializer(rateGroup) + ; + json['status'] = + businessStatusSerializer(status) + ; + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + GetBusinessesByUserIdBusinesses({ + required this.id, + required this.businessName, + this.contactName, + required this.userId, + this.companyLogoUrl, + this.phone, + this.email, + this.hubBuilding, + this.address, + this.city, + this.area, + this.sector, + required this.rateGroup, + required this.status, + this.notes, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class GetBusinessesByUserIdData { + final List businesses; + GetBusinessesByUserIdData.fromJson(dynamic json): + + businesses = (json['businesses'] as List) + .map((e) => GetBusinessesByUserIdBusinesses.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBusinessesByUserIdData otherTyped = other as GetBusinessesByUserIdData; + return businesses == otherTyped.businesses; + + } + @override + int get hashCode => businesses.hashCode; + + + Map toJson() { + Map json = {}; + json['businesses'] = businesses.map((e) => e.toJson()).toList(); + return json; + } + + GetBusinessesByUserIdData({ + required this.businesses, + }); +} + +@immutable +class GetBusinessesByUserIdVariables { + final String userId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetBusinessesByUserIdVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetBusinessesByUserIdVariables otherTyped = other as GetBusinessesByUserIdVariables; + return userId == otherTyped.userId; + + } + @override + int get hashCode => userId.hashCode; + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + return json; + } + + GetBusinessesByUserIdVariables({ + required this.userId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_category_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_category_by_id.dart new file mode 100644 index 00000000..ce631bca --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_category_by_id.dart @@ -0,0 +1,162 @@ +part of 'generated.dart'; + +class GetCategoryByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetCategoryByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetCategoryByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetCategoryByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetCategoryByIdVariables vars= GetCategoryByIdVariables(id: id,); + return _dataConnect.query("getCategoryById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetCategoryByIdCategory { + final String id; + final String categoryId; + final String label; + final String? icon; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetCategoryByIdCategory.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + categoryId = nativeFromJson(json['categoryId']), + label = nativeFromJson(json['label']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCategoryByIdCategory otherTyped = other as GetCategoryByIdCategory; + return id == otherTyped.id && + categoryId == otherTyped.categoryId && + label == otherTyped.label && + icon == otherTyped.icon && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, categoryId.hashCode, label.hashCode, icon.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['categoryId'] = nativeToJson(categoryId); + json['label'] = nativeToJson(label); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetCategoryByIdCategory({ + required this.id, + required this.categoryId, + required this.label, + this.icon, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetCategoryByIdData { + final GetCategoryByIdCategory? category; + GetCategoryByIdData.fromJson(dynamic json): + + category = json['category'] == null ? null : GetCategoryByIdCategory.fromJson(json['category']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCategoryByIdData otherTyped = other as GetCategoryByIdData; + return category == otherTyped.category; + + } + @override + int get hashCode => category.hashCode; + + + Map toJson() { + Map json = {}; + if (category != null) { + json['category'] = category!.toJson(); + } + return json; + } + + GetCategoryByIdData({ + this.category, + }); +} + +@immutable +class GetCategoryByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetCategoryByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCategoryByIdVariables otherTyped = other as GetCategoryByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetCategoryByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_certificate_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_certificate_by_id.dart new file mode 100644 index 00000000..c391e609 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_certificate_by_id.dart @@ -0,0 +1,252 @@ +part of 'generated.dart'; + +class GetCertificateByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetCertificateByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetCertificateByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetCertificateByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetCertificateByIdVariables vars= GetCertificateByIdVariables(id: id,); + return _dataConnect.query("getCertificateById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetCertificateByIdCertificate { + final String id; + final String name; + final String? description; + final Timestamp? expiry; + final EnumValue status; + final String? fileUrl; + final String? icon; + final EnumValue? certificationType; + final String? issuer; + final String staffId; + final EnumValue? validationStatus; + final String? certificateNumber; + final Timestamp? updatedAt; + final GetCertificateByIdCertificateStaff staff; + GetCertificateByIdCertificate.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + expiry = json['expiry'] == null ? null : Timestamp.fromJson(json['expiry']), + status = certificateStatusDeserializer(json['status']), + fileUrl = json['fileUrl'] == null ? null : nativeFromJson(json['fileUrl']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + certificationType = json['certificationType'] == null ? null : complianceTypeDeserializer(json['certificationType']), + issuer = json['issuer'] == null ? null : nativeFromJson(json['issuer']), + staffId = nativeFromJson(json['staffId']), + validationStatus = json['validationStatus'] == null ? null : validationStatusDeserializer(json['validationStatus']), + certificateNumber = json['certificateNumber'] == null ? null : nativeFromJson(json['certificateNumber']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + staff = GetCertificateByIdCertificateStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCertificateByIdCertificate otherTyped = other as GetCertificateByIdCertificate; + return id == otherTyped.id && + name == otherTyped.name && + description == otherTyped.description && + expiry == otherTyped.expiry && + status == otherTyped.status && + fileUrl == otherTyped.fileUrl && + icon == otherTyped.icon && + certificationType == otherTyped.certificationType && + issuer == otherTyped.issuer && + staffId == otherTyped.staffId && + validationStatus == otherTyped.validationStatus && + certificateNumber == otherTyped.certificateNumber && + updatedAt == otherTyped.updatedAt && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, description.hashCode, expiry.hashCode, status.hashCode, fileUrl.hashCode, icon.hashCode, certificationType.hashCode, issuer.hashCode, staffId.hashCode, validationStatus.hashCode, certificateNumber.hashCode, updatedAt.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (expiry != null) { + json['expiry'] = expiry!.toJson(); + } + json['status'] = + certificateStatusSerializer(status) + ; + if (fileUrl != null) { + json['fileUrl'] = nativeToJson(fileUrl); + } + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (certificationType != null) { + json['certificationType'] = + complianceTypeSerializer(certificationType!) + ; + } + if (issuer != null) { + json['issuer'] = nativeToJson(issuer); + } + json['staffId'] = nativeToJson(staffId); + if (validationStatus != null) { + json['validationStatus'] = + validationStatusSerializer(validationStatus!) + ; + } + if (certificateNumber != null) { + json['certificateNumber'] = nativeToJson(certificateNumber); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + json['staff'] = staff.toJson(); + return json; + } + + GetCertificateByIdCertificate({ + required this.id, + required this.name, + this.description, + this.expiry, + required this.status, + this.fileUrl, + this.icon, + this.certificationType, + this.issuer, + required this.staffId, + this.validationStatus, + this.certificateNumber, + this.updatedAt, + required this.staff, + }); +} + +@immutable +class GetCertificateByIdCertificateStaff { + final String id; + final String fullName; + GetCertificateByIdCertificateStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCertificateByIdCertificateStaff otherTyped = other as GetCertificateByIdCertificateStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + GetCertificateByIdCertificateStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class GetCertificateByIdData { + final GetCertificateByIdCertificate? certificate; + GetCertificateByIdData.fromJson(dynamic json): + + certificate = json['certificate'] == null ? null : GetCertificateByIdCertificate.fromJson(json['certificate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCertificateByIdData otherTyped = other as GetCertificateByIdData; + return certificate == otherTyped.certificate; + + } + @override + int get hashCode => certificate.hashCode; + + + Map toJson() { + Map json = {}; + if (certificate != null) { + json['certificate'] = certificate!.toJson(); + } + return json; + } + + GetCertificateByIdData({ + this.certificate, + }); +} + +@immutable +class GetCertificateByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetCertificateByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCertificateByIdVariables otherTyped = other as GetCertificateByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetCertificateByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_client_feedback_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_client_feedback_by_id.dart new file mode 100644 index 00000000..6778c038 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_client_feedback_by_id.dart @@ -0,0 +1,250 @@ +part of 'generated.dart'; + +class GetClientFeedbackByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetClientFeedbackByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetClientFeedbackByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetClientFeedbackByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetClientFeedbackByIdVariables vars= GetClientFeedbackByIdVariables(id: id,); + return _dataConnect.query("getClientFeedbackById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetClientFeedbackByIdClientFeedback { + final String id; + final String businessId; + final String vendorId; + final int? rating; + final String? comment; + final Timestamp? date; + final Timestamp? createdAt; + final GetClientFeedbackByIdClientFeedbackBusiness business; + final GetClientFeedbackByIdClientFeedbackVendor vendor; + GetClientFeedbackByIdClientFeedback.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + rating = json['rating'] == null ? null : nativeFromJson(json['rating']), + comment = json['comment'] == null ? null : nativeFromJson(json['comment']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = GetClientFeedbackByIdClientFeedbackBusiness.fromJson(json['business']), + vendor = GetClientFeedbackByIdClientFeedbackVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetClientFeedbackByIdClientFeedback otherTyped = other as GetClientFeedbackByIdClientFeedback; + return id == otherTyped.id && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if (rating != null) { + json['rating'] = nativeToJson(rating); + } + if (comment != null) { + json['comment'] = nativeToJson(comment); + } + if (date != null) { + json['date'] = date!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetClientFeedbackByIdClientFeedback({ + required this.id, + required this.businessId, + required this.vendorId, + this.rating, + this.comment, + this.date, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetClientFeedbackByIdClientFeedbackBusiness { + final String id; + final String businessName; + GetClientFeedbackByIdClientFeedbackBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetClientFeedbackByIdClientFeedbackBusiness otherTyped = other as GetClientFeedbackByIdClientFeedbackBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + GetClientFeedbackByIdClientFeedbackBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class GetClientFeedbackByIdClientFeedbackVendor { + final String id; + final String companyName; + GetClientFeedbackByIdClientFeedbackVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetClientFeedbackByIdClientFeedbackVendor otherTyped = other as GetClientFeedbackByIdClientFeedbackVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetClientFeedbackByIdClientFeedbackVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetClientFeedbackByIdData { + final GetClientFeedbackByIdClientFeedback? clientFeedback; + GetClientFeedbackByIdData.fromJson(dynamic json): + + clientFeedback = json['clientFeedback'] == null ? null : GetClientFeedbackByIdClientFeedback.fromJson(json['clientFeedback']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetClientFeedbackByIdData otherTyped = other as GetClientFeedbackByIdData; + return clientFeedback == otherTyped.clientFeedback; + + } + @override + int get hashCode => clientFeedback.hashCode; + + + Map toJson() { + Map json = {}; + if (clientFeedback != null) { + json['clientFeedback'] = clientFeedback!.toJson(); + } + return json; + } + + GetClientFeedbackByIdData({ + this.clientFeedback, + }); +} + +@immutable +class GetClientFeedbackByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetClientFeedbackByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetClientFeedbackByIdVariables otherTyped = other as GetClientFeedbackByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetClientFeedbackByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_conversation_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_conversation_by_id.dart new file mode 100644 index 00000000..4b1892f0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_conversation_by_id.dart @@ -0,0 +1,184 @@ +part of 'generated.dart'; + +class GetConversationByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetConversationByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetConversationByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetConversationByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetConversationByIdVariables vars= GetConversationByIdVariables(id: id,); + return _dataConnect.query("getConversationById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetConversationByIdConversation { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + GetConversationByIdConversation.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetConversationByIdConversation otherTyped = other as GetConversationByIdConversation; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + GetConversationByIdConversation({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class GetConversationByIdData { + final GetConversationByIdConversation? conversation; + GetConversationByIdData.fromJson(dynamic json): + + conversation = json['conversation'] == null ? null : GetConversationByIdConversation.fromJson(json['conversation']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetConversationByIdData otherTyped = other as GetConversationByIdData; + return conversation == otherTyped.conversation; + + } + @override + int get hashCode => conversation.hashCode; + + + Map toJson() { + Map json = {}; + if (conversation != null) { + json['conversation'] = conversation!.toJson(); + } + return json; + } + + GetConversationByIdData({ + this.conversation, + }); +} + +@immutable +class GetConversationByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetConversationByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetConversationByIdVariables otherTyped = other as GetConversationByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetConversationByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_course_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_course_by_id.dart new file mode 100644 index 00000000..c68626ad --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_course_by_id.dart @@ -0,0 +1,229 @@ +part of 'generated.dart'; + +class GetCourseByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetCourseByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetCourseByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetCourseByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetCourseByIdVariables vars= GetCourseByIdVariables(id: id,); + return _dataConnect.query("getCourseById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetCourseByIdCourse { + final String id; + final String? title; + final String? description; + final String? thumbnailUrl; + final int? durationMinutes; + final int? xpReward; + final String categoryId; + final String? levelRequired; + final bool? isCertification; + final Timestamp? createdAt; + final GetCourseByIdCourseCategory category; + GetCourseByIdCourse.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + thumbnailUrl = json['thumbnailUrl'] == null ? null : nativeFromJson(json['thumbnailUrl']), + durationMinutes = json['durationMinutes'] == null ? null : nativeFromJson(json['durationMinutes']), + xpReward = json['xpReward'] == null ? null : nativeFromJson(json['xpReward']), + categoryId = nativeFromJson(json['categoryId']), + levelRequired = json['levelRequired'] == null ? null : nativeFromJson(json['levelRequired']), + isCertification = json['isCertification'] == null ? null : nativeFromJson(json['isCertification']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + category = GetCourseByIdCourseCategory.fromJson(json['category']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCourseByIdCourse otherTyped = other as GetCourseByIdCourse; + return id == otherTyped.id && + title == otherTyped.title && + description == otherTyped.description && + thumbnailUrl == otherTyped.thumbnailUrl && + durationMinutes == otherTyped.durationMinutes && + xpReward == otherTyped.xpReward && + categoryId == otherTyped.categoryId && + levelRequired == otherTyped.levelRequired && + isCertification == otherTyped.isCertification && + createdAt == otherTyped.createdAt && + category == otherTyped.category; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, description.hashCode, thumbnailUrl.hashCode, durationMinutes.hashCode, xpReward.hashCode, categoryId.hashCode, levelRequired.hashCode, isCertification.hashCode, createdAt.hashCode, category.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (thumbnailUrl != null) { + json['thumbnailUrl'] = nativeToJson(thumbnailUrl); + } + if (durationMinutes != null) { + json['durationMinutes'] = nativeToJson(durationMinutes); + } + if (xpReward != null) { + json['xpReward'] = nativeToJson(xpReward); + } + json['categoryId'] = nativeToJson(categoryId); + if (levelRequired != null) { + json['levelRequired'] = nativeToJson(levelRequired); + } + if (isCertification != null) { + json['isCertification'] = nativeToJson(isCertification); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['category'] = category.toJson(); + return json; + } + + GetCourseByIdCourse({ + required this.id, + this.title, + this.description, + this.thumbnailUrl, + this.durationMinutes, + this.xpReward, + required this.categoryId, + this.levelRequired, + this.isCertification, + this.createdAt, + required this.category, + }); +} + +@immutable +class GetCourseByIdCourseCategory { + final String id; + final String label; + GetCourseByIdCourseCategory.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + label = nativeFromJson(json['label']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCourseByIdCourseCategory otherTyped = other as GetCourseByIdCourseCategory; + return id == otherTyped.id && + label == otherTyped.label; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, label.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['label'] = nativeToJson(label); + return json; + } + + GetCourseByIdCourseCategory({ + required this.id, + required this.label, + }); +} + +@immutable +class GetCourseByIdData { + final GetCourseByIdCourse? course; + GetCourseByIdData.fromJson(dynamic json): + + course = json['course'] == null ? null : GetCourseByIdCourse.fromJson(json['course']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCourseByIdData otherTyped = other as GetCourseByIdData; + return course == otherTyped.course; + + } + @override + int get hashCode => course.hashCode; + + + Map toJson() { + Map json = {}; + if (course != null) { + json['course'] = course!.toJson(); + } + return json; + } + + GetCourseByIdData({ + this.course, + }); +} + +@immutable +class GetCourseByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetCourseByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCourseByIdVariables otherTyped = other as GetCourseByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetCourseByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_custom_rate_card_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_custom_rate_card_by_id.dart new file mode 100644 index 00000000..d763bf21 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_custom_rate_card_by_id.dart @@ -0,0 +1,164 @@ +part of 'generated.dart'; + +class GetCustomRateCardByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetCustomRateCardByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetCustomRateCardByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetCustomRateCardByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetCustomRateCardByIdVariables vars= GetCustomRateCardByIdVariables(id: id,); + return _dataConnect.query("getCustomRateCardById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetCustomRateCardByIdCustomRateCard { + final String id; + final String name; + final String? baseBook; + final double? discount; + final bool? isDefault; + final Timestamp? createdAt; + final Timestamp? updatedAt; + GetCustomRateCardByIdCustomRateCard.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + baseBook = json['baseBook'] == null ? null : nativeFromJson(json['baseBook']), + discount = json['discount'] == null ? null : nativeFromJson(json['discount']), + isDefault = json['isDefault'] == null ? null : nativeFromJson(json['isDefault']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCustomRateCardByIdCustomRateCard otherTyped = other as GetCustomRateCardByIdCustomRateCard; + return id == otherTyped.id && + name == otherTyped.name && + baseBook == otherTyped.baseBook && + discount == otherTyped.discount && + isDefault == otherTyped.isDefault && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, baseBook.hashCode, discount.hashCode, isDefault.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (baseBook != null) { + json['baseBook'] = nativeToJson(baseBook); + } + if (discount != null) { + json['discount'] = nativeToJson(discount); + } + if (isDefault != null) { + json['isDefault'] = nativeToJson(isDefault); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + GetCustomRateCardByIdCustomRateCard({ + required this.id, + required this.name, + this.baseBook, + this.discount, + this.isDefault, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class GetCustomRateCardByIdData { + final GetCustomRateCardByIdCustomRateCard? customRateCard; + GetCustomRateCardByIdData.fromJson(dynamic json): + + customRateCard = json['customRateCard'] == null ? null : GetCustomRateCardByIdCustomRateCard.fromJson(json['customRateCard']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCustomRateCardByIdData otherTyped = other as GetCustomRateCardByIdData; + return customRateCard == otherTyped.customRateCard; + + } + @override + int get hashCode => customRateCard.hashCode; + + + Map toJson() { + Map json = {}; + if (customRateCard != null) { + json['customRateCard'] = customRateCard!.toJson(); + } + return json; + } + + GetCustomRateCardByIdData({ + this.customRateCard, + }); +} + +@immutable +class GetCustomRateCardByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetCustomRateCardByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetCustomRateCardByIdVariables otherTyped = other as GetCustomRateCardByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetCustomRateCardByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_document_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_document_by_id.dart new file mode 100644 index 00000000..c75831d6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_document_by_id.dart @@ -0,0 +1,150 @@ +part of 'generated.dart'; + +class GetDocumentByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetDocumentByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetDocumentByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetDocumentByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetDocumentByIdVariables vars= GetDocumentByIdVariables(id: id,); + return _dataConnect.query("getDocumentById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetDocumentByIdDocument { + final String id; + final EnumValue documentType; + final String name; + final String? description; + final Timestamp? createdAt; + GetDocumentByIdDocument.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + documentType = documentTypeDeserializer(json['documentType']), + name = nativeFromJson(json['name']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetDocumentByIdDocument otherTyped = other as GetDocumentByIdDocument; + return id == otherTyped.id && + documentType == otherTyped.documentType && + name == otherTyped.name && + description == otherTyped.description && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, documentType.hashCode, name.hashCode, description.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['documentType'] = + documentTypeSerializer(documentType) + ; + json['name'] = nativeToJson(name); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + GetDocumentByIdDocument({ + required this.id, + required this.documentType, + required this.name, + this.description, + this.createdAt, + }); +} + +@immutable +class GetDocumentByIdData { + final GetDocumentByIdDocument? document; + GetDocumentByIdData.fromJson(dynamic json): + + document = json['document'] == null ? null : GetDocumentByIdDocument.fromJson(json['document']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetDocumentByIdData otherTyped = other as GetDocumentByIdData; + return document == otherTyped.document; + + } + @override + int get hashCode => document.hashCode; + + + Map toJson() { + Map json = {}; + if (document != null) { + json['document'] = document!.toJson(); + } + return json; + } + + GetDocumentByIdData({ + this.document, + }); +} + +@immutable +class GetDocumentByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetDocumentByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetDocumentByIdVariables otherTyped = other as GetDocumentByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetDocumentByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_emergency_contact_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_emergency_contact_by_id.dart new file mode 100644 index 00000000..f2ecd85f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_emergency_contact_by_id.dart @@ -0,0 +1,167 @@ +part of 'generated.dart'; + +class GetEmergencyContactByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetEmergencyContactByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetEmergencyContactByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetEmergencyContactByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetEmergencyContactByIdVariables vars= GetEmergencyContactByIdVariables(id: id,); + return _dataConnect.query("getEmergencyContactById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetEmergencyContactByIdEmergencyContact { + final String id; + final String name; + final String phone; + final EnumValue relationship; + final String staffId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetEmergencyContactByIdEmergencyContact.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + phone = nativeFromJson(json['phone']), + relationship = relationshipTypeDeserializer(json['relationship']), + staffId = nativeFromJson(json['staffId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetEmergencyContactByIdEmergencyContact otherTyped = other as GetEmergencyContactByIdEmergencyContact; + return id == otherTyped.id && + name == otherTyped.name && + phone == otherTyped.phone && + relationship == otherTyped.relationship && + staffId == otherTyped.staffId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, phone.hashCode, relationship.hashCode, staffId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['phone'] = nativeToJson(phone); + json['relationship'] = + relationshipTypeSerializer(relationship) + ; + json['staffId'] = nativeToJson(staffId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetEmergencyContactByIdEmergencyContact({ + required this.id, + required this.name, + required this.phone, + required this.relationship, + required this.staffId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetEmergencyContactByIdData { + final GetEmergencyContactByIdEmergencyContact? emergencyContact; + GetEmergencyContactByIdData.fromJson(dynamic json): + + emergencyContact = json['emergencyContact'] == null ? null : GetEmergencyContactByIdEmergencyContact.fromJson(json['emergencyContact']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetEmergencyContactByIdData otherTyped = other as GetEmergencyContactByIdData; + return emergencyContact == otherTyped.emergencyContact; + + } + @override + int get hashCode => emergencyContact.hashCode; + + + Map toJson() { + Map json = {}; + if (emergencyContact != null) { + json['emergencyContact'] = emergencyContact!.toJson(); + } + return json; + } + + GetEmergencyContactByIdData({ + this.emergencyContact, + }); +} + +@immutable +class GetEmergencyContactByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetEmergencyContactByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetEmergencyContactByIdVariables otherTyped = other as GetEmergencyContactByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetEmergencyContactByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_emergency_contacts_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_emergency_contacts_by_staff_id.dart new file mode 100644 index 00000000..e052eaa6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_emergency_contacts_by_staff_id.dart @@ -0,0 +1,167 @@ +part of 'generated.dart'; + +class GetEmergencyContactsByStaffIdVariablesBuilder { + String staffId; + + final FirebaseDataConnect _dataConnect; + GetEmergencyContactsByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => GetEmergencyContactsByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetEmergencyContactsByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetEmergencyContactsByStaffIdVariables vars= GetEmergencyContactsByStaffIdVariables(staffId: staffId,); + return _dataConnect.query("getEmergencyContactsByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetEmergencyContactsByStaffIdEmergencyContacts { + final String id; + final String name; + final String phone; + final EnumValue relationship; + final String staffId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetEmergencyContactsByStaffIdEmergencyContacts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + phone = nativeFromJson(json['phone']), + relationship = relationshipTypeDeserializer(json['relationship']), + staffId = nativeFromJson(json['staffId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetEmergencyContactsByStaffIdEmergencyContacts otherTyped = other as GetEmergencyContactsByStaffIdEmergencyContacts; + return id == otherTyped.id && + name == otherTyped.name && + phone == otherTyped.phone && + relationship == otherTyped.relationship && + staffId == otherTyped.staffId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, phone.hashCode, relationship.hashCode, staffId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['phone'] = nativeToJson(phone); + json['relationship'] = + relationshipTypeSerializer(relationship) + ; + json['staffId'] = nativeToJson(staffId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetEmergencyContactsByStaffIdEmergencyContacts({ + required this.id, + required this.name, + required this.phone, + required this.relationship, + required this.staffId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetEmergencyContactsByStaffIdData { + final List emergencyContacts; + GetEmergencyContactsByStaffIdData.fromJson(dynamic json): + + emergencyContacts = (json['emergencyContacts'] as List) + .map((e) => GetEmergencyContactsByStaffIdEmergencyContacts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetEmergencyContactsByStaffIdData otherTyped = other as GetEmergencyContactsByStaffIdData; + return emergencyContacts == otherTyped.emergencyContacts; + + } + @override + int get hashCode => emergencyContacts.hashCode; + + + Map toJson() { + Map json = {}; + json['emergencyContacts'] = emergencyContacts.map((e) => e.toJson()).toList(); + return json; + } + + GetEmergencyContactsByStaffIdData({ + required this.emergencyContacts, + }); +} + +@immutable +class GetEmergencyContactsByStaffIdVariables { + final String staffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetEmergencyContactsByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetEmergencyContactsByStaffIdVariables otherTyped = other as GetEmergencyContactsByStaffIdVariables; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + GetEmergencyContactsByStaffIdVariables({ + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_faq_data_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_faq_data_by_id.dart new file mode 100644 index 00000000..c6fb22ae --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_faq_data_by_id.dart @@ -0,0 +1,159 @@ +part of 'generated.dart'; + +class GetFaqDataByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetFaqDataByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetFaqDataByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetFaqDataByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetFaqDataByIdVariables vars= GetFaqDataByIdVariables(id: id,); + return _dataConnect.query("getFaqDataById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetFaqDataByIdFaqData { + final String id; + final String category; + final List? questions; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetFaqDataByIdFaqData.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + category = nativeFromJson(json['category']), + questions = json['questions'] == null ? null : (json['questions'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetFaqDataByIdFaqData otherTyped = other as GetFaqDataByIdFaqData; + return id == otherTyped.id && + category == otherTyped.category && + questions == otherTyped.questions && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, category.hashCode, questions.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['category'] = nativeToJson(category); + if (questions != null) { + json['questions'] = questions?.map((e) => e!.toJson()).toList(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetFaqDataByIdFaqData({ + required this.id, + required this.category, + this.questions, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetFaqDataByIdData { + final GetFaqDataByIdFaqData? faqData; + GetFaqDataByIdData.fromJson(dynamic json): + + faqData = json['faqData'] == null ? null : GetFaqDataByIdFaqData.fromJson(json['faqData']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetFaqDataByIdData otherTyped = other as GetFaqDataByIdData; + return faqData == otherTyped.faqData; + + } + @override + int get hashCode => faqData.hashCode; + + + Map toJson() { + Map json = {}; + if (faqData != null) { + json['faqData'] = faqData!.toJson(); + } + return json; + } + + GetFaqDataByIdData({ + this.faqData, + }); +} + +@immutable +class GetFaqDataByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetFaqDataByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetFaqDataByIdVariables otherTyped = other as GetFaqDataByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetFaqDataByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_hub_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_hub_by_id.dart new file mode 100644 index 00000000..aad9ede2 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_hub_by_id.dart @@ -0,0 +1,176 @@ +part of 'generated.dart'; + +class GetHubByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetHubByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetHubByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetHubByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetHubByIdVariables vars= GetHubByIdVariables(id: id,); + return _dataConnect.query("getHubById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetHubByIdHub { + final String id; + final String name; + final String? locationName; + final String? address; + final String? nfcTagId; + final String ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetHubByIdHub.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + locationName = json['locationName'] == null ? null : nativeFromJson(json['locationName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + nfcTagId = json['nfcTagId'] == null ? null : nativeFromJson(json['nfcTagId']), + ownerId = nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetHubByIdHub otherTyped = other as GetHubByIdHub; + return id == otherTyped.id && + name == otherTyped.name && + locationName == otherTyped.locationName && + address == otherTyped.address && + nfcTagId == otherTyped.nfcTagId && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, locationName.hashCode, address.hashCode, nfcTagId.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (locationName != null) { + json['locationName'] = nativeToJson(locationName); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (nfcTagId != null) { + json['nfcTagId'] = nativeToJson(nfcTagId); + } + json['ownerId'] = nativeToJson(ownerId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetHubByIdHub({ + required this.id, + required this.name, + this.locationName, + this.address, + this.nfcTagId, + required this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetHubByIdData { + final GetHubByIdHub? hub; + GetHubByIdData.fromJson(dynamic json): + + hub = json['hub'] == null ? null : GetHubByIdHub.fromJson(json['hub']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetHubByIdData otherTyped = other as GetHubByIdData; + return hub == otherTyped.hub; + + } + @override + int get hashCode => hub.hashCode; + + + Map toJson() { + Map json = {}; + if (hub != null) { + json['hub'] = hub!.toJson(); + } + return json; + } + + GetHubByIdData({ + this.hub, + }); +} + +@immutable +class GetHubByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetHubByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetHubByIdVariables otherTyped = other as GetHubByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetHubByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_hubs_by_owner_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_hubs_by_owner_id.dart new file mode 100644 index 00000000..4b280f98 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_hubs_by_owner_id.dart @@ -0,0 +1,176 @@ +part of 'generated.dart'; + +class GetHubsByOwnerIdVariablesBuilder { + String ownerId; + + final FirebaseDataConnect _dataConnect; + GetHubsByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => GetHubsByOwnerIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetHubsByOwnerIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetHubsByOwnerIdVariables vars= GetHubsByOwnerIdVariables(ownerId: ownerId,); + return _dataConnect.query("getHubsByOwnerId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetHubsByOwnerIdHubs { + final String id; + final String name; + final String? locationName; + final String? address; + final String? nfcTagId; + final String ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetHubsByOwnerIdHubs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + locationName = json['locationName'] == null ? null : nativeFromJson(json['locationName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + nfcTagId = json['nfcTagId'] == null ? null : nativeFromJson(json['nfcTagId']), + ownerId = nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetHubsByOwnerIdHubs otherTyped = other as GetHubsByOwnerIdHubs; + return id == otherTyped.id && + name == otherTyped.name && + locationName == otherTyped.locationName && + address == otherTyped.address && + nfcTagId == otherTyped.nfcTagId && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, locationName.hashCode, address.hashCode, nfcTagId.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (locationName != null) { + json['locationName'] = nativeToJson(locationName); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (nfcTagId != null) { + json['nfcTagId'] = nativeToJson(nfcTagId); + } + json['ownerId'] = nativeToJson(ownerId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetHubsByOwnerIdHubs({ + required this.id, + required this.name, + this.locationName, + this.address, + this.nfcTagId, + required this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetHubsByOwnerIdData { + final List hubs; + GetHubsByOwnerIdData.fromJson(dynamic json): + + hubs = (json['hubs'] as List) + .map((e) => GetHubsByOwnerIdHubs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetHubsByOwnerIdData otherTyped = other as GetHubsByOwnerIdData; + return hubs == otherTyped.hubs; + + } + @override + int get hashCode => hubs.hashCode; + + + Map toJson() { + Map json = {}; + json['hubs'] = hubs.map((e) => e.toJson()).toList(); + return json; + } + + GetHubsByOwnerIdData({ + required this.hubs, + }); +} + +@immutable +class GetHubsByOwnerIdVariables { + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetHubsByOwnerIdVariables.fromJson(Map json): + + ownerId = nativeFromJson(json['ownerId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetHubsByOwnerIdVariables otherTyped = other as GetHubsByOwnerIdVariables; + return ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => ownerId.hashCode; + + + Map toJson() { + Map json = {}; + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + GetHubsByOwnerIdVariables({ + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_invoice_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_invoice_by_id.dart new file mode 100644 index 00000000..f27c8d4c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_invoice_by_id.dart @@ -0,0 +1,448 @@ +part of 'generated.dart'; + +class GetInvoiceByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetInvoiceByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetInvoiceByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetInvoiceByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetInvoiceByIdVariables vars= GetInvoiceByIdVariables(id: id,); + return _dataConnect.query("getInvoiceById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetInvoiceByIdInvoice { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final GetInvoiceByIdInvoiceVendor vendor; + final GetInvoiceByIdInvoiceBusiness business; + final GetInvoiceByIdInvoiceOrder order; + GetInvoiceByIdInvoice.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = GetInvoiceByIdInvoiceVendor.fromJson(json['vendor']), + business = GetInvoiceByIdInvoiceBusiness.fromJson(json['business']), + order = GetInvoiceByIdInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceByIdInvoice otherTyped = other as GetInvoiceByIdInvoice; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + GetInvoiceByIdInvoice({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class GetInvoiceByIdInvoiceVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + GetInvoiceByIdInvoiceVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceByIdInvoiceVendor otherTyped = other as GetInvoiceByIdInvoiceVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + GetInvoiceByIdInvoiceVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class GetInvoiceByIdInvoiceBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + GetInvoiceByIdInvoiceBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceByIdInvoiceBusiness otherTyped = other as GetInvoiceByIdInvoiceBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetInvoiceByIdInvoiceBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class GetInvoiceByIdInvoiceOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + GetInvoiceByIdInvoiceOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceByIdInvoiceOrder otherTyped = other as GetInvoiceByIdInvoiceOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + GetInvoiceByIdInvoiceOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class GetInvoiceByIdData { + final GetInvoiceByIdInvoice? invoice; + GetInvoiceByIdData.fromJson(dynamic json): + + invoice = json['invoice'] == null ? null : GetInvoiceByIdInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceByIdData otherTyped = other as GetInvoiceByIdData; + return invoice == otherTyped.invoice; + + } + @override + int get hashCode => invoice.hashCode; + + + Map toJson() { + Map json = {}; + if (invoice != null) { + json['invoice'] = invoice!.toJson(); + } + return json; + } + + GetInvoiceByIdData({ + this.invoice, + }); +} + +@immutable +class GetInvoiceByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetInvoiceByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceByIdVariables otherTyped = other as GetInvoiceByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetInvoiceByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_invoice_template_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_invoice_template_by_id.dart new file mode 100644 index 00000000..2688c0f5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_invoice_template_by_id.dart @@ -0,0 +1,451 @@ +part of 'generated.dart'; + +class GetInvoiceTemplateByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetInvoiceTemplateByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetInvoiceTemplateByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetInvoiceTemplateByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetInvoiceTemplateByIdVariables vars= GetInvoiceTemplateByIdVariables(id: id,); + return _dataConnect.query("getInvoiceTemplateById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetInvoiceTemplateByIdInvoiceTemplate { + final String id; + final String name; + final String ownerId; + final String? vendorId; + final String? businessId; + final String? orderId; + final EnumValue? paymentTerms; + final String? invoiceNumber; + final Timestamp? issueDate; + final Timestamp? dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double? amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetInvoiceTemplateByIdInvoiceTemplateVendor? vendor; + final GetInvoiceTemplateByIdInvoiceTemplateBusiness? business; + final GetInvoiceTemplateByIdInvoiceTemplateOrder? order; + GetInvoiceTemplateByIdInvoiceTemplate.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + businessId = json['businessId'] == null ? null : nativeFromJson(json['businessId']), + orderId = json['orderId'] == null ? null : nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsTempDeserializer(json['paymentTerms']), + invoiceNumber = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']), + issueDate = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = json['amount'] == null ? null : nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = json['vendor'] == null ? null : GetInvoiceTemplateByIdInvoiceTemplateVendor.fromJson(json['vendor']), + business = json['business'] == null ? null : GetInvoiceTemplateByIdInvoiceTemplateBusiness.fromJson(json['business']), + order = json['order'] == null ? null : GetInvoiceTemplateByIdInvoiceTemplateOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceTemplateByIdInvoiceTemplate otherTyped = other as GetInvoiceTemplateByIdInvoiceTemplate; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (businessId != null) { + json['businessId'] = nativeToJson(businessId); + } + if (orderId != null) { + json['orderId'] = nativeToJson(orderId); + } + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsTempSerializer(paymentTerms!) + ; + } + if (invoiceNumber != null) { + json['invoiceNumber'] = nativeToJson(invoiceNumber); + } + if (issueDate != null) { + json['issueDate'] = issueDate!.toJson(); + } + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + if (amount != null) { + json['amount'] = nativeToJson(amount); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + if (business != null) { + json['business'] = business!.toJson(); + } + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + GetInvoiceTemplateByIdInvoiceTemplate({ + required this.id, + required this.name, + required this.ownerId, + this.vendorId, + this.businessId, + this.orderId, + this.paymentTerms, + this.invoiceNumber, + this.issueDate, + this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.createdAt, + this.updatedAt, + this.createdBy, + this.vendor, + this.business, + this.order, + }); +} + +@immutable +class GetInvoiceTemplateByIdInvoiceTemplateVendor { + final String id; + final String companyName; + GetInvoiceTemplateByIdInvoiceTemplateVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceTemplateByIdInvoiceTemplateVendor otherTyped = other as GetInvoiceTemplateByIdInvoiceTemplateVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetInvoiceTemplateByIdInvoiceTemplateVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetInvoiceTemplateByIdInvoiceTemplateBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetInvoiceTemplateByIdInvoiceTemplateBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceTemplateByIdInvoiceTemplateBusiness otherTyped = other as GetInvoiceTemplateByIdInvoiceTemplateBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetInvoiceTemplateByIdInvoiceTemplateBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetInvoiceTemplateByIdInvoiceTemplateOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + GetInvoiceTemplateByIdInvoiceTemplateOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceTemplateByIdInvoiceTemplateOrder otherTyped = other as GetInvoiceTemplateByIdInvoiceTemplateOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + return json; + } + + GetInvoiceTemplateByIdInvoiceTemplateOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + }); +} + +@immutable +class GetInvoiceTemplateByIdData { + final GetInvoiceTemplateByIdInvoiceTemplate? invoiceTemplate; + GetInvoiceTemplateByIdData.fromJson(dynamic json): + + invoiceTemplate = json['invoiceTemplate'] == null ? null : GetInvoiceTemplateByIdInvoiceTemplate.fromJson(json['invoiceTemplate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceTemplateByIdData otherTyped = other as GetInvoiceTemplateByIdData; + return invoiceTemplate == otherTyped.invoiceTemplate; + + } + @override + int get hashCode => invoiceTemplate.hashCode; + + + Map toJson() { + Map json = {}; + if (invoiceTemplate != null) { + json['invoiceTemplate'] = invoiceTemplate!.toJson(); + } + return json; + } + + GetInvoiceTemplateByIdData({ + this.invoiceTemplate, + }); +} + +@immutable +class GetInvoiceTemplateByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetInvoiceTemplateByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetInvoiceTemplateByIdVariables otherTyped = other as GetInvoiceTemplateByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetInvoiceTemplateByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_level_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_level_by_id.dart new file mode 100644 index 00000000..39437a2c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_level_by_id.dart @@ -0,0 +1,169 @@ +part of 'generated.dart'; + +class GetLevelByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetLevelByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetLevelByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetLevelByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetLevelByIdVariables vars= GetLevelByIdVariables(id: id,); + return _dataConnect.query("getLevelById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetLevelByIdLevel { + final String id; + final String name; + final int xpRequired; + final String? icon; + final AnyValue? colors; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetLevelByIdLevel.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + xpRequired = nativeFromJson(json['xpRequired']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + colors = json['colors'] == null ? null : AnyValue.fromJson(json['colors']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetLevelByIdLevel otherTyped = other as GetLevelByIdLevel; + return id == otherTyped.id && + name == otherTyped.name && + xpRequired == otherTyped.xpRequired && + icon == otherTyped.icon && + colors == otherTyped.colors && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, xpRequired.hashCode, icon.hashCode, colors.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['xpRequired'] = nativeToJson(xpRequired); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (colors != null) { + json['colors'] = colors!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetLevelByIdLevel({ + required this.id, + required this.name, + required this.xpRequired, + this.icon, + this.colors, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetLevelByIdData { + final GetLevelByIdLevel? level; + GetLevelByIdData.fromJson(dynamic json): + + level = json['level'] == null ? null : GetLevelByIdLevel.fromJson(json['level']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetLevelByIdData otherTyped = other as GetLevelByIdData; + return level == otherTyped.level; + + } + @override + int get hashCode => level.hashCode; + + + Map toJson() { + Map json = {}; + if (level != null) { + json['level'] = level!.toJson(); + } + return json; + } + + GetLevelByIdData({ + this.level, + }); +} + +@immutable +class GetLevelByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetLevelByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetLevelByIdVariables otherTyped = other as GetLevelByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetLevelByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_member_task_by_id_key.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_member_task_by_id_key.dart new file mode 100644 index 00000000..c5e6c71a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_member_task_by_id_key.dart @@ -0,0 +1,291 @@ +part of 'generated.dart'; + +class GetMemberTaskByIdKeyVariablesBuilder { + String teamMemberId; + String taskId; + + final FirebaseDataConnect _dataConnect; + GetMemberTaskByIdKeyVariablesBuilder(this._dataConnect, {required this.teamMemberId,required this.taskId,}); + Deserializer dataDeserializer = (dynamic json) => GetMemberTaskByIdKeyData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetMemberTaskByIdKeyVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetMemberTaskByIdKeyVariables vars= GetMemberTaskByIdKeyVariables(teamMemberId: teamMemberId,taskId: taskId,); + return _dataConnect.query("getMemberTaskByIdKey", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetMemberTaskByIdKeyMemberTask { + final String id; + final GetMemberTaskByIdKeyMemberTaskTask task; + final GetMemberTaskByIdKeyMemberTaskTeamMember teamMember; + GetMemberTaskByIdKeyMemberTask.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + task = GetMemberTaskByIdKeyMemberTaskTask.fromJson(json['task']), + teamMember = GetMemberTaskByIdKeyMemberTaskTeamMember.fromJson(json['teamMember']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTaskByIdKeyMemberTask otherTyped = other as GetMemberTaskByIdKeyMemberTask; + return id == otherTyped.id && + task == otherTyped.task && + teamMember == otherTyped.teamMember; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, task.hashCode, teamMember.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['task'] = task.toJson(); + json['teamMember'] = teamMember.toJson(); + return json; + } + + GetMemberTaskByIdKeyMemberTask({ + required this.id, + required this.task, + required this.teamMember, + }); +} + +@immutable +class GetMemberTaskByIdKeyMemberTaskTask { + final String id; + final String taskName; + final String? description; + final EnumValue status; + final Timestamp? dueDate; + final int? progress; + final EnumValue priority; + GetMemberTaskByIdKeyMemberTaskTask.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskName = nativeFromJson(json['taskName']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = taskStatusDeserializer(json['status']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + progress = json['progress'] == null ? null : nativeFromJson(json['progress']), + priority = taskPriorityDeserializer(json['priority']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTaskByIdKeyMemberTaskTask otherTyped = other as GetMemberTaskByIdKeyMemberTaskTask; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + priority == otherTyped.priority; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, priority.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskName'] = nativeToJson(taskName); + if (description != null) { + json['description'] = nativeToJson(description); + } + json['status'] = + taskStatusSerializer(status) + ; + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (progress != null) { + json['progress'] = nativeToJson(progress); + } + json['priority'] = + taskPrioritySerializer(priority) + ; + return json; + } + + GetMemberTaskByIdKeyMemberTaskTask({ + required this.id, + required this.taskName, + this.description, + required this.status, + this.dueDate, + this.progress, + required this.priority, + }); +} + +@immutable +class GetMemberTaskByIdKeyMemberTaskTeamMember { + final GetMemberTaskByIdKeyMemberTaskTeamMemberUser user; + GetMemberTaskByIdKeyMemberTaskTeamMember.fromJson(dynamic json): + + user = GetMemberTaskByIdKeyMemberTaskTeamMemberUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTaskByIdKeyMemberTaskTeamMember otherTyped = other as GetMemberTaskByIdKeyMemberTaskTeamMember; + return user == otherTyped.user; + + } + @override + int get hashCode => user.hashCode; + + + Map toJson() { + Map json = {}; + json['user'] = user.toJson(); + return json; + } + + GetMemberTaskByIdKeyMemberTaskTeamMember({ + required this.user, + }); +} + +@immutable +class GetMemberTaskByIdKeyMemberTaskTeamMemberUser { + final String? fullName; + final String? email; + GetMemberTaskByIdKeyMemberTaskTeamMemberUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTaskByIdKeyMemberTaskTeamMemberUser otherTyped = other as GetMemberTaskByIdKeyMemberTaskTeamMemberUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetMemberTaskByIdKeyMemberTaskTeamMemberUser({ + this.fullName, + this.email, + }); +} + +@immutable +class GetMemberTaskByIdKeyData { + final GetMemberTaskByIdKeyMemberTask? memberTask; + GetMemberTaskByIdKeyData.fromJson(dynamic json): + + memberTask = json['memberTask'] == null ? null : GetMemberTaskByIdKeyMemberTask.fromJson(json['memberTask']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTaskByIdKeyData otherTyped = other as GetMemberTaskByIdKeyData; + return memberTask == otherTyped.memberTask; + + } + @override + int get hashCode => memberTask.hashCode; + + + Map toJson() { + Map json = {}; + if (memberTask != null) { + json['memberTask'] = memberTask!.toJson(); + } + return json; + } + + GetMemberTaskByIdKeyData({ + this.memberTask, + }); +} + +@immutable +class GetMemberTaskByIdKeyVariables { + final String teamMemberId; + final String taskId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetMemberTaskByIdKeyVariables.fromJson(Map json): + + teamMemberId = nativeFromJson(json['teamMemberId']), + taskId = nativeFromJson(json['taskId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTaskByIdKeyVariables otherTyped = other as GetMemberTaskByIdKeyVariables; + return teamMemberId == otherTyped.teamMemberId && + taskId == otherTyped.taskId; + + } + @override + int get hashCode => Object.hashAll([teamMemberId.hashCode, taskId.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamMemberId'] = nativeToJson(teamMemberId); + json['taskId'] = nativeToJson(taskId); + return json; + } + + GetMemberTaskByIdKeyVariables({ + required this.teamMemberId, + required this.taskId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_member_tasks_by_task_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_member_tasks_by_task_id.dart new file mode 100644 index 00000000..242412af --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_member_tasks_by_task_id.dart @@ -0,0 +1,285 @@ +part of 'generated.dart'; + +class GetMemberTasksByTaskIdVariablesBuilder { + String taskId; + + final FirebaseDataConnect _dataConnect; + GetMemberTasksByTaskIdVariablesBuilder(this._dataConnect, {required this.taskId,}); + Deserializer dataDeserializer = (dynamic json) => GetMemberTasksByTaskIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetMemberTasksByTaskIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetMemberTasksByTaskIdVariables vars= GetMemberTasksByTaskIdVariables(taskId: taskId,); + return _dataConnect.query("getMemberTasksByTaskId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetMemberTasksByTaskIdMemberTasks { + final String id; + final GetMemberTasksByTaskIdMemberTasksTask task; + final GetMemberTasksByTaskIdMemberTasksTeamMember teamMember; + GetMemberTasksByTaskIdMemberTasks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + task = GetMemberTasksByTaskIdMemberTasksTask.fromJson(json['task']), + teamMember = GetMemberTasksByTaskIdMemberTasksTeamMember.fromJson(json['teamMember']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTasksByTaskIdMemberTasks otherTyped = other as GetMemberTasksByTaskIdMemberTasks; + return id == otherTyped.id && + task == otherTyped.task && + teamMember == otherTyped.teamMember; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, task.hashCode, teamMember.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['task'] = task.toJson(); + json['teamMember'] = teamMember.toJson(); + return json; + } + + GetMemberTasksByTaskIdMemberTasks({ + required this.id, + required this.task, + required this.teamMember, + }); +} + +@immutable +class GetMemberTasksByTaskIdMemberTasksTask { + final String id; + final String taskName; + final String? description; + final EnumValue status; + final Timestamp? dueDate; + final int? progress; + final EnumValue priority; + GetMemberTasksByTaskIdMemberTasksTask.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskName = nativeFromJson(json['taskName']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = taskStatusDeserializer(json['status']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + progress = json['progress'] == null ? null : nativeFromJson(json['progress']), + priority = taskPriorityDeserializer(json['priority']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTasksByTaskIdMemberTasksTask otherTyped = other as GetMemberTasksByTaskIdMemberTasksTask; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + priority == otherTyped.priority; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, priority.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskName'] = nativeToJson(taskName); + if (description != null) { + json['description'] = nativeToJson(description); + } + json['status'] = + taskStatusSerializer(status) + ; + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (progress != null) { + json['progress'] = nativeToJson(progress); + } + json['priority'] = + taskPrioritySerializer(priority) + ; + return json; + } + + GetMemberTasksByTaskIdMemberTasksTask({ + required this.id, + required this.taskName, + this.description, + required this.status, + this.dueDate, + this.progress, + required this.priority, + }); +} + +@immutable +class GetMemberTasksByTaskIdMemberTasksTeamMember { + final GetMemberTasksByTaskIdMemberTasksTeamMemberUser user; + GetMemberTasksByTaskIdMemberTasksTeamMember.fromJson(dynamic json): + + user = GetMemberTasksByTaskIdMemberTasksTeamMemberUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTasksByTaskIdMemberTasksTeamMember otherTyped = other as GetMemberTasksByTaskIdMemberTasksTeamMember; + return user == otherTyped.user; + + } + @override + int get hashCode => user.hashCode; + + + Map toJson() { + Map json = {}; + json['user'] = user.toJson(); + return json; + } + + GetMemberTasksByTaskIdMemberTasksTeamMember({ + required this.user, + }); +} + +@immutable +class GetMemberTasksByTaskIdMemberTasksTeamMemberUser { + final String? fullName; + final String? email; + GetMemberTasksByTaskIdMemberTasksTeamMemberUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTasksByTaskIdMemberTasksTeamMemberUser otherTyped = other as GetMemberTasksByTaskIdMemberTasksTeamMemberUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetMemberTasksByTaskIdMemberTasksTeamMemberUser({ + this.fullName, + this.email, + }); +} + +@immutable +class GetMemberTasksByTaskIdData { + final List memberTasks; + GetMemberTasksByTaskIdData.fromJson(dynamic json): + + memberTasks = (json['memberTasks'] as List) + .map((e) => GetMemberTasksByTaskIdMemberTasks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTasksByTaskIdData otherTyped = other as GetMemberTasksByTaskIdData; + return memberTasks == otherTyped.memberTasks; + + } + @override + int get hashCode => memberTasks.hashCode; + + + Map toJson() { + Map json = {}; + json['memberTasks'] = memberTasks.map((e) => e.toJson()).toList(); + return json; + } + + GetMemberTasksByTaskIdData({ + required this.memberTasks, + }); +} + +@immutable +class GetMemberTasksByTaskIdVariables { + final String taskId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetMemberTasksByTaskIdVariables.fromJson(Map json): + + taskId = nativeFromJson(json['taskId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMemberTasksByTaskIdVariables otherTyped = other as GetMemberTasksByTaskIdVariables; + return taskId == otherTyped.taskId; + + } + @override + int get hashCode => taskId.hashCode; + + + Map toJson() { + Map json = {}; + json['taskId'] = nativeToJson(taskId); + return json; + } + + GetMemberTasksByTaskIdVariables({ + required this.taskId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_message_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_message_by_id.dart new file mode 100644 index 00000000..24068c4e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_message_by_id.dart @@ -0,0 +1,194 @@ +part of 'generated.dart'; + +class GetMessageByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetMessageByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetMessageByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetMessageByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetMessageByIdVariables vars= GetMessageByIdVariables(id: id,); + return _dataConnect.query("getMessageById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetMessageByIdMessage { + final String id; + final String conversationId; + final String senderId; + final String content; + final bool? isSystem; + final Timestamp? createdAt; + final GetMessageByIdMessageUser user; + GetMessageByIdMessage.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + senderId = nativeFromJson(json['senderId']), + content = nativeFromJson(json['content']), + isSystem = json['isSystem'] == null ? null : nativeFromJson(json['isSystem']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + user = GetMessageByIdMessageUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessageByIdMessage otherTyped = other as GetMessageByIdMessage; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + senderId == otherTyped.senderId && + content == otherTyped.content && + isSystem == otherTyped.isSystem && + createdAt == otherTyped.createdAt && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, senderId.hashCode, content.hashCode, isSystem.hashCode, createdAt.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['senderId'] = nativeToJson(senderId); + json['content'] = nativeToJson(content); + if (isSystem != null) { + json['isSystem'] = nativeToJson(isSystem); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['user'] = user.toJson(); + return json; + } + + GetMessageByIdMessage({ + required this.id, + required this.conversationId, + required this.senderId, + required this.content, + this.isSystem, + this.createdAt, + required this.user, + }); +} + +@immutable +class GetMessageByIdMessageUser { + final String? fullName; + GetMessageByIdMessageUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessageByIdMessageUser otherTyped = other as GetMessageByIdMessageUser; + return fullName == otherTyped.fullName; + + } + @override + int get hashCode => fullName.hashCode; + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + return json; + } + + GetMessageByIdMessageUser({ + this.fullName, + }); +} + +@immutable +class GetMessageByIdData { + final GetMessageByIdMessage? message; + GetMessageByIdData.fromJson(dynamic json): + + message = json['message'] == null ? null : GetMessageByIdMessage.fromJson(json['message']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessageByIdData otherTyped = other as GetMessageByIdData; + return message == otherTyped.message; + + } + @override + int get hashCode => message.hashCode; + + + Map toJson() { + Map json = {}; + if (message != null) { + json['message'] = message!.toJson(); + } + return json; + } + + GetMessageByIdData({ + this.message, + }); +} + +@immutable +class GetMessageByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetMessageByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessageByIdVariables otherTyped = other as GetMessageByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetMessageByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_messages_by_conversation_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_messages_by_conversation_id.dart new file mode 100644 index 00000000..bb5dfd86 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_messages_by_conversation_id.dart @@ -0,0 +1,194 @@ +part of 'generated.dart'; + +class GetMessagesByConversationIdVariablesBuilder { + String conversationId; + + final FirebaseDataConnect _dataConnect; + GetMessagesByConversationIdVariablesBuilder(this._dataConnect, {required this.conversationId,}); + Deserializer dataDeserializer = (dynamic json) => GetMessagesByConversationIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetMessagesByConversationIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetMessagesByConversationIdVariables vars= GetMessagesByConversationIdVariables(conversationId: conversationId,); + return _dataConnect.query("getMessagesByConversationId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetMessagesByConversationIdMessages { + final String id; + final String conversationId; + final String senderId; + final String content; + final bool? isSystem; + final Timestamp? createdAt; + final GetMessagesByConversationIdMessagesUser user; + GetMessagesByConversationIdMessages.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + senderId = nativeFromJson(json['senderId']), + content = nativeFromJson(json['content']), + isSystem = json['isSystem'] == null ? null : nativeFromJson(json['isSystem']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + user = GetMessagesByConversationIdMessagesUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessagesByConversationIdMessages otherTyped = other as GetMessagesByConversationIdMessages; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + senderId == otherTyped.senderId && + content == otherTyped.content && + isSystem == otherTyped.isSystem && + createdAt == otherTyped.createdAt && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, senderId.hashCode, content.hashCode, isSystem.hashCode, createdAt.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['senderId'] = nativeToJson(senderId); + json['content'] = nativeToJson(content); + if (isSystem != null) { + json['isSystem'] = nativeToJson(isSystem); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['user'] = user.toJson(); + return json; + } + + GetMessagesByConversationIdMessages({ + required this.id, + required this.conversationId, + required this.senderId, + required this.content, + this.isSystem, + this.createdAt, + required this.user, + }); +} + +@immutable +class GetMessagesByConversationIdMessagesUser { + final String? fullName; + GetMessagesByConversationIdMessagesUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessagesByConversationIdMessagesUser otherTyped = other as GetMessagesByConversationIdMessagesUser; + return fullName == otherTyped.fullName; + + } + @override + int get hashCode => fullName.hashCode; + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + return json; + } + + GetMessagesByConversationIdMessagesUser({ + this.fullName, + }); +} + +@immutable +class GetMessagesByConversationIdData { + final List messages; + GetMessagesByConversationIdData.fromJson(dynamic json): + + messages = (json['messages'] as List) + .map((e) => GetMessagesByConversationIdMessages.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessagesByConversationIdData otherTyped = other as GetMessagesByConversationIdData; + return messages == otherTyped.messages; + + } + @override + int get hashCode => messages.hashCode; + + + Map toJson() { + Map json = {}; + json['messages'] = messages.map((e) => e.toJson()).toList(); + return json; + } + + GetMessagesByConversationIdData({ + required this.messages, + }); +} + +@immutable +class GetMessagesByConversationIdVariables { + final String conversationId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetMessagesByConversationIdVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMessagesByConversationIdVariables otherTyped = other as GetMessagesByConversationIdVariables; + return conversationId == otherTyped.conversationId; + + } + @override + int get hashCode => conversationId.hashCode; + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + return json; + } + + GetMessagesByConversationIdVariables({ + required this.conversationId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_my_tasks.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_my_tasks.dart new file mode 100644 index 00000000..34101380 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_my_tasks.dart @@ -0,0 +1,285 @@ +part of 'generated.dart'; + +class GetMyTasksVariablesBuilder { + String teamMemberId; + + final FirebaseDataConnect _dataConnect; + GetMyTasksVariablesBuilder(this._dataConnect, {required this.teamMemberId,}); + Deserializer dataDeserializer = (dynamic json) => GetMyTasksData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetMyTasksVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetMyTasksVariables vars= GetMyTasksVariables(teamMemberId: teamMemberId,); + return _dataConnect.query("getMyTasks", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetMyTasksMemberTasks { + final String id; + final GetMyTasksMemberTasksTask task; + final GetMyTasksMemberTasksTeamMember teamMember; + GetMyTasksMemberTasks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + task = GetMyTasksMemberTasksTask.fromJson(json['task']), + teamMember = GetMyTasksMemberTasksTeamMember.fromJson(json['teamMember']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMyTasksMemberTasks otherTyped = other as GetMyTasksMemberTasks; + return id == otherTyped.id && + task == otherTyped.task && + teamMember == otherTyped.teamMember; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, task.hashCode, teamMember.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['task'] = task.toJson(); + json['teamMember'] = teamMember.toJson(); + return json; + } + + GetMyTasksMemberTasks({ + required this.id, + required this.task, + required this.teamMember, + }); +} + +@immutable +class GetMyTasksMemberTasksTask { + final String id; + final String taskName; + final String? description; + final EnumValue status; + final Timestamp? dueDate; + final int? progress; + final EnumValue priority; + GetMyTasksMemberTasksTask.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskName = nativeFromJson(json['taskName']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = taskStatusDeserializer(json['status']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + progress = json['progress'] == null ? null : nativeFromJson(json['progress']), + priority = taskPriorityDeserializer(json['priority']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMyTasksMemberTasksTask otherTyped = other as GetMyTasksMemberTasksTask; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + priority == otherTyped.priority; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, priority.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskName'] = nativeToJson(taskName); + if (description != null) { + json['description'] = nativeToJson(description); + } + json['status'] = + taskStatusSerializer(status) + ; + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (progress != null) { + json['progress'] = nativeToJson(progress); + } + json['priority'] = + taskPrioritySerializer(priority) + ; + return json; + } + + GetMyTasksMemberTasksTask({ + required this.id, + required this.taskName, + this.description, + required this.status, + this.dueDate, + this.progress, + required this.priority, + }); +} + +@immutable +class GetMyTasksMemberTasksTeamMember { + final GetMyTasksMemberTasksTeamMemberUser user; + GetMyTasksMemberTasksTeamMember.fromJson(dynamic json): + + user = GetMyTasksMemberTasksTeamMemberUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMyTasksMemberTasksTeamMember otherTyped = other as GetMyTasksMemberTasksTeamMember; + return user == otherTyped.user; + + } + @override + int get hashCode => user.hashCode; + + + Map toJson() { + Map json = {}; + json['user'] = user.toJson(); + return json; + } + + GetMyTasksMemberTasksTeamMember({ + required this.user, + }); +} + +@immutable +class GetMyTasksMemberTasksTeamMemberUser { + final String? fullName; + final String? email; + GetMyTasksMemberTasksTeamMemberUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMyTasksMemberTasksTeamMemberUser otherTyped = other as GetMyTasksMemberTasksTeamMemberUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetMyTasksMemberTasksTeamMemberUser({ + this.fullName, + this.email, + }); +} + +@immutable +class GetMyTasksData { + final List memberTasks; + GetMyTasksData.fromJson(dynamic json): + + memberTasks = (json['memberTasks'] as List) + .map((e) => GetMyTasksMemberTasks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMyTasksData otherTyped = other as GetMyTasksData; + return memberTasks == otherTyped.memberTasks; + + } + @override + int get hashCode => memberTasks.hashCode; + + + Map toJson() { + Map json = {}; + json['memberTasks'] = memberTasks.map((e) => e.toJson()).toList(); + return json; + } + + GetMyTasksData({ + required this.memberTasks, + }); +} + +@immutable +class GetMyTasksVariables { + final String teamMemberId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetMyTasksVariables.fromJson(Map json): + + teamMemberId = nativeFromJson(json['teamMemberId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetMyTasksVariables otherTyped = other as GetMyTasksVariables; + return teamMemberId == otherTyped.teamMemberId; + + } + @override + int get hashCode => teamMemberId.hashCode; + + + Map toJson() { + Map json = {}; + json['teamMemberId'] = nativeToJson(teamMemberId); + return json; + } + + GetMyTasksVariables({ + required this.teamMemberId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_order_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_order_by_id.dart new file mode 100644 index 00000000..23f58273 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_order_by_id.dart @@ -0,0 +1,378 @@ +part of 'generated.dart'; + +class GetOrderByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetOrderByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetOrderByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetOrderByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetOrderByIdVariables vars= GetOrderByIdVariables(id: id,); + return _dataConnect.query("getOrderById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetOrderByIdOrder { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final String? location; + final EnumValue status; + final Timestamp? date; + final Timestamp? startDate; + final Timestamp? endDate; + final EnumValue? duration; + final int? lunchBreak; + final double? total; + final AnyValue? assignedStaff; + final AnyValue? shifts; + final int? requested; + final String? hub; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? poReference; + final AnyValue? detectedConflicts; + final String? notes; + final Timestamp? createdAt; + final GetOrderByIdOrderBusiness business; + final GetOrderByIdOrderVendor vendor; + GetOrderByIdOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), + endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']), + duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']), + lunchBreak = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), + shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), + requested = json['requested'] == null ? null : nativeFromJson(json['requested']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']), + detectedConflicts = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = GetOrderByIdOrderBusiness.fromJson(json['business']), + vendor = GetOrderByIdOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrderByIdOrder otherTyped = other as GetOrderByIdOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + poReference == otherTyped.poReference && + detectedConflicts == otherTyped.detectedConflicts && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + if (location != null) { + json['location'] = nativeToJson(location); + } + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (startDate != null) { + json['startDate'] = startDate!.toJson(); + } + if (endDate != null) { + json['endDate'] = endDate!.toJson(); + } + if (duration != null) { + json['duration'] = + orderDurationSerializer(duration!) + ; + } + if (lunchBreak != null) { + json['lunchBreak'] = nativeToJson(lunchBreak); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (assignedStaff != null) { + json['assignedStaff'] = assignedStaff!.toJson(); + } + if (shifts != null) { + json['shifts'] = shifts!.toJson(); + } + if (requested != null) { + json['requested'] = nativeToJson(requested); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + if (detectedConflicts != null) { + json['detectedConflicts'] = detectedConflicts!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetOrderByIdOrder({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + this.location, + required this.status, + this.date, + this.startDate, + this.endDate, + this.duration, + this.lunchBreak, + this.total, + this.assignedStaff, + this.shifts, + this.requested, + this.hub, + this.recurringDays, + this.permanentDays, + this.poReference, + this.detectedConflicts, + this.notes, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetOrderByIdOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetOrderByIdOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrderByIdOrderBusiness otherTyped = other as GetOrderByIdOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetOrderByIdOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetOrderByIdOrderVendor { + final String id; + final String companyName; + GetOrderByIdOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrderByIdOrderVendor otherTyped = other as GetOrderByIdOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetOrderByIdOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetOrderByIdData { + final GetOrderByIdOrder? order; + GetOrderByIdData.fromJson(dynamic json): + + order = json['order'] == null ? null : GetOrderByIdOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrderByIdData otherTyped = other as GetOrderByIdData; + return order == otherTyped.order; + + } + @override + int get hashCode => order.hashCode; + + + Map toJson() { + Map json = {}; + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + GetOrderByIdData({ + this.order, + }); +} + +@immutable +class GetOrderByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetOrderByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrderByIdVariables otherTyped = other as GetOrderByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetOrderByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_business_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_business_id.dart new file mode 100644 index 00000000..0cdafd87 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_business_id.dart @@ -0,0 +1,411 @@ +part of 'generated.dart'; + +class GetOrdersByBusinessIdVariablesBuilder { + String businessId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetOrdersByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetOrdersByBusinessIdVariablesBuilder(this._dataConnect, {required this.businessId,}); + Deserializer dataDeserializer = (dynamic json) => GetOrdersByBusinessIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetOrdersByBusinessIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetOrdersByBusinessIdVariables vars= GetOrdersByBusinessIdVariables(businessId: businessId,offset: _offset,limit: _limit,); + return _dataConnect.query("getOrdersByBusinessId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetOrdersByBusinessIdOrders { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final String? location; + final EnumValue status; + final Timestamp? date; + final Timestamp? startDate; + final Timestamp? endDate; + final EnumValue? duration; + final int? lunchBreak; + final double? total; + final AnyValue? assignedStaff; + final AnyValue? shifts; + final int? requested; + final String? hub; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? poReference; + final AnyValue? detectedConflicts; + final String? notes; + final Timestamp? createdAt; + final GetOrdersByBusinessIdOrdersBusiness business; + final GetOrdersByBusinessIdOrdersVendor vendor; + GetOrdersByBusinessIdOrders.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), + endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']), + duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']), + lunchBreak = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), + shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), + requested = json['requested'] == null ? null : nativeFromJson(json['requested']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']), + detectedConflicts = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = GetOrdersByBusinessIdOrdersBusiness.fromJson(json['business']), + vendor = GetOrdersByBusinessIdOrdersVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByBusinessIdOrders otherTyped = other as GetOrdersByBusinessIdOrders; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + poReference == otherTyped.poReference && + detectedConflicts == otherTyped.detectedConflicts && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + if (location != null) { + json['location'] = nativeToJson(location); + } + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (startDate != null) { + json['startDate'] = startDate!.toJson(); + } + if (endDate != null) { + json['endDate'] = endDate!.toJson(); + } + if (duration != null) { + json['duration'] = + orderDurationSerializer(duration!) + ; + } + if (lunchBreak != null) { + json['lunchBreak'] = nativeToJson(lunchBreak); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (assignedStaff != null) { + json['assignedStaff'] = assignedStaff!.toJson(); + } + if (shifts != null) { + json['shifts'] = shifts!.toJson(); + } + if (requested != null) { + json['requested'] = nativeToJson(requested); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + if (detectedConflicts != null) { + json['detectedConflicts'] = detectedConflicts!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetOrdersByBusinessIdOrders({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + this.location, + required this.status, + this.date, + this.startDate, + this.endDate, + this.duration, + this.lunchBreak, + this.total, + this.assignedStaff, + this.shifts, + this.requested, + this.hub, + this.recurringDays, + this.permanentDays, + this.poReference, + this.detectedConflicts, + this.notes, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetOrdersByBusinessIdOrdersBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetOrdersByBusinessIdOrdersBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByBusinessIdOrdersBusiness otherTyped = other as GetOrdersByBusinessIdOrdersBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetOrdersByBusinessIdOrdersBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetOrdersByBusinessIdOrdersVendor { + final String id; + final String companyName; + GetOrdersByBusinessIdOrdersVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByBusinessIdOrdersVendor otherTyped = other as GetOrdersByBusinessIdOrdersVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetOrdersByBusinessIdOrdersVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetOrdersByBusinessIdData { + final List orders; + GetOrdersByBusinessIdData.fromJson(dynamic json): + + orders = (json['orders'] as List) + .map((e) => GetOrdersByBusinessIdOrders.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByBusinessIdData otherTyped = other as GetOrdersByBusinessIdData; + return orders == otherTyped.orders; + + } + @override + int get hashCode => orders.hashCode; + + + Map toJson() { + Map json = {}; + json['orders'] = orders.map((e) => e.toJson()).toList(); + return json; + } + + GetOrdersByBusinessIdData({ + required this.orders, + }); +} + +@immutable +class GetOrdersByBusinessIdVariables { + final String businessId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetOrdersByBusinessIdVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByBusinessIdVariables otherTyped = other as GetOrdersByBusinessIdVariables; + return businessId == otherTyped.businessId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetOrdersByBusinessIdVariables({ + required this.businessId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_date_range.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_date_range.dart new file mode 100644 index 00000000..8c793f4a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_date_range.dart @@ -0,0 +1,418 @@ +part of 'generated.dart'; + +class GetOrdersByDateRangeVariablesBuilder { + Timestamp start; + Timestamp end; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetOrdersByDateRangeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByDateRangeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetOrdersByDateRangeVariablesBuilder(this._dataConnect, {required this.start,required this.end,}); + Deserializer dataDeserializer = (dynamic json) => GetOrdersByDateRangeData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetOrdersByDateRangeVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetOrdersByDateRangeVariables vars= GetOrdersByDateRangeVariables(start: start,end: end,offset: _offset,limit: _limit,); + return _dataConnect.query("getOrdersByDateRange", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetOrdersByDateRangeOrders { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final String? location; + final EnumValue status; + final Timestamp? date; + final Timestamp? startDate; + final Timestamp? endDate; + final EnumValue? duration; + final int? lunchBreak; + final double? total; + final AnyValue? assignedStaff; + final AnyValue? shifts; + final int? requested; + final String? hub; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? poReference; + final AnyValue? detectedConflicts; + final String? notes; + final Timestamp? createdAt; + final GetOrdersByDateRangeOrdersBusiness business; + final GetOrdersByDateRangeOrdersVendor vendor; + GetOrdersByDateRangeOrders.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), + endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']), + duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']), + lunchBreak = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), + shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), + requested = json['requested'] == null ? null : nativeFromJson(json['requested']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']), + detectedConflicts = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = GetOrdersByDateRangeOrdersBusiness.fromJson(json['business']), + vendor = GetOrdersByDateRangeOrdersVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByDateRangeOrders otherTyped = other as GetOrdersByDateRangeOrders; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + poReference == otherTyped.poReference && + detectedConflicts == otherTyped.detectedConflicts && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + if (location != null) { + json['location'] = nativeToJson(location); + } + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (startDate != null) { + json['startDate'] = startDate!.toJson(); + } + if (endDate != null) { + json['endDate'] = endDate!.toJson(); + } + if (duration != null) { + json['duration'] = + orderDurationSerializer(duration!) + ; + } + if (lunchBreak != null) { + json['lunchBreak'] = nativeToJson(lunchBreak); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (assignedStaff != null) { + json['assignedStaff'] = assignedStaff!.toJson(); + } + if (shifts != null) { + json['shifts'] = shifts!.toJson(); + } + if (requested != null) { + json['requested'] = nativeToJson(requested); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + if (detectedConflicts != null) { + json['detectedConflicts'] = detectedConflicts!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetOrdersByDateRangeOrders({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + this.location, + required this.status, + this.date, + this.startDate, + this.endDate, + this.duration, + this.lunchBreak, + this.total, + this.assignedStaff, + this.shifts, + this.requested, + this.hub, + this.recurringDays, + this.permanentDays, + this.poReference, + this.detectedConflicts, + this.notes, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetOrdersByDateRangeOrdersBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetOrdersByDateRangeOrdersBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByDateRangeOrdersBusiness otherTyped = other as GetOrdersByDateRangeOrdersBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetOrdersByDateRangeOrdersBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetOrdersByDateRangeOrdersVendor { + final String id; + final String companyName; + GetOrdersByDateRangeOrdersVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByDateRangeOrdersVendor otherTyped = other as GetOrdersByDateRangeOrdersVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetOrdersByDateRangeOrdersVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetOrdersByDateRangeData { + final List orders; + GetOrdersByDateRangeData.fromJson(dynamic json): + + orders = (json['orders'] as List) + .map((e) => GetOrdersByDateRangeOrders.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByDateRangeData otherTyped = other as GetOrdersByDateRangeData; + return orders == otherTyped.orders; + + } + @override + int get hashCode => orders.hashCode; + + + Map toJson() { + Map json = {}; + json['orders'] = orders.map((e) => e.toJson()).toList(); + return json; + } + + GetOrdersByDateRangeData({ + required this.orders, + }); +} + +@immutable +class GetOrdersByDateRangeVariables { + final Timestamp start; + final Timestamp end; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetOrdersByDateRangeVariables.fromJson(Map json): + + start = Timestamp.fromJson(json['start']), + end = Timestamp.fromJson(json['end']) { + + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByDateRangeVariables otherTyped = other as GetOrdersByDateRangeVariables; + return start == otherTyped.start && + end == otherTyped.end && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([start.hashCode, end.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['start'] = start.toJson(); + json['end'] = end.toJson(); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetOrdersByDateRangeVariables({ + required this.start, + required this.end, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_status.dart new file mode 100644 index 00000000..334f3e8d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_status.dart @@ -0,0 +1,413 @@ +part of 'generated.dart'; + +class GetOrdersByStatusVariablesBuilder { + OrderStatus status; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetOrdersByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetOrdersByStatusVariablesBuilder(this._dataConnect, {required this.status,}); + Deserializer dataDeserializer = (dynamic json) => GetOrdersByStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetOrdersByStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetOrdersByStatusVariables vars= GetOrdersByStatusVariables(status: status,offset: _offset,limit: _limit,); + return _dataConnect.query("getOrdersByStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetOrdersByStatusOrders { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final String? location; + final EnumValue status; + final Timestamp? date; + final Timestamp? startDate; + final Timestamp? endDate; + final EnumValue? duration; + final int? lunchBreak; + final double? total; + final AnyValue? assignedStaff; + final AnyValue? shifts; + final int? requested; + final String? hub; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? poReference; + final AnyValue? detectedConflicts; + final String? notes; + final Timestamp? createdAt; + final GetOrdersByStatusOrdersBusiness business; + final GetOrdersByStatusOrdersVendor vendor; + GetOrdersByStatusOrders.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), + endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']), + duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']), + lunchBreak = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), + shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), + requested = json['requested'] == null ? null : nativeFromJson(json['requested']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']), + detectedConflicts = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = GetOrdersByStatusOrdersBusiness.fromJson(json['business']), + vendor = GetOrdersByStatusOrdersVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByStatusOrders otherTyped = other as GetOrdersByStatusOrders; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + poReference == otherTyped.poReference && + detectedConflicts == otherTyped.detectedConflicts && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + if (location != null) { + json['location'] = nativeToJson(location); + } + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (startDate != null) { + json['startDate'] = startDate!.toJson(); + } + if (endDate != null) { + json['endDate'] = endDate!.toJson(); + } + if (duration != null) { + json['duration'] = + orderDurationSerializer(duration!) + ; + } + if (lunchBreak != null) { + json['lunchBreak'] = nativeToJson(lunchBreak); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (assignedStaff != null) { + json['assignedStaff'] = assignedStaff!.toJson(); + } + if (shifts != null) { + json['shifts'] = shifts!.toJson(); + } + if (requested != null) { + json['requested'] = nativeToJson(requested); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + if (detectedConflicts != null) { + json['detectedConflicts'] = detectedConflicts!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetOrdersByStatusOrders({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + this.location, + required this.status, + this.date, + this.startDate, + this.endDate, + this.duration, + this.lunchBreak, + this.total, + this.assignedStaff, + this.shifts, + this.requested, + this.hub, + this.recurringDays, + this.permanentDays, + this.poReference, + this.detectedConflicts, + this.notes, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetOrdersByStatusOrdersBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetOrdersByStatusOrdersBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByStatusOrdersBusiness otherTyped = other as GetOrdersByStatusOrdersBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetOrdersByStatusOrdersBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetOrdersByStatusOrdersVendor { + final String id; + final String companyName; + GetOrdersByStatusOrdersVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByStatusOrdersVendor otherTyped = other as GetOrdersByStatusOrdersVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetOrdersByStatusOrdersVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetOrdersByStatusData { + final List orders; + GetOrdersByStatusData.fromJson(dynamic json): + + orders = (json['orders'] as List) + .map((e) => GetOrdersByStatusOrders.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByStatusData otherTyped = other as GetOrdersByStatusData; + return orders == otherTyped.orders; + + } + @override + int get hashCode => orders.hashCode; + + + Map toJson() { + Map json = {}; + json['orders'] = orders.map((e) => e.toJson()).toList(); + return json; + } + + GetOrdersByStatusData({ + required this.orders, + }); +} + +@immutable +class GetOrdersByStatusVariables { + final OrderStatus status; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetOrdersByStatusVariables.fromJson(Map json): + + status = OrderStatus.values.byName(json['status']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByStatusVariables otherTyped = other as GetOrdersByStatusVariables; + return status == otherTyped.status && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + status.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetOrdersByStatusVariables({ + required this.status, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_vendor_id.dart new file mode 100644 index 00000000..467e766c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_orders_by_vendor_id.dart @@ -0,0 +1,411 @@ +part of 'generated.dart'; + +class GetOrdersByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetOrdersByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetOrdersByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetOrdersByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => GetOrdersByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetOrdersByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetOrdersByVendorIdVariables vars= GetOrdersByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("getOrdersByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetOrdersByVendorIdOrders { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final String? location; + final EnumValue status; + final Timestamp? date; + final Timestamp? startDate; + final Timestamp? endDate; + final EnumValue? duration; + final int? lunchBreak; + final double? total; + final AnyValue? assignedStaff; + final AnyValue? shifts; + final int? requested; + final String? hub; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? poReference; + final AnyValue? detectedConflicts; + final String? notes; + final Timestamp? createdAt; + final GetOrdersByVendorIdOrdersBusiness business; + final GetOrdersByVendorIdOrdersVendor vendor; + GetOrdersByVendorIdOrders.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), + endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']), + duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']), + lunchBreak = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), + shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), + requested = json['requested'] == null ? null : nativeFromJson(json['requested']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']), + detectedConflicts = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = GetOrdersByVendorIdOrdersBusiness.fromJson(json['business']), + vendor = GetOrdersByVendorIdOrdersVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByVendorIdOrders otherTyped = other as GetOrdersByVendorIdOrders; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + poReference == otherTyped.poReference && + detectedConflicts == otherTyped.detectedConflicts && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + if (location != null) { + json['location'] = nativeToJson(location); + } + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (startDate != null) { + json['startDate'] = startDate!.toJson(); + } + if (endDate != null) { + json['endDate'] = endDate!.toJson(); + } + if (duration != null) { + json['duration'] = + orderDurationSerializer(duration!) + ; + } + if (lunchBreak != null) { + json['lunchBreak'] = nativeToJson(lunchBreak); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (assignedStaff != null) { + json['assignedStaff'] = assignedStaff!.toJson(); + } + if (shifts != null) { + json['shifts'] = shifts!.toJson(); + } + if (requested != null) { + json['requested'] = nativeToJson(requested); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + if (detectedConflicts != null) { + json['detectedConflicts'] = detectedConflicts!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetOrdersByVendorIdOrders({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + this.location, + required this.status, + this.date, + this.startDate, + this.endDate, + this.duration, + this.lunchBreak, + this.total, + this.assignedStaff, + this.shifts, + this.requested, + this.hub, + this.recurringDays, + this.permanentDays, + this.poReference, + this.detectedConflicts, + this.notes, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetOrdersByVendorIdOrdersBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetOrdersByVendorIdOrdersBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByVendorIdOrdersBusiness otherTyped = other as GetOrdersByVendorIdOrdersBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetOrdersByVendorIdOrdersBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetOrdersByVendorIdOrdersVendor { + final String id; + final String companyName; + GetOrdersByVendorIdOrdersVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByVendorIdOrdersVendor otherTyped = other as GetOrdersByVendorIdOrdersVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetOrdersByVendorIdOrdersVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetOrdersByVendorIdData { + final List orders; + GetOrdersByVendorIdData.fromJson(dynamic json): + + orders = (json['orders'] as List) + .map((e) => GetOrdersByVendorIdOrders.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByVendorIdData otherTyped = other as GetOrdersByVendorIdData; + return orders == otherTyped.orders; + + } + @override + int get hashCode => orders.hashCode; + + + Map toJson() { + Map json = {}; + json['orders'] = orders.map((e) => e.toJson()).toList(); + return json; + } + + GetOrdersByVendorIdData({ + required this.orders, + }); +} + +@immutable +class GetOrdersByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetOrdersByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetOrdersByVendorIdVariables otherTyped = other as GetOrdersByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetOrdersByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_rapid_orders.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_rapid_orders.dart new file mode 100644 index 00000000..17f82e84 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_rapid_orders.dart @@ -0,0 +1,404 @@ +part of 'generated.dart'; + +class GetRapidOrdersVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + GetRapidOrdersVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetRapidOrdersVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetRapidOrdersVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => GetRapidOrdersData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetRapidOrdersVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetRapidOrdersVariables vars= GetRapidOrdersVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("getRapidOrders", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetRapidOrdersOrders { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final String? location; + final EnumValue status; + final Timestamp? date; + final Timestamp? startDate; + final Timestamp? endDate; + final EnumValue? duration; + final int? lunchBreak; + final double? total; + final AnyValue? assignedStaff; + final AnyValue? shifts; + final int? requested; + final String? hub; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? poReference; + final AnyValue? detectedConflicts; + final String? notes; + final Timestamp? createdAt; + final GetRapidOrdersOrdersBusiness business; + final GetRapidOrdersOrdersVendor vendor; + GetRapidOrdersOrders.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), + endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']), + duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']), + lunchBreak = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), + shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), + requested = json['requested'] == null ? null : nativeFromJson(json['requested']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']), + detectedConflicts = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = GetRapidOrdersOrdersBusiness.fromJson(json['business']), + vendor = GetRapidOrdersOrdersVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRapidOrdersOrders otherTyped = other as GetRapidOrdersOrders; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + poReference == otherTyped.poReference && + detectedConflicts == otherTyped.detectedConflicts && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + if (location != null) { + json['location'] = nativeToJson(location); + } + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (startDate != null) { + json['startDate'] = startDate!.toJson(); + } + if (endDate != null) { + json['endDate'] = endDate!.toJson(); + } + if (duration != null) { + json['duration'] = + orderDurationSerializer(duration!) + ; + } + if (lunchBreak != null) { + json['lunchBreak'] = nativeToJson(lunchBreak); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (assignedStaff != null) { + json['assignedStaff'] = assignedStaff!.toJson(); + } + if (shifts != null) { + json['shifts'] = shifts!.toJson(); + } + if (requested != null) { + json['requested'] = nativeToJson(requested); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + if (detectedConflicts != null) { + json['detectedConflicts'] = detectedConflicts!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetRapidOrdersOrders({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + this.location, + required this.status, + this.date, + this.startDate, + this.endDate, + this.duration, + this.lunchBreak, + this.total, + this.assignedStaff, + this.shifts, + this.requested, + this.hub, + this.recurringDays, + this.permanentDays, + this.poReference, + this.detectedConflicts, + this.notes, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetRapidOrdersOrdersBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetRapidOrdersOrdersBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRapidOrdersOrdersBusiness otherTyped = other as GetRapidOrdersOrdersBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetRapidOrdersOrdersBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetRapidOrdersOrdersVendor { + final String id; + final String companyName; + GetRapidOrdersOrdersVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRapidOrdersOrdersVendor otherTyped = other as GetRapidOrdersOrdersVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetRapidOrdersOrdersVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetRapidOrdersData { + final List orders; + GetRapidOrdersData.fromJson(dynamic json): + + orders = (json['orders'] as List) + .map((e) => GetRapidOrdersOrders.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRapidOrdersData otherTyped = other as GetRapidOrdersData; + return orders == otherTyped.orders; + + } + @override + int get hashCode => orders.hashCode; + + + Map toJson() { + Map json = {}; + json['orders'] = orders.map((e) => e.toJson()).toList(); + return json; + } + + GetRapidOrdersData({ + required this.orders, + }); +} + +@immutable +class GetRapidOrdersVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetRapidOrdersVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRapidOrdersVariables otherTyped = other as GetRapidOrdersVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetRapidOrdersVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_recent_payment_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_recent_payment_by_id.dart new file mode 100644 index 00000000..11ef4fd3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_recent_payment_by_id.dart @@ -0,0 +1,582 @@ +part of 'generated.dart'; + +class GetRecentPaymentByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetRecentPaymentByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetRecentPaymentByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetRecentPaymentByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetRecentPaymentByIdVariables vars= GetRecentPaymentByIdVariables(id: id,); + return _dataConnect.query("getRecentPaymentById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetRecentPaymentByIdRecentPayment { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetRecentPaymentByIdRecentPaymentApplication application; + final GetRecentPaymentByIdRecentPaymentInvoice invoice; + GetRecentPaymentByIdRecentPayment.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = GetRecentPaymentByIdRecentPaymentApplication.fromJson(json['application']), + invoice = GetRecentPaymentByIdRecentPaymentInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPayment otherTyped = other as GetRecentPaymentByIdRecentPayment; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + GetRecentPaymentByIdRecentPayment({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentApplication { + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final GetRecentPaymentByIdRecentPaymentApplicationShiftRole shiftRole; + GetRecentPaymentByIdRecentPaymentApplication.fromJson(dynamic json): + + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + shiftRole = GetRecentPaymentByIdRecentPaymentApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentApplication otherTyped = other as GetRecentPaymentByIdRecentPaymentApplication; + return checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([checkInTime.hashCode, checkOutTime.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + GetRecentPaymentByIdRecentPaymentApplication({ + this.checkInTime, + this.checkOutTime, + required this.shiftRole, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentApplicationShiftRole { + final double? hours; + final double? totalValue; + final Timestamp? startTime; + final Timestamp? endTime; + final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole role; + final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift shift; + GetRecentPaymentByIdRecentPaymentApplicationShiftRole.fromJson(dynamic json): + + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + role = GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole.fromJson(json['role']), + shift = GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentApplicationShiftRole otherTyped = other as GetRecentPaymentByIdRecentPaymentApplicationShiftRole; + return hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([hours.hashCode, totalValue.hashCode, startTime.hashCode, endTime.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + GetRecentPaymentByIdRecentPaymentApplicationShiftRole({ + this.hours, + this.totalValue, + this.startTime, + this.endTime, + required this.role, + required this.shift, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole { + final String name; + final double costPerHour; + GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole.fromJson(dynamic json): + + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole otherTyped = other as GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole; + return name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetRecentPaymentByIdRecentPaymentApplicationShiftRoleRole({ + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift { + final String title; + final Timestamp? date; + final String? location; + final String? locationAddress; + final String? description; + GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift.fromJson(dynamic json): + + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift otherTyped = other as GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift; + return title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description; + + } + @override + int get hashCode => Object.hashAll([title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, description.hashCode]); + + + Map toJson() { + Map json = {}; + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + return json; + } + + GetRecentPaymentByIdRecentPaymentApplicationShiftRoleShift({ + required this.title, + this.date, + this.location, + this.locationAddress, + this.description, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentInvoice { + final EnumValue status; + final String invoiceNumber; + final Timestamp issueDate; + final GetRecentPaymentByIdRecentPaymentInvoiceBusiness business; + final GetRecentPaymentByIdRecentPaymentInvoiceVendor vendor; + final GetRecentPaymentByIdRecentPaymentInvoiceOrder order; + GetRecentPaymentByIdRecentPaymentInvoice.fromJson(dynamic json): + + status = invoiceStatusDeserializer(json['status']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + business = GetRecentPaymentByIdRecentPaymentInvoiceBusiness.fromJson(json['business']), + vendor = GetRecentPaymentByIdRecentPaymentInvoiceVendor.fromJson(json['vendor']), + order = GetRecentPaymentByIdRecentPaymentInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentInvoice otherTyped = other as GetRecentPaymentByIdRecentPaymentInvoice; + return status == otherTyped.status && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, invoiceNumber.hashCode, issueDate.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + invoiceStatusSerializer(status) + ; + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + GetRecentPaymentByIdRecentPaymentInvoice({ + required this.status, + required this.invoiceNumber, + required this.issueDate, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentInvoiceBusiness { + final String id; + final String businessName; + GetRecentPaymentByIdRecentPaymentInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentInvoiceBusiness otherTyped = other as GetRecentPaymentByIdRecentPaymentInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + GetRecentPaymentByIdRecentPaymentInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentInvoiceVendor { + final String id; + final String companyName; + GetRecentPaymentByIdRecentPaymentInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentInvoiceVendor otherTyped = other as GetRecentPaymentByIdRecentPaymentInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetRecentPaymentByIdRecentPaymentInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetRecentPaymentByIdRecentPaymentInvoiceOrder { + final String id; + final String? eventName; + GetRecentPaymentByIdRecentPaymentInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdRecentPaymentInvoiceOrder otherTyped = other as GetRecentPaymentByIdRecentPaymentInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + return json; + } + + GetRecentPaymentByIdRecentPaymentInvoiceOrder({ + required this.id, + this.eventName, + }); +} + +@immutable +class GetRecentPaymentByIdData { + final GetRecentPaymentByIdRecentPayment? recentPayment; + GetRecentPaymentByIdData.fromJson(dynamic json): + + recentPayment = json['recentPayment'] == null ? null : GetRecentPaymentByIdRecentPayment.fromJson(json['recentPayment']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdData otherTyped = other as GetRecentPaymentByIdData; + return recentPayment == otherTyped.recentPayment; + + } + @override + int get hashCode => recentPayment.hashCode; + + + Map toJson() { + Map json = {}; + if (recentPayment != null) { + json['recentPayment'] = recentPayment!.toJson(); + } + return json; + } + + GetRecentPaymentByIdData({ + this.recentPayment, + }); +} + +@immutable +class GetRecentPaymentByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetRecentPaymentByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRecentPaymentByIdVariables otherTyped = other as GetRecentPaymentByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetRecentPaymentByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_by_id.dart new file mode 100644 index 00000000..8eb99ee3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_by_id.dart @@ -0,0 +1,151 @@ +part of 'generated.dart'; + +class GetRoleByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetRoleByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetRoleByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetRoleByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetRoleByIdVariables vars= GetRoleByIdVariables(id: id,); + return _dataConnect.query("getRoleById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetRoleByIdRole { + final String id; + final String name; + final double costPerHour; + final String vendorId; + final String roleCategoryId; + final Timestamp? createdAt; + GetRoleByIdRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']), + vendorId = nativeFromJson(json['vendorId']), + roleCategoryId = nativeFromJson(json['roleCategoryId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleByIdRole otherTyped = other as GetRoleByIdRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour && + vendorId == otherTyped.vendorId && + roleCategoryId == otherTyped.roleCategoryId && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode, vendorId.hashCode, roleCategoryId.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + json['vendorId'] = nativeToJson(vendorId); + json['roleCategoryId'] = nativeToJson(roleCategoryId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + GetRoleByIdRole({ + required this.id, + required this.name, + required this.costPerHour, + required this.vendorId, + required this.roleCategoryId, + this.createdAt, + }); +} + +@immutable +class GetRoleByIdData { + final GetRoleByIdRole? role; + GetRoleByIdData.fromJson(dynamic json): + + role = json['role'] == null ? null : GetRoleByIdRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleByIdData otherTyped = other as GetRoleByIdData; + return role == otherTyped.role; + + } + @override + int get hashCode => role.hashCode; + + + Map toJson() { + Map json = {}; + if (role != null) { + json['role'] = role!.toJson(); + } + return json; + } + + GetRoleByIdData({ + this.role, + }); +} + +@immutable +class GetRoleByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetRoleByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleByIdVariables otherTyped = other as GetRoleByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetRoleByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_categories_by_category.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_categories_by_category.dart new file mode 100644 index 00000000..98e597f6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_categories_by_category.dart @@ -0,0 +1,138 @@ +part of 'generated.dart'; + +class GetRoleCategoriesByCategoryVariablesBuilder { + RoleCategoryType category; + + final FirebaseDataConnect _dataConnect; + GetRoleCategoriesByCategoryVariablesBuilder(this._dataConnect, {required this.category,}); + Deserializer dataDeserializer = (dynamic json) => GetRoleCategoriesByCategoryData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetRoleCategoriesByCategoryVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetRoleCategoriesByCategoryVariables vars= GetRoleCategoriesByCategoryVariables(category: category,); + return _dataConnect.query("getRoleCategoriesByCategory", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetRoleCategoriesByCategoryRoleCategories { + final String id; + final String roleName; + final EnumValue category; + GetRoleCategoriesByCategoryRoleCategories.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleName = nativeFromJson(json['roleName']), + category = roleCategoryTypeDeserializer(json['category']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleCategoriesByCategoryRoleCategories otherTyped = other as GetRoleCategoriesByCategoryRoleCategories; + return id == otherTyped.id && + roleName == otherTyped.roleName && + category == otherTyped.category; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleName.hashCode, category.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleName'] = nativeToJson(roleName); + json['category'] = + roleCategoryTypeSerializer(category) + ; + return json; + } + + GetRoleCategoriesByCategoryRoleCategories({ + required this.id, + required this.roleName, + required this.category, + }); +} + +@immutable +class GetRoleCategoriesByCategoryData { + final List roleCategories; + GetRoleCategoriesByCategoryData.fromJson(dynamic json): + + roleCategories = (json['roleCategories'] as List) + .map((e) => GetRoleCategoriesByCategoryRoleCategories.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleCategoriesByCategoryData otherTyped = other as GetRoleCategoriesByCategoryData; + return roleCategories == otherTyped.roleCategories; + + } + @override + int get hashCode => roleCategories.hashCode; + + + Map toJson() { + Map json = {}; + json['roleCategories'] = roleCategories.map((e) => e.toJson()).toList(); + return json; + } + + GetRoleCategoriesByCategoryData({ + required this.roleCategories, + }); +} + +@immutable +class GetRoleCategoriesByCategoryVariables { + final RoleCategoryType category; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetRoleCategoriesByCategoryVariables.fromJson(Map json): + + category = RoleCategoryType.values.byName(json['category']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleCategoriesByCategoryVariables otherTyped = other as GetRoleCategoriesByCategoryVariables; + return category == otherTyped.category; + + } + @override + int get hashCode => category.hashCode; + + + Map toJson() { + Map json = {}; + json['category'] = + category.name + ; + return json; + } + + GetRoleCategoriesByCategoryVariables({ + required this.category, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_category_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_category_by_id.dart new file mode 100644 index 00000000..6b87597d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_role_category_by_id.dart @@ -0,0 +1,150 @@ +part of 'generated.dart'; + +class GetRoleCategoryByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetRoleCategoryByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetRoleCategoryByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetRoleCategoryByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetRoleCategoryByIdVariables vars= GetRoleCategoryByIdVariables(id: id,); + return _dataConnect.query("getRoleCategoryById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetRoleCategoryByIdRoleCategory { + final String id; + final String roleName; + final EnumValue category; + final Timestamp? createdAt; + final Timestamp? updatedAt; + GetRoleCategoryByIdRoleCategory.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleName = nativeFromJson(json['roleName']), + category = roleCategoryTypeDeserializer(json['category']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleCategoryByIdRoleCategory otherTyped = other as GetRoleCategoryByIdRoleCategory; + return id == otherTyped.id && + roleName == otherTyped.roleName && + category == otherTyped.category && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleName.hashCode, category.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleName'] = nativeToJson(roleName); + json['category'] = + roleCategoryTypeSerializer(category) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + GetRoleCategoryByIdRoleCategory({ + required this.id, + required this.roleName, + required this.category, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class GetRoleCategoryByIdData { + final GetRoleCategoryByIdRoleCategory? roleCategory; + GetRoleCategoryByIdData.fromJson(dynamic json): + + roleCategory = json['roleCategory'] == null ? null : GetRoleCategoryByIdRoleCategory.fromJson(json['roleCategory']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleCategoryByIdData otherTyped = other as GetRoleCategoryByIdData; + return roleCategory == otherTyped.roleCategory; + + } + @override + int get hashCode => roleCategory.hashCode; + + + Map toJson() { + Map json = {}; + if (roleCategory != null) { + json['roleCategory'] = roleCategory!.toJson(); + } + return json; + } + + GetRoleCategoryByIdData({ + this.roleCategory, + }); +} + +@immutable +class GetRoleCategoryByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetRoleCategoryByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetRoleCategoryByIdVariables otherTyped = other as GetRoleCategoryByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetRoleCategoryByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_shift_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shift_by_id.dart new file mode 100644 index 00000000..2f56506d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shift_by_id.dart @@ -0,0 +1,443 @@ +part of 'generated.dart'; + +class GetShiftByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetShiftByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetShiftByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetShiftByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetShiftByIdVariables vars= GetShiftByIdVariables(id: id,); + return _dataConnect.query("getShiftById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetShiftByIdShift { + final String id; + final String title; + final String orderId; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? cost; + final String? location; + final String? locationAddress; + final double? latitude; + final double? longitude; + final String? description; + final EnumValue? status; + final int? workersNeeded; + final int? filled; + final Timestamp? filledAt; + final List? managers; + final int? durationDays; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetShiftByIdShiftOrder order; + GetShiftByIdShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + orderId = nativeFromJson(json['orderId']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + cost = json['cost'] == null ? null : nativeFromJson(json['cost']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + latitude = json['latitude'] == null ? null : nativeFromJson(json['latitude']), + longitude = json['longitude'] == null ? null : nativeFromJson(json['longitude']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + filledAt = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']), + managers = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + durationDays = json['durationDays'] == null ? null : nativeFromJson(json['durationDays']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + order = GetShiftByIdShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftByIdShift otherTyped = other as GetShiftByIdShift; + return id == otherTyped.id && + title == otherTyped.title && + orderId == otherTyped.orderId && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + cost == otherTyped.cost && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + description == otherTyped.description && + status == otherTyped.status && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + filledAt == otherTyped.filledAt && + managers == otherTyped.managers && + durationDays == otherTyped.durationDays && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + json['orderId'] = nativeToJson(orderId); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (cost != null) { + json['cost'] = nativeToJson(cost); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (latitude != null) { + json['latitude'] = nativeToJson(latitude); + } + if (longitude != null) { + json['longitude'] = nativeToJson(longitude); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (filledAt != null) { + json['filledAt'] = filledAt!.toJson(); + } + if (managers != null) { + json['managers'] = managers?.map((e) => e!.toJson()).toList(); + } + if (durationDays != null) { + json['durationDays'] = nativeToJson(durationDays); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['order'] = order.toJson(); + return json; + } + + GetShiftByIdShift({ + required this.id, + required this.title, + required this.orderId, + this.date, + this.startTime, + this.endTime, + this.hours, + this.cost, + this.location, + this.locationAddress, + this.latitude, + this.longitude, + this.description, + this.status, + this.workersNeeded, + this.filled, + this.filledAt, + this.managers, + this.durationDays, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.order, + }); +} + +@immutable +class GetShiftByIdShiftOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + final String businessId; + final String vendorId; + final GetShiftByIdShiftOrderBusiness business; + final GetShiftByIdShiftOrderVendor vendor; + GetShiftByIdShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + business = GetShiftByIdShiftOrderBusiness.fromJson(json['business']), + vendor = GetShiftByIdShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftByIdShiftOrder otherTyped = other as GetShiftByIdShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode, businessId.hashCode, vendorId.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetShiftByIdShiftOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + required this.businessId, + required this.vendorId, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetShiftByIdShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetShiftByIdShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftByIdShiftOrderBusiness otherTyped = other as GetShiftByIdShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetShiftByIdShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetShiftByIdShiftOrderVendor { + final String id; + final String companyName; + GetShiftByIdShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftByIdShiftOrderVendor otherTyped = other as GetShiftByIdShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetShiftByIdShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetShiftByIdData { + final GetShiftByIdShift? shift; + GetShiftByIdData.fromJson(dynamic json): + + shift = json['shift'] == null ? null : GetShiftByIdShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftByIdData otherTyped = other as GetShiftByIdData; + return shift == otherTyped.shift; + + } + @override + int get hashCode => shift.hashCode; + + + Map toJson() { + Map json = {}; + if (shift != null) { + json['shift'] = shift!.toJson(); + } + return json; + } + + GetShiftByIdData({ + this.shift, + }); +} + +@immutable +class GetShiftByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetShiftByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftByIdVariables otherTyped = other as GetShiftByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetShiftByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_shift_role_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shift_role_by_id.dart new file mode 100644 index 00000000..007ac06e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shift_role_by_id.dart @@ -0,0 +1,462 @@ +part of 'generated.dart'; + +class GetShiftRoleByIdVariablesBuilder { + String shiftId; + String roleId; + + final FirebaseDataConnect _dataConnect; + GetShiftRoleByIdVariablesBuilder(this._dataConnect, {required this.shiftId,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => GetShiftRoleByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetShiftRoleByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetShiftRoleByIdVariables vars= GetShiftRoleByIdVariables(shiftId: shiftId,roleId: roleId,); + return _dataConnect.query("getShiftRoleById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetShiftRoleByIdShiftRole { + final String id; + final String shiftId; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final String? department; + final String? uniform; + final EnumValue? breakType; + final double? totalValue; + final Timestamp? createdAt; + final GetShiftRoleByIdShiftRoleRole role; + final GetShiftRoleByIdShiftRoleShift shift; + GetShiftRoleByIdShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + uniform = json['uniform'] == null ? null : nativeFromJson(json['uniform']), + breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + role = GetShiftRoleByIdShiftRoleRole.fromJson(json['role']), + shift = GetShiftRoleByIdShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdShiftRole otherTyped = other as GetShiftRoleByIdShiftRole; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + department == otherTyped.department && + uniform == otherTyped.uniform && + breakType == otherTyped.breakType && + totalValue == otherTyped.totalValue && + createdAt == otherTyped.createdAt && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, department.hashCode, uniform.hashCode, breakType.hashCode, totalValue.hashCode, createdAt.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (uniform != null) { + json['uniform'] = nativeToJson(uniform); + } + if (breakType != null) { + json['breakType'] = + breakDurationSerializer(breakType!) + ; + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + GetShiftRoleByIdShiftRole({ + required this.id, + required this.shiftId, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.department, + this.uniform, + this.breakType, + this.totalValue, + this.createdAt, + required this.role, + required this.shift, + }); +} + +@immutable +class GetShiftRoleByIdShiftRoleRole { + final String id; + final String name; + final double costPerHour; + GetShiftRoleByIdShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdShiftRoleRole otherTyped = other as GetShiftRoleByIdShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetShiftRoleByIdShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetShiftRoleByIdShiftRoleShift { + final String? location; + final String? locationAddress; + final String? description; + final String orderId; + final GetShiftRoleByIdShiftRoleShiftOrder order; + GetShiftRoleByIdShiftRoleShift.fromJson(dynamic json): + + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + orderId = nativeFromJson(json['orderId']), + order = GetShiftRoleByIdShiftRoleShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdShiftRoleShift otherTyped = other as GetShiftRoleByIdShiftRoleShift; + return location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description && + orderId == otherTyped.orderId && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([location.hashCode, locationAddress.hashCode, description.hashCode, orderId.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['orderId'] = nativeToJson(orderId); + json['order'] = order.toJson(); + return json; + } + + GetShiftRoleByIdShiftRoleShift({ + this.location, + this.locationAddress, + this.description, + required this.orderId, + required this.order, + }); +} + +@immutable +class GetShiftRoleByIdShiftRoleShiftOrder { + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? notes; + final GetShiftRoleByIdShiftRoleShiftOrderBusiness business; + final GetShiftRoleByIdShiftRoleShiftOrderVendor vendor; + GetShiftRoleByIdShiftRoleShiftOrder.fromJson(dynamic json): + + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + business = GetShiftRoleByIdShiftRoleShiftOrderBusiness.fromJson(json['business']), + vendor = GetShiftRoleByIdShiftRoleShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdShiftRoleShiftOrder otherTyped = other as GetShiftRoleByIdShiftRoleShiftOrder; + return recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + notes == otherTyped.notes && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetShiftRoleByIdShiftRoleShiftOrder({ + this.recurringDays, + this.permanentDays, + this.notes, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetShiftRoleByIdShiftRoleShiftOrderBusiness { + final String id; + final String businessName; + GetShiftRoleByIdShiftRoleShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdShiftRoleShiftOrderBusiness otherTyped = other as GetShiftRoleByIdShiftRoleShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + GetShiftRoleByIdShiftRoleShiftOrderBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class GetShiftRoleByIdShiftRoleShiftOrderVendor { + final String id; + final String companyName; + GetShiftRoleByIdShiftRoleShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdShiftRoleShiftOrderVendor otherTyped = other as GetShiftRoleByIdShiftRoleShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetShiftRoleByIdShiftRoleShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetShiftRoleByIdData { + final GetShiftRoleByIdShiftRole? shiftRole; + GetShiftRoleByIdData.fromJson(dynamic json): + + shiftRole = json['shiftRole'] == null ? null : GetShiftRoleByIdShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdData otherTyped = other as GetShiftRoleByIdData; + return shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => shiftRole.hashCode; + + + Map toJson() { + Map json = {}; + if (shiftRole != null) { + json['shiftRole'] = shiftRole!.toJson(); + } + return json; + } + + GetShiftRoleByIdData({ + this.shiftRole, + }); +} + +@immutable +class GetShiftRoleByIdVariables { + final String shiftId; + final String roleId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetShiftRoleByIdVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftRoleByIdVariables otherTyped = other as GetShiftRoleByIdVariables; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + GetShiftRoleByIdVariables({ + required this.shiftId, + required this.roleId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_shifts_by_business_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shifts_by_business_id.dart new file mode 100644 index 00000000..e9e57292 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shifts_by_business_id.dart @@ -0,0 +1,506 @@ +part of 'generated.dart'; + +class GetShiftsByBusinessIdVariablesBuilder { + String businessId; + Optional _dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + Optional _dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetShiftsByBusinessIdVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + GetShiftsByBusinessIdVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + GetShiftsByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetShiftsByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetShiftsByBusinessIdVariablesBuilder(this._dataConnect, {required this.businessId,}); + Deserializer dataDeserializer = (dynamic json) => GetShiftsByBusinessIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetShiftsByBusinessIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetShiftsByBusinessIdVariables vars= GetShiftsByBusinessIdVariables(businessId: businessId,dateFrom: _dateFrom,dateTo: _dateTo,offset: _offset,limit: _limit,); + return _dataConnect.query("getShiftsByBusinessId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetShiftsByBusinessIdShifts { + final String id; + final String title; + final String orderId; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? cost; + final String? location; + final String? locationAddress; + final double? latitude; + final double? longitude; + final String? description; + final EnumValue? status; + final int? workersNeeded; + final int? filled; + final Timestamp? filledAt; + final List? managers; + final int? durationDays; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetShiftsByBusinessIdShiftsOrder order; + GetShiftsByBusinessIdShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + orderId = nativeFromJson(json['orderId']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + cost = json['cost'] == null ? null : nativeFromJson(json['cost']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + latitude = json['latitude'] == null ? null : nativeFromJson(json['latitude']), + longitude = json['longitude'] == null ? null : nativeFromJson(json['longitude']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + filledAt = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']), + managers = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + durationDays = json['durationDays'] == null ? null : nativeFromJson(json['durationDays']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + order = GetShiftsByBusinessIdShiftsOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByBusinessIdShifts otherTyped = other as GetShiftsByBusinessIdShifts; + return id == otherTyped.id && + title == otherTyped.title && + orderId == otherTyped.orderId && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + cost == otherTyped.cost && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + description == otherTyped.description && + status == otherTyped.status && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + filledAt == otherTyped.filledAt && + managers == otherTyped.managers && + durationDays == otherTyped.durationDays && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + json['orderId'] = nativeToJson(orderId); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (cost != null) { + json['cost'] = nativeToJson(cost); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (latitude != null) { + json['latitude'] = nativeToJson(latitude); + } + if (longitude != null) { + json['longitude'] = nativeToJson(longitude); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (filledAt != null) { + json['filledAt'] = filledAt!.toJson(); + } + if (managers != null) { + json['managers'] = managers?.map((e) => e!.toJson()).toList(); + } + if (durationDays != null) { + json['durationDays'] = nativeToJson(durationDays); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['order'] = order.toJson(); + return json; + } + + GetShiftsByBusinessIdShifts({ + required this.id, + required this.title, + required this.orderId, + this.date, + this.startTime, + this.endTime, + this.hours, + this.cost, + this.location, + this.locationAddress, + this.latitude, + this.longitude, + this.description, + this.status, + this.workersNeeded, + this.filled, + this.filledAt, + this.managers, + this.durationDays, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.order, + }); +} + +@immutable +class GetShiftsByBusinessIdShiftsOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + final String businessId; + final String vendorId; + final GetShiftsByBusinessIdShiftsOrderBusiness business; + final GetShiftsByBusinessIdShiftsOrderVendor vendor; + GetShiftsByBusinessIdShiftsOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + business = GetShiftsByBusinessIdShiftsOrderBusiness.fromJson(json['business']), + vendor = GetShiftsByBusinessIdShiftsOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByBusinessIdShiftsOrder otherTyped = other as GetShiftsByBusinessIdShiftsOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode, businessId.hashCode, vendorId.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetShiftsByBusinessIdShiftsOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + required this.businessId, + required this.vendorId, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetShiftsByBusinessIdShiftsOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetShiftsByBusinessIdShiftsOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByBusinessIdShiftsOrderBusiness otherTyped = other as GetShiftsByBusinessIdShiftsOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetShiftsByBusinessIdShiftsOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetShiftsByBusinessIdShiftsOrderVendor { + final String id; + final String companyName; + GetShiftsByBusinessIdShiftsOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByBusinessIdShiftsOrderVendor otherTyped = other as GetShiftsByBusinessIdShiftsOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetShiftsByBusinessIdShiftsOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetShiftsByBusinessIdData { + final List shifts; + GetShiftsByBusinessIdData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => GetShiftsByBusinessIdShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByBusinessIdData otherTyped = other as GetShiftsByBusinessIdData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + GetShiftsByBusinessIdData({ + required this.shifts, + }); +} + +@immutable +class GetShiftsByBusinessIdVariables { + final String businessId; + late final OptionaldateFrom; + late final OptionaldateTo; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetShiftsByBusinessIdVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']) { + + + + dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + dateFrom.value = json['dateFrom'] == null ? null : Timestamp.fromJson(json['dateFrom']); + + + dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + dateTo.value = json['dateTo'] == null ? null : Timestamp.fromJson(json['dateTo']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByBusinessIdVariables otherTyped = other as GetShiftsByBusinessIdVariables; + return businessId == otherTyped.businessId && + dateFrom == otherTyped.dateFrom && + dateTo == otherTyped.dateTo && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, dateFrom.hashCode, dateTo.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + if(dateFrom.state == OptionalState.set) { + json['dateFrom'] = dateFrom.toJson(); + } + if(dateTo.state == OptionalState.set) { + json['dateTo'] = dateTo.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetShiftsByBusinessIdVariables({ + required this.businessId, + required this.dateFrom, + required this.dateTo, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_shifts_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shifts_by_vendor_id.dart new file mode 100644 index 00000000..259da17c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_shifts_by_vendor_id.dart @@ -0,0 +1,506 @@ +part of 'generated.dart'; + +class GetShiftsByVendorIdVariablesBuilder { + String vendorId; + Optional _dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + Optional _dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; GetShiftsByVendorIdVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + GetShiftsByVendorIdVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + GetShiftsByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + GetShiftsByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + GetShiftsByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => GetShiftsByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetShiftsByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetShiftsByVendorIdVariables vars= GetShiftsByVendorIdVariables(vendorId: vendorId,dateFrom: _dateFrom,dateTo: _dateTo,offset: _offset,limit: _limit,); + return _dataConnect.query("getShiftsByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetShiftsByVendorIdShifts { + final String id; + final String title; + final String orderId; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? cost; + final String? location; + final String? locationAddress; + final double? latitude; + final double? longitude; + final String? description; + final EnumValue? status; + final int? workersNeeded; + final int? filled; + final Timestamp? filledAt; + final List? managers; + final int? durationDays; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetShiftsByVendorIdShiftsOrder order; + GetShiftsByVendorIdShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + orderId = nativeFromJson(json['orderId']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + cost = json['cost'] == null ? null : nativeFromJson(json['cost']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + latitude = json['latitude'] == null ? null : nativeFromJson(json['latitude']), + longitude = json['longitude'] == null ? null : nativeFromJson(json['longitude']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + filledAt = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']), + managers = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + durationDays = json['durationDays'] == null ? null : nativeFromJson(json['durationDays']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + order = GetShiftsByVendorIdShiftsOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByVendorIdShifts otherTyped = other as GetShiftsByVendorIdShifts; + return id == otherTyped.id && + title == otherTyped.title && + orderId == otherTyped.orderId && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + cost == otherTyped.cost && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + description == otherTyped.description && + status == otherTyped.status && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + filledAt == otherTyped.filledAt && + managers == otherTyped.managers && + durationDays == otherTyped.durationDays && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + json['orderId'] = nativeToJson(orderId); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (cost != null) { + json['cost'] = nativeToJson(cost); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (latitude != null) { + json['latitude'] = nativeToJson(latitude); + } + if (longitude != null) { + json['longitude'] = nativeToJson(longitude); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (filledAt != null) { + json['filledAt'] = filledAt!.toJson(); + } + if (managers != null) { + json['managers'] = managers?.map((e) => e!.toJson()).toList(); + } + if (durationDays != null) { + json['durationDays'] = nativeToJson(durationDays); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['order'] = order.toJson(); + return json; + } + + GetShiftsByVendorIdShifts({ + required this.id, + required this.title, + required this.orderId, + this.date, + this.startTime, + this.endTime, + this.hours, + this.cost, + this.location, + this.locationAddress, + this.latitude, + this.longitude, + this.description, + this.status, + this.workersNeeded, + this.filled, + this.filledAt, + this.managers, + this.durationDays, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.order, + }); +} + +@immutable +class GetShiftsByVendorIdShiftsOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + final String businessId; + final String vendorId; + final GetShiftsByVendorIdShiftsOrderBusiness business; + final GetShiftsByVendorIdShiftsOrderVendor vendor; + GetShiftsByVendorIdShiftsOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + business = GetShiftsByVendorIdShiftsOrderBusiness.fromJson(json['business']), + vendor = GetShiftsByVendorIdShiftsOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByVendorIdShiftsOrder otherTyped = other as GetShiftsByVendorIdShiftsOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode, businessId.hashCode, vendorId.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetShiftsByVendorIdShiftsOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + required this.businessId, + required this.vendorId, + required this.business, + required this.vendor, + }); +} + +@immutable +class GetShiftsByVendorIdShiftsOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + GetShiftsByVendorIdShiftsOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByVendorIdShiftsOrderBusiness otherTyped = other as GetShiftsByVendorIdShiftsOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + GetShiftsByVendorIdShiftsOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class GetShiftsByVendorIdShiftsOrderVendor { + final String id; + final String companyName; + GetShiftsByVendorIdShiftsOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByVendorIdShiftsOrderVendor otherTyped = other as GetShiftsByVendorIdShiftsOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetShiftsByVendorIdShiftsOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetShiftsByVendorIdData { + final List shifts; + GetShiftsByVendorIdData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => GetShiftsByVendorIdShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByVendorIdData otherTyped = other as GetShiftsByVendorIdData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + GetShiftsByVendorIdData({ + required this.shifts, + }); +} + +@immutable +class GetShiftsByVendorIdVariables { + final String vendorId; + late final OptionaldateFrom; + late final OptionaldateTo; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetShiftsByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + dateFrom.value = json['dateFrom'] == null ? null : Timestamp.fromJson(json['dateFrom']); + + + dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + dateTo.value = json['dateTo'] == null ? null : Timestamp.fromJson(json['dateTo']); + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetShiftsByVendorIdVariables otherTyped = other as GetShiftsByVendorIdVariables; + return vendorId == otherTyped.vendorId && + dateFrom == otherTyped.dateFrom && + dateTo == otherTyped.dateTo && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, dateFrom.hashCode, dateTo.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(dateFrom.state == OptionalState.set) { + json['dateFrom'] = dateFrom.toJson(); + } + if(dateTo.state == OptionalState.set) { + json['dateTo'] = dateTo.toJson(); + } + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + GetShiftsByVendorIdVariables({ + required this.vendorId, + required this.dateFrom, + required this.dateTo, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_availability_by_key.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_availability_by_key.dart new file mode 100644 index 00000000..f6f325ba --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_availability_by_key.dart @@ -0,0 +1,238 @@ +part of 'generated.dart'; + +class GetStaffAvailabilityByKeyVariablesBuilder { + String staffId; + DayOfWeek day; + AvailabilitySlot slot; + + final FirebaseDataConnect _dataConnect; + GetStaffAvailabilityByKeyVariablesBuilder(this._dataConnect, {required this.staffId,required this.day,required this.slot,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffAvailabilityByKeyData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffAvailabilityByKeyVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffAvailabilityByKeyVariables vars= GetStaffAvailabilityByKeyVariables(staffId: staffId,day: day,slot: slot,); + return _dataConnect.query("getStaffAvailabilityByKey", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffAvailabilityByKeyStaffAvailability { + final String id; + final String staffId; + final EnumValue day; + final EnumValue slot; + final EnumValue status; + final String? notes; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetStaffAvailabilityByKeyStaffAvailabilityStaff staff; + GetStaffAvailabilityByKeyStaffAvailability.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + day = dayOfWeekDeserializer(json['day']), + slot = availabilitySlotDeserializer(json['slot']), + status = availabilityStatusDeserializer(json['status']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + staff = GetStaffAvailabilityByKeyStaffAvailabilityStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityByKeyStaffAvailability otherTyped = other as GetStaffAvailabilityByKeyStaffAvailability; + return id == otherTyped.id && + staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot && + status == otherTyped.status && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, day.hashCode, slot.hashCode, status.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['day'] = + dayOfWeekSerializer(day) + ; + json['slot'] = + availabilitySlotSerializer(slot) + ; + json['status'] = + availabilityStatusSerializer(status) + ; + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['staff'] = staff.toJson(); + return json; + } + + GetStaffAvailabilityByKeyStaffAvailability({ + required this.id, + required this.staffId, + required this.day, + required this.slot, + required this.status, + this.notes, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.staff, + }); +} + +@immutable +class GetStaffAvailabilityByKeyStaffAvailabilityStaff { + final String id; + final String fullName; + GetStaffAvailabilityByKeyStaffAvailabilityStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityByKeyStaffAvailabilityStaff otherTyped = other as GetStaffAvailabilityByKeyStaffAvailabilityStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + GetStaffAvailabilityByKeyStaffAvailabilityStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class GetStaffAvailabilityByKeyData { + final GetStaffAvailabilityByKeyStaffAvailability? staffAvailability; + GetStaffAvailabilityByKeyData.fromJson(dynamic json): + + staffAvailability = json['staffAvailability'] == null ? null : GetStaffAvailabilityByKeyStaffAvailability.fromJson(json['staffAvailability']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityByKeyData otherTyped = other as GetStaffAvailabilityByKeyData; + return staffAvailability == otherTyped.staffAvailability; + + } + @override + int get hashCode => staffAvailability.hashCode; + + + Map toJson() { + Map json = {}; + if (staffAvailability != null) { + json['staffAvailability'] = staffAvailability!.toJson(); + } + return json; + } + + GetStaffAvailabilityByKeyData({ + this.staffAvailability, + }); +} + +@immutable +class GetStaffAvailabilityByKeyVariables { + final String staffId; + final DayOfWeek day; + final AvailabilitySlot slot; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffAvailabilityByKeyVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + day = DayOfWeek.values.byName(json['day']), + slot = AvailabilitySlot.values.byName(json['slot']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityByKeyVariables otherTyped = other as GetStaffAvailabilityByKeyVariables; + return staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, day.hashCode, slot.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['day'] = + day.name + ; + json['slot'] = + slot.name + ; + return json; + } + + GetStaffAvailabilityByKeyVariables({ + required this.staffId, + required this.day, + required this.slot, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_availability_stats_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_availability_stats_by_staff_id.dart new file mode 100644 index 00000000..4b20637a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_availability_stats_by_staff_id.dart @@ -0,0 +1,243 @@ +part of 'generated.dart'; + +class GetStaffAvailabilityStatsByStaffIdVariablesBuilder { + String staffId; + + final FirebaseDataConnect _dataConnect; + GetStaffAvailabilityStatsByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffAvailabilityStatsByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffAvailabilityStatsByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffAvailabilityStatsByStaffIdVariables vars= GetStaffAvailabilityStatsByStaffIdVariables(staffId: staffId,); + return _dataConnect.query("getStaffAvailabilityStatsByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats { + final String id; + final String staffId; + final int? needWorkIndex; + final int? utilizationPercentage; + final int? predictedAvailabilityScore; + final int? scheduledHoursThisPeriod; + final int? desiredHoursThisPeriod; + final Timestamp? lastShiftDate; + final int? acceptanceRate; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff staff; + GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + needWorkIndex = json['needWorkIndex'] == null ? null : nativeFromJson(json['needWorkIndex']), + utilizationPercentage = json['utilizationPercentage'] == null ? null : nativeFromJson(json['utilizationPercentage']), + predictedAvailabilityScore = json['predictedAvailabilityScore'] == null ? null : nativeFromJson(json['predictedAvailabilityScore']), + scheduledHoursThisPeriod = json['scheduledHoursThisPeriod'] == null ? null : nativeFromJson(json['scheduledHoursThisPeriod']), + desiredHoursThisPeriod = json['desiredHoursThisPeriod'] == null ? null : nativeFromJson(json['desiredHoursThisPeriod']), + lastShiftDate = json['lastShiftDate'] == null ? null : Timestamp.fromJson(json['lastShiftDate']), + acceptanceRate = json['acceptanceRate'] == null ? null : nativeFromJson(json['acceptanceRate']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + staff = GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats otherTyped = other as GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats; + return id == otherTyped.id && + staffId == otherTyped.staffId && + needWorkIndex == otherTyped.needWorkIndex && + utilizationPercentage == otherTyped.utilizationPercentage && + predictedAvailabilityScore == otherTyped.predictedAvailabilityScore && + scheduledHoursThisPeriod == otherTyped.scheduledHoursThisPeriod && + desiredHoursThisPeriod == otherTyped.desiredHoursThisPeriod && + lastShiftDate == otherTyped.lastShiftDate && + acceptanceRate == otherTyped.acceptanceRate && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, needWorkIndex.hashCode, utilizationPercentage.hashCode, predictedAvailabilityScore.hashCode, scheduledHoursThisPeriod.hashCode, desiredHoursThisPeriod.hashCode, lastShiftDate.hashCode, acceptanceRate.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + if (needWorkIndex != null) { + json['needWorkIndex'] = nativeToJson(needWorkIndex); + } + if (utilizationPercentage != null) { + json['utilizationPercentage'] = nativeToJson(utilizationPercentage); + } + if (predictedAvailabilityScore != null) { + json['predictedAvailabilityScore'] = nativeToJson(predictedAvailabilityScore); + } + if (scheduledHoursThisPeriod != null) { + json['scheduledHoursThisPeriod'] = nativeToJson(scheduledHoursThisPeriod); + } + if (desiredHoursThisPeriod != null) { + json['desiredHoursThisPeriod'] = nativeToJson(desiredHoursThisPeriod); + } + if (lastShiftDate != null) { + json['lastShiftDate'] = lastShiftDate!.toJson(); + } + if (acceptanceRate != null) { + json['acceptanceRate'] = nativeToJson(acceptanceRate); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['staff'] = staff.toJson(); + return json; + } + + GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats({ + required this.id, + required this.staffId, + this.needWorkIndex, + this.utilizationPercentage, + this.predictedAvailabilityScore, + this.scheduledHoursThisPeriod, + this.desiredHoursThisPeriod, + this.lastShiftDate, + this.acceptanceRate, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.staff, + }); +} + +@immutable +class GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff { + final String id; + final String fullName; + GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff otherTyped = other as GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStatsStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class GetStaffAvailabilityStatsByStaffIdData { + final GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats? staffAvailabilityStats; + GetStaffAvailabilityStatsByStaffIdData.fromJson(dynamic json): + + staffAvailabilityStats = json['staffAvailabilityStats'] == null ? null : GetStaffAvailabilityStatsByStaffIdStaffAvailabilityStats.fromJson(json['staffAvailabilityStats']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityStatsByStaffIdData otherTyped = other as GetStaffAvailabilityStatsByStaffIdData; + return staffAvailabilityStats == otherTyped.staffAvailabilityStats; + + } + @override + int get hashCode => staffAvailabilityStats.hashCode; + + + Map toJson() { + Map json = {}; + if (staffAvailabilityStats != null) { + json['staffAvailabilityStats'] = staffAvailabilityStats!.toJson(); + } + return json; + } + + GetStaffAvailabilityStatsByStaffIdData({ + this.staffAvailabilityStats, + }); +} + +@immutable +class GetStaffAvailabilityStatsByStaffIdVariables { + final String staffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffAvailabilityStatsByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffAvailabilityStatsByStaffIdVariables otherTyped = other as GetStaffAvailabilityStatsByStaffIdVariables; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + GetStaffAvailabilityStatsByStaffIdVariables({ + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_by_id.dart new file mode 100644 index 00000000..3820320e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_by_id.dart @@ -0,0 +1,380 @@ +part of 'generated.dart'; + +class GetStaffByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetStaffByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffByIdVariables vars= GetStaffByIdVariables(id: id,); + return _dataConnect.query("getStaffById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffByIdStaff { + final String id; + final String userId; + final String fullName; + final String? role; + final String? level; + final String? phone; + final String? email; + final String? photoUrl; + final int? totalShifts; + final double? averageRating; + final int? onTimeRate; + final int? noShowCount; + final int? cancellationCount; + final int? reliabilityScore; + final int? xp; + final AnyValue? badges; + final bool? isRecommended; + final String? bio; + final AnyValue? industries; + final AnyValue? preferredLocations; + final int? maxDistanceMiles; + final AnyValue? languages; + final AnyValue? itemsAttire; + final String? ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final EnumValue? department; + final String? hubId; + final String? manager; + final EnumValue? english; + final EnumValue? backgroundCheckStatus; + final EnumValue? employmentType; + final String? initial; + final bool? englishRequired; + final String? city; + final String? addres; + GetStaffByIdStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + fullName = nativeFromJson(json['fullName']), + role = json['role'] == null ? null : nativeFromJson(json['role']), + level = json['level'] == null ? null : nativeFromJson(json['level']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + totalShifts = json['totalShifts'] == null ? null : nativeFromJson(json['totalShifts']), + averageRating = json['averageRating'] == null ? null : nativeFromJson(json['averageRating']), + onTimeRate = json['onTimeRate'] == null ? null : nativeFromJson(json['onTimeRate']), + noShowCount = json['noShowCount'] == null ? null : nativeFromJson(json['noShowCount']), + cancellationCount = json['cancellationCount'] == null ? null : nativeFromJson(json['cancellationCount']), + reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']), + xp = json['xp'] == null ? null : nativeFromJson(json['xp']), + badges = json['badges'] == null ? null : AnyValue.fromJson(json['badges']), + isRecommended = json['isRecommended'] == null ? null : nativeFromJson(json['isRecommended']), + bio = json['bio'] == null ? null : nativeFromJson(json['bio']), + industries = json['industries'] == null ? null : AnyValue.fromJson(json['industries']), + preferredLocations = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']), + maxDistanceMiles = json['maxDistanceMiles'] == null ? null : nativeFromJson(json['maxDistanceMiles']), + languages = json['languages'] == null ? null : AnyValue.fromJson(json['languages']), + itemsAttire = json['itemsAttire'] == null ? null : AnyValue.fromJson(json['itemsAttire']), + ownerId = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + department = json['department'] == null ? null : departmentTypeDeserializer(json['department']), + hubId = json['hubId'] == null ? null : nativeFromJson(json['hubId']), + manager = json['manager'] == null ? null : nativeFromJson(json['manager']), + english = json['english'] == null ? null : englishProficiencyDeserializer(json['english']), + backgroundCheckStatus = json['backgroundCheckStatus'] == null ? null : backgroundCheckStatusDeserializer(json['backgroundCheckStatus']), + employmentType = json['employmentType'] == null ? null : employmentTypeDeserializer(json['employmentType']), + initial = json['initial'] == null ? null : nativeFromJson(json['initial']), + englishRequired = json['englishRequired'] == null ? null : nativeFromJson(json['englishRequired']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + addres = json['addres'] == null ? null : nativeFromJson(json['addres']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffByIdStaff otherTyped = other as GetStaffByIdStaff; + return id == otherTyped.id && + userId == otherTyped.userId && + fullName == otherTyped.fullName && + role == otherTyped.role && + level == otherTyped.level && + phone == otherTyped.phone && + email == otherTyped.email && + photoUrl == otherTyped.photoUrl && + totalShifts == otherTyped.totalShifts && + averageRating == otherTyped.averageRating && + onTimeRate == otherTyped.onTimeRate && + noShowCount == otherTyped.noShowCount && + cancellationCount == otherTyped.cancellationCount && + reliabilityScore == otherTyped.reliabilityScore && + xp == otherTyped.xp && + badges == otherTyped.badges && + isRecommended == otherTyped.isRecommended && + bio == otherTyped.bio && + industries == otherTyped.industries && + preferredLocations == otherTyped.preferredLocations && + maxDistanceMiles == otherTyped.maxDistanceMiles && + languages == otherTyped.languages && + itemsAttire == otherTyped.itemsAttire && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + department == otherTyped.department && + hubId == otherTyped.hubId && + manager == otherTyped.manager && + english == otherTyped.english && + backgroundCheckStatus == otherTyped.backgroundCheckStatus && + employmentType == otherTyped.employmentType && + initial == otherTyped.initial && + englishRequired == otherTyped.englishRequired && + city == otherTyped.city && + addres == otherTyped.addres; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, role.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['fullName'] = nativeToJson(fullName); + if (role != null) { + json['role'] = nativeToJson(role); + } + if (level != null) { + json['level'] = nativeToJson(level); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (totalShifts != null) { + json['totalShifts'] = nativeToJson(totalShifts); + } + if (averageRating != null) { + json['averageRating'] = nativeToJson(averageRating); + } + if (onTimeRate != null) { + json['onTimeRate'] = nativeToJson(onTimeRate); + } + if (noShowCount != null) { + json['noShowCount'] = nativeToJson(noShowCount); + } + if (cancellationCount != null) { + json['cancellationCount'] = nativeToJson(cancellationCount); + } + if (reliabilityScore != null) { + json['reliabilityScore'] = nativeToJson(reliabilityScore); + } + if (xp != null) { + json['xp'] = nativeToJson(xp); + } + if (badges != null) { + json['badges'] = badges!.toJson(); + } + if (isRecommended != null) { + json['isRecommended'] = nativeToJson(isRecommended); + } + if (bio != null) { + json['bio'] = nativeToJson(bio); + } + if (industries != null) { + json['industries'] = industries!.toJson(); + } + if (preferredLocations != null) { + json['preferredLocations'] = preferredLocations!.toJson(); + } + if (maxDistanceMiles != null) { + json['maxDistanceMiles'] = nativeToJson(maxDistanceMiles); + } + if (languages != null) { + json['languages'] = languages!.toJson(); + } + if (itemsAttire != null) { + json['itemsAttire'] = itemsAttire!.toJson(); + } + if (ownerId != null) { + json['ownerId'] = nativeToJson(ownerId); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (department != null) { + json['department'] = + departmentTypeSerializer(department!) + ; + } + if (hubId != null) { + json['hubId'] = nativeToJson(hubId); + } + if (manager != null) { + json['manager'] = nativeToJson(manager); + } + if (english != null) { + json['english'] = + englishProficiencySerializer(english!) + ; + } + if (backgroundCheckStatus != null) { + json['backgroundCheckStatus'] = + backgroundCheckStatusSerializer(backgroundCheckStatus!) + ; + } + if (employmentType != null) { + json['employmentType'] = + employmentTypeSerializer(employmentType!) + ; + } + if (initial != null) { + json['initial'] = nativeToJson(initial); + } + if (englishRequired != null) { + json['englishRequired'] = nativeToJson(englishRequired); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (addres != null) { + json['addres'] = nativeToJson(addres); + } + return json; + } + + GetStaffByIdStaff({ + required this.id, + required this.userId, + required this.fullName, + this.role, + this.level, + this.phone, + this.email, + this.photoUrl, + this.totalShifts, + this.averageRating, + this.onTimeRate, + this.noShowCount, + this.cancellationCount, + this.reliabilityScore, + this.xp, + this.badges, + this.isRecommended, + this.bio, + this.industries, + this.preferredLocations, + this.maxDistanceMiles, + this.languages, + this.itemsAttire, + this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + this.department, + this.hubId, + this.manager, + this.english, + this.backgroundCheckStatus, + this.employmentType, + this.initial, + this.englishRequired, + this.city, + this.addres, + }); +} + +@immutable +class GetStaffByIdData { + final GetStaffByIdStaff? staff; + GetStaffByIdData.fromJson(dynamic json): + + staff = json['staff'] == null ? null : GetStaffByIdStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffByIdData otherTyped = other as GetStaffByIdData; + return staff == otherTyped.staff; + + } + @override + int get hashCode => staff.hashCode; + + + Map toJson() { + Map json = {}; + if (staff != null) { + json['staff'] = staff!.toJson(); + } + return json; + } + + GetStaffByIdData({ + this.staff, + }); +} + +@immutable +class GetStaffByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffByIdVariables otherTyped = other as GetStaffByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetStaffByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_by_user_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_by_user_id.dart new file mode 100644 index 00000000..293cafe8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_by_user_id.dart @@ -0,0 +1,373 @@ +part of 'generated.dart'; + +class GetStaffByUserIdVariablesBuilder { + String userId; + + final FirebaseDataConnect _dataConnect; + GetStaffByUserIdVariablesBuilder(this._dataConnect, {required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffByUserIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffByUserIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffByUserIdVariables vars= GetStaffByUserIdVariables(userId: userId,); + return _dataConnect.query("getStaffByUserId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffByUserIdStaffs { + final String id; + final String userId; + final String fullName; + final String? level; + final String? phone; + final String? email; + final String? photoUrl; + final int? totalShifts; + final double? averageRating; + final int? onTimeRate; + final int? noShowCount; + final int? cancellationCount; + final int? reliabilityScore; + final int? xp; + final AnyValue? badges; + final bool? isRecommended; + final String? bio; + final AnyValue? industries; + final AnyValue? preferredLocations; + final int? maxDistanceMiles; + final AnyValue? languages; + final AnyValue? itemsAttire; + final String? ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final EnumValue? department; + final String? hubId; + final String? manager; + final EnumValue? english; + final EnumValue? backgroundCheckStatus; + final EnumValue? employmentType; + final String? initial; + final bool? englishRequired; + final String? city; + final String? addres; + GetStaffByUserIdStaffs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + fullName = nativeFromJson(json['fullName']), + level = json['level'] == null ? null : nativeFromJson(json['level']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + totalShifts = json['totalShifts'] == null ? null : nativeFromJson(json['totalShifts']), + averageRating = json['averageRating'] == null ? null : nativeFromJson(json['averageRating']), + onTimeRate = json['onTimeRate'] == null ? null : nativeFromJson(json['onTimeRate']), + noShowCount = json['noShowCount'] == null ? null : nativeFromJson(json['noShowCount']), + cancellationCount = json['cancellationCount'] == null ? null : nativeFromJson(json['cancellationCount']), + reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']), + xp = json['xp'] == null ? null : nativeFromJson(json['xp']), + badges = json['badges'] == null ? null : AnyValue.fromJson(json['badges']), + isRecommended = json['isRecommended'] == null ? null : nativeFromJson(json['isRecommended']), + bio = json['bio'] == null ? null : nativeFromJson(json['bio']), + industries = json['industries'] == null ? null : AnyValue.fromJson(json['industries']), + preferredLocations = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']), + maxDistanceMiles = json['maxDistanceMiles'] == null ? null : nativeFromJson(json['maxDistanceMiles']), + languages = json['languages'] == null ? null : AnyValue.fromJson(json['languages']), + itemsAttire = json['itemsAttire'] == null ? null : AnyValue.fromJson(json['itemsAttire']), + ownerId = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + department = json['department'] == null ? null : departmentTypeDeserializer(json['department']), + hubId = json['hubId'] == null ? null : nativeFromJson(json['hubId']), + manager = json['manager'] == null ? null : nativeFromJson(json['manager']), + english = json['english'] == null ? null : englishProficiencyDeserializer(json['english']), + backgroundCheckStatus = json['backgroundCheckStatus'] == null ? null : backgroundCheckStatusDeserializer(json['backgroundCheckStatus']), + employmentType = json['employmentType'] == null ? null : employmentTypeDeserializer(json['employmentType']), + initial = json['initial'] == null ? null : nativeFromJson(json['initial']), + englishRequired = json['englishRequired'] == null ? null : nativeFromJson(json['englishRequired']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + addres = json['addres'] == null ? null : nativeFromJson(json['addres']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffByUserIdStaffs otherTyped = other as GetStaffByUserIdStaffs; + return id == otherTyped.id && + userId == otherTyped.userId && + fullName == otherTyped.fullName && + level == otherTyped.level && + phone == otherTyped.phone && + email == otherTyped.email && + photoUrl == otherTyped.photoUrl && + totalShifts == otherTyped.totalShifts && + averageRating == otherTyped.averageRating && + onTimeRate == otherTyped.onTimeRate && + noShowCount == otherTyped.noShowCount && + cancellationCount == otherTyped.cancellationCount && + reliabilityScore == otherTyped.reliabilityScore && + xp == otherTyped.xp && + badges == otherTyped.badges && + isRecommended == otherTyped.isRecommended && + bio == otherTyped.bio && + industries == otherTyped.industries && + preferredLocations == otherTyped.preferredLocations && + maxDistanceMiles == otherTyped.maxDistanceMiles && + languages == otherTyped.languages && + itemsAttire == otherTyped.itemsAttire && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + department == otherTyped.department && + hubId == otherTyped.hubId && + manager == otherTyped.manager && + english == otherTyped.english && + backgroundCheckStatus == otherTyped.backgroundCheckStatus && + employmentType == otherTyped.employmentType && + initial == otherTyped.initial && + englishRequired == otherTyped.englishRequired && + city == otherTyped.city && + addres == otherTyped.addres; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['fullName'] = nativeToJson(fullName); + if (level != null) { + json['level'] = nativeToJson(level); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (totalShifts != null) { + json['totalShifts'] = nativeToJson(totalShifts); + } + if (averageRating != null) { + json['averageRating'] = nativeToJson(averageRating); + } + if (onTimeRate != null) { + json['onTimeRate'] = nativeToJson(onTimeRate); + } + if (noShowCount != null) { + json['noShowCount'] = nativeToJson(noShowCount); + } + if (cancellationCount != null) { + json['cancellationCount'] = nativeToJson(cancellationCount); + } + if (reliabilityScore != null) { + json['reliabilityScore'] = nativeToJson(reliabilityScore); + } + if (xp != null) { + json['xp'] = nativeToJson(xp); + } + if (badges != null) { + json['badges'] = badges!.toJson(); + } + if (isRecommended != null) { + json['isRecommended'] = nativeToJson(isRecommended); + } + if (bio != null) { + json['bio'] = nativeToJson(bio); + } + if (industries != null) { + json['industries'] = industries!.toJson(); + } + if (preferredLocations != null) { + json['preferredLocations'] = preferredLocations!.toJson(); + } + if (maxDistanceMiles != null) { + json['maxDistanceMiles'] = nativeToJson(maxDistanceMiles); + } + if (languages != null) { + json['languages'] = languages!.toJson(); + } + if (itemsAttire != null) { + json['itemsAttire'] = itemsAttire!.toJson(); + } + if (ownerId != null) { + json['ownerId'] = nativeToJson(ownerId); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (department != null) { + json['department'] = + departmentTypeSerializer(department!) + ; + } + if (hubId != null) { + json['hubId'] = nativeToJson(hubId); + } + if (manager != null) { + json['manager'] = nativeToJson(manager); + } + if (english != null) { + json['english'] = + englishProficiencySerializer(english!) + ; + } + if (backgroundCheckStatus != null) { + json['backgroundCheckStatus'] = + backgroundCheckStatusSerializer(backgroundCheckStatus!) + ; + } + if (employmentType != null) { + json['employmentType'] = + employmentTypeSerializer(employmentType!) + ; + } + if (initial != null) { + json['initial'] = nativeToJson(initial); + } + if (englishRequired != null) { + json['englishRequired'] = nativeToJson(englishRequired); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (addres != null) { + json['addres'] = nativeToJson(addres); + } + return json; + } + + GetStaffByUserIdStaffs({ + required this.id, + required this.userId, + required this.fullName, + this.level, + this.phone, + this.email, + this.photoUrl, + this.totalShifts, + this.averageRating, + this.onTimeRate, + this.noShowCount, + this.cancellationCount, + this.reliabilityScore, + this.xp, + this.badges, + this.isRecommended, + this.bio, + this.industries, + this.preferredLocations, + this.maxDistanceMiles, + this.languages, + this.itemsAttire, + this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + this.department, + this.hubId, + this.manager, + this.english, + this.backgroundCheckStatus, + this.employmentType, + this.initial, + this.englishRequired, + this.city, + this.addres, + }); +} + +@immutable +class GetStaffByUserIdData { + final List staffs; + GetStaffByUserIdData.fromJson(dynamic json): + + staffs = (json['staffs'] as List) + .map((e) => GetStaffByUserIdStaffs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffByUserIdData otherTyped = other as GetStaffByUserIdData; + return staffs == otherTyped.staffs; + + } + @override + int get hashCode => staffs.hashCode; + + + Map toJson() { + Map json = {}; + json['staffs'] = staffs.map((e) => e.toJson()).toList(); + return json; + } + + GetStaffByUserIdData({ + required this.staffs, + }); +} + +@immutable +class GetStaffByUserIdVariables { + final String userId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffByUserIdVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffByUserIdVariables otherTyped = other as GetStaffByUserIdVariables; + return userId == otherTyped.userId; + + } + @override + int get hashCode => userId.hashCode; + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + return json; + } + + GetStaffByUserIdVariables({ + required this.userId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_course_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_course_by_id.dart new file mode 100644 index 00000000..f2c72e71 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_course_by_id.dart @@ -0,0 +1,183 @@ +part of 'generated.dart'; + +class GetStaffCourseByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetStaffCourseByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffCourseByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffCourseByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffCourseByIdVariables vars= GetStaffCourseByIdVariables(id: id,); + return _dataConnect.query("getStaffCourseById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffCourseByIdStaffCourse { + final String id; + final String staffId; + final String courseId; + final int? progressPercent; + final bool? completed; + final Timestamp? completedAt; + final Timestamp? startedAt; + final Timestamp? lastAccessedAt; + final Timestamp? createdAt; + final Timestamp? updatedAt; + GetStaffCourseByIdStaffCourse.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + courseId = nativeFromJson(json['courseId']), + progressPercent = json['progressPercent'] == null ? null : nativeFromJson(json['progressPercent']), + completed = json['completed'] == null ? null : nativeFromJson(json['completed']), + completedAt = json['completedAt'] == null ? null : Timestamp.fromJson(json['completedAt']), + startedAt = json['startedAt'] == null ? null : Timestamp.fromJson(json['startedAt']), + lastAccessedAt = json['lastAccessedAt'] == null ? null : Timestamp.fromJson(json['lastAccessedAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffCourseByIdStaffCourse otherTyped = other as GetStaffCourseByIdStaffCourse; + return id == otherTyped.id && + staffId == otherTyped.staffId && + courseId == otherTyped.courseId && + progressPercent == otherTyped.progressPercent && + completed == otherTyped.completed && + completedAt == otherTyped.completedAt && + startedAt == otherTyped.startedAt && + lastAccessedAt == otherTyped.lastAccessedAt && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, courseId.hashCode, progressPercent.hashCode, completed.hashCode, completedAt.hashCode, startedAt.hashCode, lastAccessedAt.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['courseId'] = nativeToJson(courseId); + if (progressPercent != null) { + json['progressPercent'] = nativeToJson(progressPercent); + } + if (completed != null) { + json['completed'] = nativeToJson(completed); + } + if (completedAt != null) { + json['completedAt'] = completedAt!.toJson(); + } + if (startedAt != null) { + json['startedAt'] = startedAt!.toJson(); + } + if (lastAccessedAt != null) { + json['lastAccessedAt'] = lastAccessedAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + GetStaffCourseByIdStaffCourse({ + required this.id, + required this.staffId, + required this.courseId, + this.progressPercent, + this.completed, + this.completedAt, + this.startedAt, + this.lastAccessedAt, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class GetStaffCourseByIdData { + final GetStaffCourseByIdStaffCourse? staffCourse; + GetStaffCourseByIdData.fromJson(dynamic json): + + staffCourse = json['staffCourse'] == null ? null : GetStaffCourseByIdStaffCourse.fromJson(json['staffCourse']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffCourseByIdData otherTyped = other as GetStaffCourseByIdData; + return staffCourse == otherTyped.staffCourse; + + } + @override + int get hashCode => staffCourse.hashCode; + + + Map toJson() { + Map json = {}; + if (staffCourse != null) { + json['staffCourse'] = staffCourse!.toJson(); + } + return json; + } + + GetStaffCourseByIdData({ + this.staffCourse, + }); +} + +@immutable +class GetStaffCourseByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffCourseByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffCourseByIdVariables otherTyped = other as GetStaffCourseByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetStaffCourseByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_course_by_staff_and_course.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_course_by_staff_and_course.dart new file mode 100644 index 00000000..fddd3f9d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_course_by_staff_and_course.dart @@ -0,0 +1,189 @@ +part of 'generated.dart'; + +class GetStaffCourseByStaffAndCourseVariablesBuilder { + String staffId; + String courseId; + + final FirebaseDataConnect _dataConnect; + GetStaffCourseByStaffAndCourseVariablesBuilder(this._dataConnect, {required this.staffId,required this.courseId,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffCourseByStaffAndCourseData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffCourseByStaffAndCourseVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffCourseByStaffAndCourseVariables vars= GetStaffCourseByStaffAndCourseVariables(staffId: staffId,courseId: courseId,); + return _dataConnect.query("getStaffCourseByStaffAndCourse", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffCourseByStaffAndCourseStaffCourses { + final String id; + final String staffId; + final String courseId; + final int? progressPercent; + final bool? completed; + final Timestamp? completedAt; + final Timestamp? startedAt; + final Timestamp? lastAccessedAt; + final Timestamp? createdAt; + final Timestamp? updatedAt; + GetStaffCourseByStaffAndCourseStaffCourses.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + courseId = nativeFromJson(json['courseId']), + progressPercent = json['progressPercent'] == null ? null : nativeFromJson(json['progressPercent']), + completed = json['completed'] == null ? null : nativeFromJson(json['completed']), + completedAt = json['completedAt'] == null ? null : Timestamp.fromJson(json['completedAt']), + startedAt = json['startedAt'] == null ? null : Timestamp.fromJson(json['startedAt']), + lastAccessedAt = json['lastAccessedAt'] == null ? null : Timestamp.fromJson(json['lastAccessedAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffCourseByStaffAndCourseStaffCourses otherTyped = other as GetStaffCourseByStaffAndCourseStaffCourses; + return id == otherTyped.id && + staffId == otherTyped.staffId && + courseId == otherTyped.courseId && + progressPercent == otherTyped.progressPercent && + completed == otherTyped.completed && + completedAt == otherTyped.completedAt && + startedAt == otherTyped.startedAt && + lastAccessedAt == otherTyped.lastAccessedAt && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, courseId.hashCode, progressPercent.hashCode, completed.hashCode, completedAt.hashCode, startedAt.hashCode, lastAccessedAt.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['courseId'] = nativeToJson(courseId); + if (progressPercent != null) { + json['progressPercent'] = nativeToJson(progressPercent); + } + if (completed != null) { + json['completed'] = nativeToJson(completed); + } + if (completedAt != null) { + json['completedAt'] = completedAt!.toJson(); + } + if (startedAt != null) { + json['startedAt'] = startedAt!.toJson(); + } + if (lastAccessedAt != null) { + json['lastAccessedAt'] = lastAccessedAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + GetStaffCourseByStaffAndCourseStaffCourses({ + required this.id, + required this.staffId, + required this.courseId, + this.progressPercent, + this.completed, + this.completedAt, + this.startedAt, + this.lastAccessedAt, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class GetStaffCourseByStaffAndCourseData { + final List staffCourses; + GetStaffCourseByStaffAndCourseData.fromJson(dynamic json): + + staffCourses = (json['staffCourses'] as List) + .map((e) => GetStaffCourseByStaffAndCourseStaffCourses.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffCourseByStaffAndCourseData otherTyped = other as GetStaffCourseByStaffAndCourseData; + return staffCourses == otherTyped.staffCourses; + + } + @override + int get hashCode => staffCourses.hashCode; + + + Map toJson() { + Map json = {}; + json['staffCourses'] = staffCourses.map((e) => e.toJson()).toList(); + return json; + } + + GetStaffCourseByStaffAndCourseData({ + required this.staffCourses, + }); +} + +@immutable +class GetStaffCourseByStaffAndCourseVariables { + final String staffId; + final String courseId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffCourseByStaffAndCourseVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + courseId = nativeFromJson(json['courseId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffCourseByStaffAndCourseVariables otherTyped = other as GetStaffCourseByStaffAndCourseVariables; + return staffId == otherTyped.staffId && + courseId == otherTyped.courseId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, courseId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['courseId'] = nativeToJson(courseId); + return json; + } + + GetStaffCourseByStaffAndCourseVariables({ + required this.staffId, + required this.courseId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_document_by_key.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_document_by_key.dart new file mode 100644 index 00000000..092c1eb5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_document_by_key.dart @@ -0,0 +1,238 @@ +part of 'generated.dart'; + +class GetStaffDocumentByKeyVariablesBuilder { + String staffId; + String documentId; + + final FirebaseDataConnect _dataConnect; + GetStaffDocumentByKeyVariablesBuilder(this._dataConnect, {required this.staffId,required this.documentId,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffDocumentByKeyData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffDocumentByKeyVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffDocumentByKeyVariables vars= GetStaffDocumentByKeyVariables(staffId: staffId,documentId: documentId,); + return _dataConnect.query("getStaffDocumentByKey", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffDocumentByKeyStaffDocument { + final String id; + final String staffId; + final String staffName; + final String documentId; + final EnumValue status; + final String? documentUrl; + final Timestamp? expiryDate; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final GetStaffDocumentByKeyStaffDocumentDocument document; + GetStaffDocumentByKeyStaffDocument.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + staffName = nativeFromJson(json['staffName']), + documentId = nativeFromJson(json['documentId']), + status = documentStatusDeserializer(json['status']), + documentUrl = json['documentUrl'] == null ? null : nativeFromJson(json['documentUrl']), + expiryDate = json['expiryDate'] == null ? null : Timestamp.fromJson(json['expiryDate']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + document = GetStaffDocumentByKeyStaffDocumentDocument.fromJson(json['document']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffDocumentByKeyStaffDocument otherTyped = other as GetStaffDocumentByKeyStaffDocument; + return id == otherTyped.id && + staffId == otherTyped.staffId && + staffName == otherTyped.staffName && + documentId == otherTyped.documentId && + status == otherTyped.status && + documentUrl == otherTyped.documentUrl && + expiryDate == otherTyped.expiryDate && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + document == otherTyped.document; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, staffName.hashCode, documentId.hashCode, status.hashCode, documentUrl.hashCode, expiryDate.hashCode, createdAt.hashCode, updatedAt.hashCode, document.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['staffName'] = nativeToJson(staffName); + json['documentId'] = nativeToJson(documentId); + json['status'] = + documentStatusSerializer(status) + ; + if (documentUrl != null) { + json['documentUrl'] = nativeToJson(documentUrl); + } + if (expiryDate != null) { + json['expiryDate'] = expiryDate!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + json['document'] = document.toJson(); + return json; + } + + GetStaffDocumentByKeyStaffDocument({ + required this.id, + required this.staffId, + required this.staffName, + required this.documentId, + required this.status, + this.documentUrl, + this.expiryDate, + this.createdAt, + this.updatedAt, + required this.document, + }); +} + +@immutable +class GetStaffDocumentByKeyStaffDocumentDocument { + final String id; + final String name; + final EnumValue documentType; + final String? description; + GetStaffDocumentByKeyStaffDocumentDocument.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + documentType = documentTypeDeserializer(json['documentType']), + description = json['description'] == null ? null : nativeFromJson(json['description']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffDocumentByKeyStaffDocumentDocument otherTyped = other as GetStaffDocumentByKeyStaffDocumentDocument; + return id == otherTyped.id && + name == otherTyped.name && + documentType == otherTyped.documentType && + description == otherTyped.description; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, documentType.hashCode, description.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['documentType'] = + documentTypeSerializer(documentType) + ; + if (description != null) { + json['description'] = nativeToJson(description); + } + return json; + } + + GetStaffDocumentByKeyStaffDocumentDocument({ + required this.id, + required this.name, + required this.documentType, + this.description, + }); +} + +@immutable +class GetStaffDocumentByKeyData { + final GetStaffDocumentByKeyStaffDocument? staffDocument; + GetStaffDocumentByKeyData.fromJson(dynamic json): + + staffDocument = json['staffDocument'] == null ? null : GetStaffDocumentByKeyStaffDocument.fromJson(json['staffDocument']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffDocumentByKeyData otherTyped = other as GetStaffDocumentByKeyData; + return staffDocument == otherTyped.staffDocument; + + } + @override + int get hashCode => staffDocument.hashCode; + + + Map toJson() { + Map json = {}; + if (staffDocument != null) { + json['staffDocument'] = staffDocument!.toJson(); + } + return json; + } + + GetStaffDocumentByKeyData({ + this.staffDocument, + }); +} + +@immutable +class GetStaffDocumentByKeyVariables { + final String staffId; + final String documentId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffDocumentByKeyVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + documentId = nativeFromJson(json['documentId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffDocumentByKeyVariables otherTyped = other as GetStaffDocumentByKeyVariables; + return staffId == otherTyped.staffId && + documentId == otherTyped.documentId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, documentId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['documentId'] = nativeToJson(documentId); + return json; + } + + GetStaffDocumentByKeyVariables({ + required this.staffId, + required this.documentId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_role_by_key.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_role_by_key.dart new file mode 100644 index 00000000..f4b042ab --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_staff_role_by_key.dart @@ -0,0 +1,268 @@ +part of 'generated.dart'; + +class GetStaffRoleByKeyVariablesBuilder { + String staffId; + String roleId; + + final FirebaseDataConnect _dataConnect; + GetStaffRoleByKeyVariablesBuilder(this._dataConnect, {required this.staffId,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => GetStaffRoleByKeyData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetStaffRoleByKeyVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetStaffRoleByKeyVariables vars= GetStaffRoleByKeyVariables(staffId: staffId,roleId: roleId,); + return _dataConnect.query("getStaffRoleByKey", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetStaffRoleByKeyStaffRole { + final String id; + final String staffId; + final String roleId; + final Timestamp? createdAt; + final EnumValue? roleType; + final GetStaffRoleByKeyStaffRoleStaff staff; + final GetStaffRoleByKeyStaffRoleRole role; + GetStaffRoleByKeyStaffRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + roleType = json['roleType'] == null ? null : roleTypeDeserializer(json['roleType']), + staff = GetStaffRoleByKeyStaffRoleStaff.fromJson(json['staff']), + role = GetStaffRoleByKeyStaffRoleRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffRoleByKeyStaffRole otherTyped = other as GetStaffRoleByKeyStaffRole; + return id == otherTyped.id && + staffId == otherTyped.staffId && + roleId == otherTyped.roleId && + createdAt == otherTyped.createdAt && + roleType == otherTyped.roleType && + staff == otherTyped.staff && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, roleId.hashCode, createdAt.hashCode, roleType.hashCode, staff.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (roleType != null) { + json['roleType'] = + roleTypeSerializer(roleType!) + ; + } + json['staff'] = staff.toJson(); + json['role'] = role.toJson(); + return json; + } + + GetStaffRoleByKeyStaffRole({ + required this.id, + required this.staffId, + required this.roleId, + this.createdAt, + this.roleType, + required this.staff, + required this.role, + }); +} + +@immutable +class GetStaffRoleByKeyStaffRoleStaff { + final String id; + final String fullName; + final String userId; + final String? email; + final String? phone; + GetStaffRoleByKeyStaffRoleStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']), + userId = nativeFromJson(json['userId']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffRoleByKeyStaffRoleStaff otherTyped = other as GetStaffRoleByKeyStaffRoleStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName && + userId == otherTyped.userId && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, userId.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + json['userId'] = nativeToJson(userId); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + GetStaffRoleByKeyStaffRoleStaff({ + required this.id, + required this.fullName, + required this.userId, + this.email, + this.phone, + }); +} + +@immutable +class GetStaffRoleByKeyStaffRoleRole { + final String id; + final String name; + final double costPerHour; + GetStaffRoleByKeyStaffRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffRoleByKeyStaffRoleRole otherTyped = other as GetStaffRoleByKeyStaffRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + GetStaffRoleByKeyStaffRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class GetStaffRoleByKeyData { + final GetStaffRoleByKeyStaffRole? staffRole; + GetStaffRoleByKeyData.fromJson(dynamic json): + + staffRole = json['staffRole'] == null ? null : GetStaffRoleByKeyStaffRole.fromJson(json['staffRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffRoleByKeyData otherTyped = other as GetStaffRoleByKeyData; + return staffRole == otherTyped.staffRole; + + } + @override + int get hashCode => staffRole.hashCode; + + + Map toJson() { + Map json = {}; + if (staffRole != null) { + json['staffRole'] = staffRole!.toJson(); + } + return json; + } + + GetStaffRoleByKeyData({ + this.staffRole, + }); +} + +@immutable +class GetStaffRoleByKeyVariables { + final String staffId; + final String roleId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetStaffRoleByKeyVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetStaffRoleByKeyVariables otherTyped = other as GetStaffRoleByKeyVariables; + return staffId == otherTyped.staffId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + GetStaffRoleByKeyVariables({ + required this.staffId, + required this.roleId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_by_id.dart new file mode 100644 index 00000000..431c5eda --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_by_id.dart @@ -0,0 +1,213 @@ +part of 'generated.dart'; + +class GetTaskByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetTaskByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetTaskByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTaskByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTaskByIdVariables vars= GetTaskByIdVariables(id: id,); + return _dataConnect.query("getTaskById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTaskByIdTask { + final String id; + final String taskName; + final String? description; + final EnumValue priority; + final EnumValue status; + final Timestamp? dueDate; + final int? progress; + final int? orderIndex; + final int? commentCount; + final int? attachmentCount; + final AnyValue? files; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTaskByIdTask.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskName = nativeFromJson(json['taskName']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + priority = taskPriorityDeserializer(json['priority']), + status = taskStatusDeserializer(json['status']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + progress = json['progress'] == null ? null : nativeFromJson(json['progress']), + orderIndex = json['orderIndex'] == null ? null : nativeFromJson(json['orderIndex']), + commentCount = json['commentCount'] == null ? null : nativeFromJson(json['commentCount']), + attachmentCount = json['attachmentCount'] == null ? null : nativeFromJson(json['attachmentCount']), + files = json['files'] == null ? null : AnyValue.fromJson(json['files']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskByIdTask otherTyped = other as GetTaskByIdTask; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + priority == otherTyped.priority && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + orderIndex == otherTyped.orderIndex && + commentCount == otherTyped.commentCount && + attachmentCount == otherTyped.attachmentCount && + files == otherTyped.files && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, priority.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, orderIndex.hashCode, commentCount.hashCode, attachmentCount.hashCode, files.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskName'] = nativeToJson(taskName); + if (description != null) { + json['description'] = nativeToJson(description); + } + json['priority'] = + taskPrioritySerializer(priority) + ; + json['status'] = + taskStatusSerializer(status) + ; + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (progress != null) { + json['progress'] = nativeToJson(progress); + } + if (orderIndex != null) { + json['orderIndex'] = nativeToJson(orderIndex); + } + if (commentCount != null) { + json['commentCount'] = nativeToJson(commentCount); + } + if (attachmentCount != null) { + json['attachmentCount'] = nativeToJson(attachmentCount); + } + if (files != null) { + json['files'] = files!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTaskByIdTask({ + required this.id, + required this.taskName, + this.description, + required this.priority, + required this.status, + this.dueDate, + this.progress, + this.orderIndex, + this.commentCount, + this.attachmentCount, + this.files, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTaskByIdData { + final GetTaskByIdTask? task; + GetTaskByIdData.fromJson(dynamic json): + + task = json['task'] == null ? null : GetTaskByIdTask.fromJson(json['task']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskByIdData otherTyped = other as GetTaskByIdData; + return task == otherTyped.task; + + } + @override + int get hashCode => task.hashCode; + + + Map toJson() { + Map json = {}; + if (task != null) { + json['task'] = task!.toJson(); + } + return json; + } + + GetTaskByIdData({ + this.task, + }); +} + +@immutable +class GetTaskByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTaskByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskByIdVariables otherTyped = other as GetTaskByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetTaskByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_comment_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_comment_by_id.dart new file mode 100644 index 00000000..7bb3f768 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_comment_by_id.dart @@ -0,0 +1,233 @@ +part of 'generated.dart'; + +class GetTaskCommentByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetTaskCommentByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetTaskCommentByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTaskCommentByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTaskCommentByIdVariables vars= GetTaskCommentByIdVariables(id: id,); + return _dataConnect.query("getTaskCommentById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTaskCommentByIdTaskComment { + final String id; + final String taskId; + final String teamMemberId; + final String comment; + final bool isSystem; + final Timestamp? createdAt; + final GetTaskCommentByIdTaskCommentTeamMember teamMember; + GetTaskCommentByIdTaskComment.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskId = nativeFromJson(json['taskId']), + teamMemberId = nativeFromJson(json['teamMemberId']), + comment = nativeFromJson(json['comment']), + isSystem = nativeFromJson(json['isSystem']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + teamMember = GetTaskCommentByIdTaskCommentTeamMember.fromJson(json['teamMember']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentByIdTaskComment otherTyped = other as GetTaskCommentByIdTaskComment; + return id == otherTyped.id && + taskId == otherTyped.taskId && + teamMemberId == otherTyped.teamMemberId && + comment == otherTyped.comment && + isSystem == otherTyped.isSystem && + createdAt == otherTyped.createdAt && + teamMember == otherTyped.teamMember; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskId.hashCode, teamMemberId.hashCode, comment.hashCode, isSystem.hashCode, createdAt.hashCode, teamMember.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskId'] = nativeToJson(taskId); + json['teamMemberId'] = nativeToJson(teamMemberId); + json['comment'] = nativeToJson(comment); + json['isSystem'] = nativeToJson(isSystem); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['teamMember'] = teamMember.toJson(); + return json; + } + + GetTaskCommentByIdTaskComment({ + required this.id, + required this.taskId, + required this.teamMemberId, + required this.comment, + required this.isSystem, + this.createdAt, + required this.teamMember, + }); +} + +@immutable +class GetTaskCommentByIdTaskCommentTeamMember { + final GetTaskCommentByIdTaskCommentTeamMemberUser user; + GetTaskCommentByIdTaskCommentTeamMember.fromJson(dynamic json): + + user = GetTaskCommentByIdTaskCommentTeamMemberUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentByIdTaskCommentTeamMember otherTyped = other as GetTaskCommentByIdTaskCommentTeamMember; + return user == otherTyped.user; + + } + @override + int get hashCode => user.hashCode; + + + Map toJson() { + Map json = {}; + json['user'] = user.toJson(); + return json; + } + + GetTaskCommentByIdTaskCommentTeamMember({ + required this.user, + }); +} + +@immutable +class GetTaskCommentByIdTaskCommentTeamMemberUser { + final String? fullName; + final String? email; + GetTaskCommentByIdTaskCommentTeamMemberUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentByIdTaskCommentTeamMemberUser otherTyped = other as GetTaskCommentByIdTaskCommentTeamMemberUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetTaskCommentByIdTaskCommentTeamMemberUser({ + this.fullName, + this.email, + }); +} + +@immutable +class GetTaskCommentByIdData { + final GetTaskCommentByIdTaskComment? taskComment; + GetTaskCommentByIdData.fromJson(dynamic json): + + taskComment = json['taskComment'] == null ? null : GetTaskCommentByIdTaskComment.fromJson(json['taskComment']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentByIdData otherTyped = other as GetTaskCommentByIdData; + return taskComment == otherTyped.taskComment; + + } + @override + int get hashCode => taskComment.hashCode; + + + Map toJson() { + Map json = {}; + if (taskComment != null) { + json['taskComment'] = taskComment!.toJson(); + } + return json; + } + + GetTaskCommentByIdData({ + this.taskComment, + }); +} + +@immutable +class GetTaskCommentByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTaskCommentByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentByIdVariables otherTyped = other as GetTaskCommentByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetTaskCommentByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_comments_by_task_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_comments_by_task_id.dart new file mode 100644 index 00000000..f2a514e4 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_task_comments_by_task_id.dart @@ -0,0 +1,233 @@ +part of 'generated.dart'; + +class GetTaskCommentsByTaskIdVariablesBuilder { + String taskId; + + final FirebaseDataConnect _dataConnect; + GetTaskCommentsByTaskIdVariablesBuilder(this._dataConnect, {required this.taskId,}); + Deserializer dataDeserializer = (dynamic json) => GetTaskCommentsByTaskIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTaskCommentsByTaskIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTaskCommentsByTaskIdVariables vars= GetTaskCommentsByTaskIdVariables(taskId: taskId,); + return _dataConnect.query("getTaskCommentsByTaskId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTaskCommentsByTaskIdTaskComments { + final String id; + final String taskId; + final String teamMemberId; + final String comment; + final bool isSystem; + final Timestamp? createdAt; + final GetTaskCommentsByTaskIdTaskCommentsTeamMember teamMember; + GetTaskCommentsByTaskIdTaskComments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskId = nativeFromJson(json['taskId']), + teamMemberId = nativeFromJson(json['teamMemberId']), + comment = nativeFromJson(json['comment']), + isSystem = nativeFromJson(json['isSystem']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + teamMember = GetTaskCommentsByTaskIdTaskCommentsTeamMember.fromJson(json['teamMember']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentsByTaskIdTaskComments otherTyped = other as GetTaskCommentsByTaskIdTaskComments; + return id == otherTyped.id && + taskId == otherTyped.taskId && + teamMemberId == otherTyped.teamMemberId && + comment == otherTyped.comment && + isSystem == otherTyped.isSystem && + createdAt == otherTyped.createdAt && + teamMember == otherTyped.teamMember; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskId.hashCode, teamMemberId.hashCode, comment.hashCode, isSystem.hashCode, createdAt.hashCode, teamMember.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskId'] = nativeToJson(taskId); + json['teamMemberId'] = nativeToJson(teamMemberId); + json['comment'] = nativeToJson(comment); + json['isSystem'] = nativeToJson(isSystem); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['teamMember'] = teamMember.toJson(); + return json; + } + + GetTaskCommentsByTaskIdTaskComments({ + required this.id, + required this.taskId, + required this.teamMemberId, + required this.comment, + required this.isSystem, + this.createdAt, + required this.teamMember, + }); +} + +@immutable +class GetTaskCommentsByTaskIdTaskCommentsTeamMember { + final GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser user; + GetTaskCommentsByTaskIdTaskCommentsTeamMember.fromJson(dynamic json): + + user = GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentsByTaskIdTaskCommentsTeamMember otherTyped = other as GetTaskCommentsByTaskIdTaskCommentsTeamMember; + return user == otherTyped.user; + + } + @override + int get hashCode => user.hashCode; + + + Map toJson() { + Map json = {}; + json['user'] = user.toJson(); + return json; + } + + GetTaskCommentsByTaskIdTaskCommentsTeamMember({ + required this.user, + }); +} + +@immutable +class GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser { + final String? fullName; + final String? email; + GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser otherTyped = other as GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetTaskCommentsByTaskIdTaskCommentsTeamMemberUser({ + this.fullName, + this.email, + }); +} + +@immutable +class GetTaskCommentsByTaskIdData { + final List taskComments; + GetTaskCommentsByTaskIdData.fromJson(dynamic json): + + taskComments = (json['taskComments'] as List) + .map((e) => GetTaskCommentsByTaskIdTaskComments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentsByTaskIdData otherTyped = other as GetTaskCommentsByTaskIdData; + return taskComments == otherTyped.taskComments; + + } + @override + int get hashCode => taskComments.hashCode; + + + Map toJson() { + Map json = {}; + json['taskComments'] = taskComments.map((e) => e.toJson()).toList(); + return json; + } + + GetTaskCommentsByTaskIdData({ + required this.taskComments, + }); +} + +@immutable +class GetTaskCommentsByTaskIdVariables { + final String taskId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTaskCommentsByTaskIdVariables.fromJson(Map json): + + taskId = nativeFromJson(json['taskId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaskCommentsByTaskIdVariables otherTyped = other as GetTaskCommentsByTaskIdVariables; + return taskId == otherTyped.taskId; + + } + @override + int get hashCode => taskId.hashCode; + + + Map toJson() { + Map json = {}; + json['taskId'] = nativeToJson(taskId); + return json; + } + + GetTaskCommentsByTaskIdVariables({ + required this.taskId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_tasks_by_owner_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_tasks_by_owner_id.dart new file mode 100644 index 00000000..5da6f4c6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_tasks_by_owner_id.dart @@ -0,0 +1,213 @@ +part of 'generated.dart'; + +class GetTasksByOwnerIdVariablesBuilder { + String ownerId; + + final FirebaseDataConnect _dataConnect; + GetTasksByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => GetTasksByOwnerIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTasksByOwnerIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTasksByOwnerIdVariables vars= GetTasksByOwnerIdVariables(ownerId: ownerId,); + return _dataConnect.query("getTasksByOwnerId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTasksByOwnerIdTasks { + final String id; + final String taskName; + final String? description; + final EnumValue priority; + final EnumValue status; + final Timestamp? dueDate; + final int? progress; + final int? orderIndex; + final int? commentCount; + final int? attachmentCount; + final AnyValue? files; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTasksByOwnerIdTasks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskName = nativeFromJson(json['taskName']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + priority = taskPriorityDeserializer(json['priority']), + status = taskStatusDeserializer(json['status']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + progress = json['progress'] == null ? null : nativeFromJson(json['progress']), + orderIndex = json['orderIndex'] == null ? null : nativeFromJson(json['orderIndex']), + commentCount = json['commentCount'] == null ? null : nativeFromJson(json['commentCount']), + attachmentCount = json['attachmentCount'] == null ? null : nativeFromJson(json['attachmentCount']), + files = json['files'] == null ? null : AnyValue.fromJson(json['files']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTasksByOwnerIdTasks otherTyped = other as GetTasksByOwnerIdTasks; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + priority == otherTyped.priority && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + orderIndex == otherTyped.orderIndex && + commentCount == otherTyped.commentCount && + attachmentCount == otherTyped.attachmentCount && + files == otherTyped.files && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, priority.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, orderIndex.hashCode, commentCount.hashCode, attachmentCount.hashCode, files.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskName'] = nativeToJson(taskName); + if (description != null) { + json['description'] = nativeToJson(description); + } + json['priority'] = + taskPrioritySerializer(priority) + ; + json['status'] = + taskStatusSerializer(status) + ; + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (progress != null) { + json['progress'] = nativeToJson(progress); + } + if (orderIndex != null) { + json['orderIndex'] = nativeToJson(orderIndex); + } + if (commentCount != null) { + json['commentCount'] = nativeToJson(commentCount); + } + if (attachmentCount != null) { + json['attachmentCount'] = nativeToJson(attachmentCount); + } + if (files != null) { + json['files'] = files!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTasksByOwnerIdTasks({ + required this.id, + required this.taskName, + this.description, + required this.priority, + required this.status, + this.dueDate, + this.progress, + this.orderIndex, + this.commentCount, + this.attachmentCount, + this.files, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTasksByOwnerIdData { + final List tasks; + GetTasksByOwnerIdData.fromJson(dynamic json): + + tasks = (json['tasks'] as List) + .map((e) => GetTasksByOwnerIdTasks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTasksByOwnerIdData otherTyped = other as GetTasksByOwnerIdData; + return tasks == otherTyped.tasks; + + } + @override + int get hashCode => tasks.hashCode; + + + Map toJson() { + Map json = {}; + json['tasks'] = tasks.map((e) => e.toJson()).toList(); + return json; + } + + GetTasksByOwnerIdData({ + required this.tasks, + }); +} + +@immutable +class GetTasksByOwnerIdVariables { + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTasksByOwnerIdVariables.fromJson(Map json): + + ownerId = nativeFromJson(json['ownerId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTasksByOwnerIdVariables otherTyped = other as GetTasksByOwnerIdVariables; + return ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => ownerId.hashCode; + + + Map toJson() { + Map json = {}; + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + GetTasksByOwnerIdVariables({ + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_tax_form_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_tax_form_by_id.dart new file mode 100644 index 00000000..83d40b89 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_tax_form_by_id.dart @@ -0,0 +1,190 @@ +part of 'generated.dart'; + +class GetTaxFormByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetTaxFormByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetTaxFormByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTaxFormByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTaxFormByIdVariables vars= GetTaxFormByIdVariables(id: id,); + return _dataConnect.query("getTaxFormById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTaxFormByIdTaxForm { + final String id; + final EnumValue formType; + final String title; + final String? subtitle; + final String? description; + final EnumValue status; + final String staffId; + final AnyValue? formData; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTaxFormByIdTaxForm.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + formType = taxFormTypeDeserializer(json['formType']), + title = nativeFromJson(json['title']), + subtitle = json['subtitle'] == null ? null : nativeFromJson(json['subtitle']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = taxFormStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + formData = json['formData'] == null ? null : AnyValue.fromJson(json['formData']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaxFormByIdTaxForm otherTyped = other as GetTaxFormByIdTaxForm; + return id == otherTyped.id && + formType == otherTyped.formType && + title == otherTyped.title && + subtitle == otherTyped.subtitle && + description == otherTyped.description && + status == otherTyped.status && + staffId == otherTyped.staffId && + formData == otherTyped.formData && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, formType.hashCode, title.hashCode, subtitle.hashCode, description.hashCode, status.hashCode, staffId.hashCode, formData.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['formType'] = + taxFormTypeSerializer(formType) + ; + json['title'] = nativeToJson(title); + if (subtitle != null) { + json['subtitle'] = nativeToJson(subtitle); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['status'] = + taxFormStatusSerializer(status) + ; + json['staffId'] = nativeToJson(staffId); + if (formData != null) { + json['formData'] = formData!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTaxFormByIdTaxForm({ + required this.id, + required this.formType, + required this.title, + this.subtitle, + this.description, + required this.status, + required this.staffId, + this.formData, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTaxFormByIdData { + final GetTaxFormByIdTaxForm? taxForm; + GetTaxFormByIdData.fromJson(dynamic json): + + taxForm = json['taxForm'] == null ? null : GetTaxFormByIdTaxForm.fromJson(json['taxForm']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaxFormByIdData otherTyped = other as GetTaxFormByIdData; + return taxForm == otherTyped.taxForm; + + } + @override + int get hashCode => taxForm.hashCode; + + + Map toJson() { + Map json = {}; + if (taxForm != null) { + json['taxForm'] = taxForm!.toJson(); + } + return json; + } + + GetTaxFormByIdData({ + this.taxForm, + }); +} + +@immutable +class GetTaxFormByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTaxFormByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaxFormByIdVariables otherTyped = other as GetTaxFormByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetTaxFormByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_tax_forms_bystaff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_tax_forms_bystaff_id.dart new file mode 100644 index 00000000..c9be080e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_tax_forms_bystaff_id.dart @@ -0,0 +1,190 @@ +part of 'generated.dart'; + +class GetTaxFormsBystaffIdVariablesBuilder { + String staffId; + + final FirebaseDataConnect _dataConnect; + GetTaxFormsBystaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => GetTaxFormsBystaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTaxFormsBystaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTaxFormsBystaffIdVariables vars= GetTaxFormsBystaffIdVariables(staffId: staffId,); + return _dataConnect.query("getTaxFormsBystaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTaxFormsBystaffIdTaxForms { + final String id; + final EnumValue formType; + final String title; + final String? subtitle; + final String? description; + final EnumValue status; + final String staffId; + final AnyValue? formData; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTaxFormsBystaffIdTaxForms.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + formType = taxFormTypeDeserializer(json['formType']), + title = nativeFromJson(json['title']), + subtitle = json['subtitle'] == null ? null : nativeFromJson(json['subtitle']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = taxFormStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + formData = json['formData'] == null ? null : AnyValue.fromJson(json['formData']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaxFormsBystaffIdTaxForms otherTyped = other as GetTaxFormsBystaffIdTaxForms; + return id == otherTyped.id && + formType == otherTyped.formType && + title == otherTyped.title && + subtitle == otherTyped.subtitle && + description == otherTyped.description && + status == otherTyped.status && + staffId == otherTyped.staffId && + formData == otherTyped.formData && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, formType.hashCode, title.hashCode, subtitle.hashCode, description.hashCode, status.hashCode, staffId.hashCode, formData.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['formType'] = + taxFormTypeSerializer(formType) + ; + json['title'] = nativeToJson(title); + if (subtitle != null) { + json['subtitle'] = nativeToJson(subtitle); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['status'] = + taxFormStatusSerializer(status) + ; + json['staffId'] = nativeToJson(staffId); + if (formData != null) { + json['formData'] = formData!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTaxFormsBystaffIdTaxForms({ + required this.id, + required this.formType, + required this.title, + this.subtitle, + this.description, + required this.status, + required this.staffId, + this.formData, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTaxFormsBystaffIdData { + final List taxForms; + GetTaxFormsBystaffIdData.fromJson(dynamic json): + + taxForms = (json['taxForms'] as List) + .map((e) => GetTaxFormsBystaffIdTaxForms.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaxFormsBystaffIdData otherTyped = other as GetTaxFormsBystaffIdData; + return taxForms == otherTyped.taxForms; + + } + @override + int get hashCode => taxForms.hashCode; + + + Map toJson() { + Map json = {}; + json['taxForms'] = taxForms.map((e) => e.toJson()).toList(); + return json; + } + + GetTaxFormsBystaffIdData({ + required this.taxForms, + }); +} + +@immutable +class GetTaxFormsBystaffIdVariables { + final String staffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTaxFormsBystaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTaxFormsBystaffIdVariables otherTyped = other as GetTaxFormsBystaffIdVariables; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + GetTaxFormsBystaffIdVariables({ + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_by_id.dart new file mode 100644 index 00000000..8a449009 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_by_id.dart @@ -0,0 +1,235 @@ +part of 'generated.dart'; + +class GetTeamByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetTeamByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetTeamByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTeamByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTeamByIdVariables vars= GetTeamByIdVariables(id: id,); + return _dataConnect.query("getTeamById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTeamByIdTeam { + final String id; + final String teamName; + final String ownerId; + final String ownerName; + final String ownerRole; + final String? email; + final String? companyLogo; + final int? totalMembers; + final int? activeMembers; + final int? totalHubs; + final AnyValue? departments; + final int? favoriteStaffCount; + final int? blockedStaffCount; + final AnyValue? favoriteStaff; + final AnyValue? blockedStaff; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTeamByIdTeam.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamName = nativeFromJson(json['teamName']), + ownerId = nativeFromJson(json['ownerId']), + ownerName = nativeFromJson(json['ownerName']), + ownerRole = nativeFromJson(json['ownerRole']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + companyLogo = json['companyLogo'] == null ? null : nativeFromJson(json['companyLogo']), + totalMembers = json['totalMembers'] == null ? null : nativeFromJson(json['totalMembers']), + activeMembers = json['activeMembers'] == null ? null : nativeFromJson(json['activeMembers']), + totalHubs = json['totalHubs'] == null ? null : nativeFromJson(json['totalHubs']), + departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), + favoriteStaffCount = json['favoriteStaffCount'] == null ? null : nativeFromJson(json['favoriteStaffCount']), + blockedStaffCount = json['blockedStaffCount'] == null ? null : nativeFromJson(json['blockedStaffCount']), + favoriteStaff = json['favoriteStaff'] == null ? null : AnyValue.fromJson(json['favoriteStaff']), + blockedStaff = json['blockedStaff'] == null ? null : AnyValue.fromJson(json['blockedStaff']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamByIdTeam otherTyped = other as GetTeamByIdTeam; + return id == otherTyped.id && + teamName == otherTyped.teamName && + ownerId == otherTyped.ownerId && + ownerName == otherTyped.ownerName && + ownerRole == otherTyped.ownerRole && + email == otherTyped.email && + companyLogo == otherTyped.companyLogo && + totalMembers == otherTyped.totalMembers && + activeMembers == otherTyped.activeMembers && + totalHubs == otherTyped.totalHubs && + departments == otherTyped.departments && + favoriteStaffCount == otherTyped.favoriteStaffCount && + blockedStaffCount == otherTyped.blockedStaffCount && + favoriteStaff == otherTyped.favoriteStaff && + blockedStaff == otherTyped.blockedStaff && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamName.hashCode, ownerId.hashCode, ownerName.hashCode, ownerRole.hashCode, email.hashCode, companyLogo.hashCode, totalMembers.hashCode, activeMembers.hashCode, totalHubs.hashCode, departments.hashCode, favoriteStaffCount.hashCode, blockedStaffCount.hashCode, favoriteStaff.hashCode, blockedStaff.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamName'] = nativeToJson(teamName); + json['ownerId'] = nativeToJson(ownerId); + json['ownerName'] = nativeToJson(ownerName); + json['ownerRole'] = nativeToJson(ownerRole); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (companyLogo != null) { + json['companyLogo'] = nativeToJson(companyLogo); + } + if (totalMembers != null) { + json['totalMembers'] = nativeToJson(totalMembers); + } + if (activeMembers != null) { + json['activeMembers'] = nativeToJson(activeMembers); + } + if (totalHubs != null) { + json['totalHubs'] = nativeToJson(totalHubs); + } + if (departments != null) { + json['departments'] = departments!.toJson(); + } + if (favoriteStaffCount != null) { + json['favoriteStaffCount'] = nativeToJson(favoriteStaffCount); + } + if (blockedStaffCount != null) { + json['blockedStaffCount'] = nativeToJson(blockedStaffCount); + } + if (favoriteStaff != null) { + json['favoriteStaff'] = favoriteStaff!.toJson(); + } + if (blockedStaff != null) { + json['blockedStaff'] = blockedStaff!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTeamByIdTeam({ + required this.id, + required this.teamName, + required this.ownerId, + required this.ownerName, + required this.ownerRole, + this.email, + this.companyLogo, + this.totalMembers, + this.activeMembers, + this.totalHubs, + this.departments, + this.favoriteStaffCount, + this.blockedStaffCount, + this.favoriteStaff, + this.blockedStaff, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTeamByIdData { + final GetTeamByIdTeam? team; + GetTeamByIdData.fromJson(dynamic json): + + team = json['team'] == null ? null : GetTeamByIdTeam.fromJson(json['team']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamByIdData otherTyped = other as GetTeamByIdData; + return team == otherTyped.team; + + } + @override + int get hashCode => team.hashCode; + + + Map toJson() { + Map json = {}; + if (team != null) { + json['team'] = team!.toJson(); + } + return json; + } + + GetTeamByIdData({ + this.team, + }); +} + +@immutable +class GetTeamByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTeamByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamByIdVariables otherTyped = other as GetTeamByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetTeamByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hub_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hub_by_id.dart new file mode 100644 index 00000000..34b6452a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hub_by_id.dart @@ -0,0 +1,192 @@ +part of 'generated.dart'; + +class GetTeamHubByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetTeamHubByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetTeamHubByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTeamHubByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTeamHubByIdVariables vars= GetTeamHubByIdVariables(id: id,); + return _dataConnect.query("getTeamHubById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTeamHubByIdTeamHub { + final String id; + final String teamId; + final String hubName; + final String address; + final String city; + final String state; + final String zipCode; + final String managerName; + final bool isActive; + final AnyValue? departments; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTeamHubByIdTeamHub.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamId = nativeFromJson(json['teamId']), + hubName = nativeFromJson(json['hubName']), + address = nativeFromJson(json['address']), + city = nativeFromJson(json['city']), + state = nativeFromJson(json['state']), + zipCode = nativeFromJson(json['zipCode']), + managerName = nativeFromJson(json['managerName']), + isActive = nativeFromJson(json['isActive']), + departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHubByIdTeamHub otherTyped = other as GetTeamHubByIdTeamHub; + return id == otherTyped.id && + teamId == otherTyped.teamId && + hubName == otherTyped.hubName && + address == otherTyped.address && + city == otherTyped.city && + state == otherTyped.state && + zipCode == otherTyped.zipCode && + managerName == otherTyped.managerName && + isActive == otherTyped.isActive && + departments == otherTyped.departments && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamId'] = nativeToJson(teamId); + json['hubName'] = nativeToJson(hubName); + json['address'] = nativeToJson(address); + json['city'] = nativeToJson(city); + json['state'] = nativeToJson(state); + json['zipCode'] = nativeToJson(zipCode); + json['managerName'] = nativeToJson(managerName); + json['isActive'] = nativeToJson(isActive); + if (departments != null) { + json['departments'] = departments!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTeamHubByIdTeamHub({ + required this.id, + required this.teamId, + required this.hubName, + required this.address, + required this.city, + required this.state, + required this.zipCode, + required this.managerName, + required this.isActive, + this.departments, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTeamHubByIdData { + final GetTeamHubByIdTeamHub? teamHub; + GetTeamHubByIdData.fromJson(dynamic json): + + teamHub = json['teamHub'] == null ? null : GetTeamHubByIdTeamHub.fromJson(json['teamHub']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHubByIdData otherTyped = other as GetTeamHubByIdData; + return teamHub == otherTyped.teamHub; + + } + @override + int get hashCode => teamHub.hashCode; + + + Map toJson() { + Map json = {}; + if (teamHub != null) { + json['teamHub'] = teamHub!.toJson(); + } + return json; + } + + GetTeamHubByIdData({ + this.teamHub, + }); +} + +@immutable +class GetTeamHubByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTeamHubByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHubByIdVariables otherTyped = other as GetTeamHubByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetTeamHubByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hubs_by_team_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hubs_by_team_id.dart new file mode 100644 index 00000000..34ab0d41 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hubs_by_team_id.dart @@ -0,0 +1,192 @@ +part of 'generated.dart'; + +class GetTeamHubsByTeamIdVariablesBuilder { + String teamId; + + final FirebaseDataConnect _dataConnect; + GetTeamHubsByTeamIdVariablesBuilder(this._dataConnect, {required this.teamId,}); + Deserializer dataDeserializer = (dynamic json) => GetTeamHubsByTeamIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTeamHubsByTeamIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTeamHubsByTeamIdVariables vars= GetTeamHubsByTeamIdVariables(teamId: teamId,); + return _dataConnect.query("getTeamHubsByTeamId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTeamHubsByTeamIdTeamHubs { + final String id; + final String teamId; + final String hubName; + final String address; + final String city; + final String state; + final String zipCode; + final String managerName; + final bool isActive; + final AnyValue? departments; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTeamHubsByTeamIdTeamHubs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamId = nativeFromJson(json['teamId']), + hubName = nativeFromJson(json['hubName']), + address = nativeFromJson(json['address']), + city = nativeFromJson(json['city']), + state = nativeFromJson(json['state']), + zipCode = nativeFromJson(json['zipCode']), + managerName = nativeFromJson(json['managerName']), + isActive = nativeFromJson(json['isActive']), + departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHubsByTeamIdTeamHubs otherTyped = other as GetTeamHubsByTeamIdTeamHubs; + return id == otherTyped.id && + teamId == otherTyped.teamId && + hubName == otherTyped.hubName && + address == otherTyped.address && + city == otherTyped.city && + state == otherTyped.state && + zipCode == otherTyped.zipCode && + managerName == otherTyped.managerName && + isActive == otherTyped.isActive && + departments == otherTyped.departments && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamId'] = nativeToJson(teamId); + json['hubName'] = nativeToJson(hubName); + json['address'] = nativeToJson(address); + json['city'] = nativeToJson(city); + json['state'] = nativeToJson(state); + json['zipCode'] = nativeToJson(zipCode); + json['managerName'] = nativeToJson(managerName); + json['isActive'] = nativeToJson(isActive); + if (departments != null) { + json['departments'] = departments!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTeamHubsByTeamIdTeamHubs({ + required this.id, + required this.teamId, + required this.hubName, + required this.address, + required this.city, + required this.state, + required this.zipCode, + required this.managerName, + required this.isActive, + this.departments, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTeamHubsByTeamIdData { + final List teamHubs; + GetTeamHubsByTeamIdData.fromJson(dynamic json): + + teamHubs = (json['teamHubs'] as List) + .map((e) => GetTeamHubsByTeamIdTeamHubs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHubsByTeamIdData otherTyped = other as GetTeamHubsByTeamIdData; + return teamHubs == otherTyped.teamHubs; + + } + @override + int get hashCode => teamHubs.hashCode; + + + Map toJson() { + Map json = {}; + json['teamHubs'] = teamHubs.map((e) => e.toJson()).toList(); + return json; + } + + GetTeamHubsByTeamIdData({ + required this.teamHubs, + }); +} + +@immutable +class GetTeamHubsByTeamIdVariables { + final String teamId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTeamHubsByTeamIdVariables.fromJson(Map json): + + teamId = nativeFromJson(json['teamId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHubsByTeamIdVariables otherTyped = other as GetTeamHubsByTeamIdVariables; + return teamId == otherTyped.teamId; + + } + @override + int get hashCode => teamId.hashCode; + + + Map toJson() { + Map json = {}; + json['teamId'] = nativeToJson(teamId); + return json; + } + + GetTeamHubsByTeamIdVariables({ + required this.teamId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hud_department_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hud_department_by_id.dart new file mode 100644 index 00000000..cc4aa27d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_hud_department_by_id.dart @@ -0,0 +1,192 @@ +part of 'generated.dart'; + +class GetTeamHudDepartmentByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetTeamHudDepartmentByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetTeamHudDepartmentByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTeamHudDepartmentByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTeamHudDepartmentByIdVariables vars= GetTeamHudDepartmentByIdVariables(id: id,); + return _dataConnect.query("getTeamHudDepartmentById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTeamHudDepartmentByIdTeamHudDepartment { + final String id; + final String name; + final String? costCenter; + final String teamHubId; + final GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub teamHub; + final Timestamp? createdAt; + GetTeamHudDepartmentByIdTeamHudDepartment.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costCenter = json['costCenter'] == null ? null : nativeFromJson(json['costCenter']), + teamHubId = nativeFromJson(json['teamHubId']), + teamHub = GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub.fromJson(json['teamHub']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHudDepartmentByIdTeamHudDepartment otherTyped = other as GetTeamHudDepartmentByIdTeamHudDepartment; + return id == otherTyped.id && + name == otherTyped.name && + costCenter == otherTyped.costCenter && + teamHubId == otherTyped.teamHubId && + teamHub == otherTyped.teamHub && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costCenter.hashCode, teamHubId.hashCode, teamHub.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (costCenter != null) { + json['costCenter'] = nativeToJson(costCenter); + } + json['teamHubId'] = nativeToJson(teamHubId); + json['teamHub'] = teamHub.toJson(); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + GetTeamHudDepartmentByIdTeamHudDepartment({ + required this.id, + required this.name, + this.costCenter, + required this.teamHubId, + required this.teamHub, + this.createdAt, + }); +} + +@immutable +class GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub { + final String id; + final String hubName; + GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + hubName = nativeFromJson(json['hubName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub otherTyped = other as GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub; + return id == otherTyped.id && + hubName == otherTyped.hubName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, hubName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['hubName'] = nativeToJson(hubName); + return json; + } + + GetTeamHudDepartmentByIdTeamHudDepartmentTeamHub({ + required this.id, + required this.hubName, + }); +} + +@immutable +class GetTeamHudDepartmentByIdData { + final GetTeamHudDepartmentByIdTeamHudDepartment? teamHudDepartment; + GetTeamHudDepartmentByIdData.fromJson(dynamic json): + + teamHudDepartment = json['teamHudDepartment'] == null ? null : GetTeamHudDepartmentByIdTeamHudDepartment.fromJson(json['teamHudDepartment']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHudDepartmentByIdData otherTyped = other as GetTeamHudDepartmentByIdData; + return teamHudDepartment == otherTyped.teamHudDepartment; + + } + @override + int get hashCode => teamHudDepartment.hashCode; + + + Map toJson() { + Map json = {}; + if (teamHudDepartment != null) { + json['teamHudDepartment'] = teamHudDepartment!.toJson(); + } + return json; + } + + GetTeamHudDepartmentByIdData({ + this.teamHudDepartment, + }); +} + +@immutable +class GetTeamHudDepartmentByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTeamHudDepartmentByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamHudDepartmentByIdVariables otherTyped = other as GetTeamHudDepartmentByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetTeamHudDepartmentByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_member_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_member_by_id.dart new file mode 100644 index 00000000..aa74a564 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_member_by_id.dart @@ -0,0 +1,260 @@ +part of 'generated.dart'; + +class GetTeamMemberByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetTeamMemberByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetTeamMemberByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTeamMemberByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTeamMemberByIdVariables vars= GetTeamMemberByIdVariables(id: id,); + return _dataConnect.query("getTeamMemberById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTeamMemberByIdTeamMember { + final String id; + final String teamId; + final EnumValue role; + final String? title; + final String? department; + final String? teamHubId; + final bool? isActive; + final Timestamp? createdAt; + final GetTeamMemberByIdTeamMemberUser user; + final GetTeamMemberByIdTeamMemberTeamHub? teamHub; + GetTeamMemberByIdTeamMember.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamId = nativeFromJson(json['teamId']), + role = teamMemberRoleDeserializer(json['role']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + teamHubId = json['teamHubId'] == null ? null : nativeFromJson(json['teamHubId']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + user = GetTeamMemberByIdTeamMemberUser.fromJson(json['user']), + teamHub = json['teamHub'] == null ? null : GetTeamMemberByIdTeamMemberTeamHub.fromJson(json['teamHub']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMemberByIdTeamMember otherTyped = other as GetTeamMemberByIdTeamMember; + return id == otherTyped.id && + teamId == otherTyped.teamId && + role == otherTyped.role && + title == otherTyped.title && + department == otherTyped.department && + teamHubId == otherTyped.teamHubId && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + user == otherTyped.user && + teamHub == otherTyped.teamHub; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, createdAt.hashCode, user.hashCode, teamHub.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamId'] = nativeToJson(teamId); + json['role'] = + teamMemberRoleSerializer(role) + ; + if (title != null) { + json['title'] = nativeToJson(title); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (teamHubId != null) { + json['teamHubId'] = nativeToJson(teamHubId); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['user'] = user.toJson(); + if (teamHub != null) { + json['teamHub'] = teamHub!.toJson(); + } + return json; + } + + GetTeamMemberByIdTeamMember({ + required this.id, + required this.teamId, + required this.role, + this.title, + this.department, + this.teamHubId, + this.isActive, + this.createdAt, + required this.user, + this.teamHub, + }); +} + +@immutable +class GetTeamMemberByIdTeamMemberUser { + final String? fullName; + final String? email; + GetTeamMemberByIdTeamMemberUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMemberByIdTeamMemberUser otherTyped = other as GetTeamMemberByIdTeamMemberUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetTeamMemberByIdTeamMemberUser({ + this.fullName, + this.email, + }); +} + +@immutable +class GetTeamMemberByIdTeamMemberTeamHub { + final String hubName; + GetTeamMemberByIdTeamMemberTeamHub.fromJson(dynamic json): + + hubName = nativeFromJson(json['hubName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMemberByIdTeamMemberTeamHub otherTyped = other as GetTeamMemberByIdTeamMemberTeamHub; + return hubName == otherTyped.hubName; + + } + @override + int get hashCode => hubName.hashCode; + + + Map toJson() { + Map json = {}; + json['hubName'] = nativeToJson(hubName); + return json; + } + + GetTeamMemberByIdTeamMemberTeamHub({ + required this.hubName, + }); +} + +@immutable +class GetTeamMemberByIdData { + final GetTeamMemberByIdTeamMember? teamMember; + GetTeamMemberByIdData.fromJson(dynamic json): + + teamMember = json['teamMember'] == null ? null : GetTeamMemberByIdTeamMember.fromJson(json['teamMember']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMemberByIdData otherTyped = other as GetTeamMemberByIdData; + return teamMember == otherTyped.teamMember; + + } + @override + int get hashCode => teamMember.hashCode; + + + Map toJson() { + Map json = {}; + if (teamMember != null) { + json['teamMember'] = teamMember!.toJson(); + } + return json; + } + + GetTeamMemberByIdData({ + this.teamMember, + }); +} + +@immutable +class GetTeamMemberByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTeamMemberByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMemberByIdVariables otherTyped = other as GetTeamMemberByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetTeamMemberByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_members_by_team_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_members_by_team_id.dart new file mode 100644 index 00000000..72939378 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_team_members_by_team_id.dart @@ -0,0 +1,260 @@ +part of 'generated.dart'; + +class GetTeamMembersByTeamIdVariablesBuilder { + String teamId; + + final FirebaseDataConnect _dataConnect; + GetTeamMembersByTeamIdVariablesBuilder(this._dataConnect, {required this.teamId,}); + Deserializer dataDeserializer = (dynamic json) => GetTeamMembersByTeamIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTeamMembersByTeamIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTeamMembersByTeamIdVariables vars= GetTeamMembersByTeamIdVariables(teamId: teamId,); + return _dataConnect.query("getTeamMembersByTeamId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTeamMembersByTeamIdTeamMembers { + final String id; + final String teamId; + final EnumValue role; + final String? title; + final String? department; + final String? teamHubId; + final bool? isActive; + final Timestamp? createdAt; + final GetTeamMembersByTeamIdTeamMembersUser user; + final GetTeamMembersByTeamIdTeamMembersTeamHub? teamHub; + GetTeamMembersByTeamIdTeamMembers.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamId = nativeFromJson(json['teamId']), + role = teamMemberRoleDeserializer(json['role']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + teamHubId = json['teamHubId'] == null ? null : nativeFromJson(json['teamHubId']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + user = GetTeamMembersByTeamIdTeamMembersUser.fromJson(json['user']), + teamHub = json['teamHub'] == null ? null : GetTeamMembersByTeamIdTeamMembersTeamHub.fromJson(json['teamHub']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMembersByTeamIdTeamMembers otherTyped = other as GetTeamMembersByTeamIdTeamMembers; + return id == otherTyped.id && + teamId == otherTyped.teamId && + role == otherTyped.role && + title == otherTyped.title && + department == otherTyped.department && + teamHubId == otherTyped.teamHubId && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + user == otherTyped.user && + teamHub == otherTyped.teamHub; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, createdAt.hashCode, user.hashCode, teamHub.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamId'] = nativeToJson(teamId); + json['role'] = + teamMemberRoleSerializer(role) + ; + if (title != null) { + json['title'] = nativeToJson(title); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (teamHubId != null) { + json['teamHubId'] = nativeToJson(teamHubId); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['user'] = user.toJson(); + if (teamHub != null) { + json['teamHub'] = teamHub!.toJson(); + } + return json; + } + + GetTeamMembersByTeamIdTeamMembers({ + required this.id, + required this.teamId, + required this.role, + this.title, + this.department, + this.teamHubId, + this.isActive, + this.createdAt, + required this.user, + this.teamHub, + }); +} + +@immutable +class GetTeamMembersByTeamIdTeamMembersUser { + final String? fullName; + final String? email; + GetTeamMembersByTeamIdTeamMembersUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMembersByTeamIdTeamMembersUser otherTyped = other as GetTeamMembersByTeamIdTeamMembersUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + GetTeamMembersByTeamIdTeamMembersUser({ + this.fullName, + this.email, + }); +} + +@immutable +class GetTeamMembersByTeamIdTeamMembersTeamHub { + final String hubName; + GetTeamMembersByTeamIdTeamMembersTeamHub.fromJson(dynamic json): + + hubName = nativeFromJson(json['hubName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMembersByTeamIdTeamMembersTeamHub otherTyped = other as GetTeamMembersByTeamIdTeamMembersTeamHub; + return hubName == otherTyped.hubName; + + } + @override + int get hashCode => hubName.hashCode; + + + Map toJson() { + Map json = {}; + json['hubName'] = nativeToJson(hubName); + return json; + } + + GetTeamMembersByTeamIdTeamMembersTeamHub({ + required this.hubName, + }); +} + +@immutable +class GetTeamMembersByTeamIdData { + final List teamMembers; + GetTeamMembersByTeamIdData.fromJson(dynamic json): + + teamMembers = (json['teamMembers'] as List) + .map((e) => GetTeamMembersByTeamIdTeamMembers.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMembersByTeamIdData otherTyped = other as GetTeamMembersByTeamIdData; + return teamMembers == otherTyped.teamMembers; + + } + @override + int get hashCode => teamMembers.hashCode; + + + Map toJson() { + Map json = {}; + json['teamMembers'] = teamMembers.map((e) => e.toJson()).toList(); + return json; + } + + GetTeamMembersByTeamIdData({ + required this.teamMembers, + }); +} + +@immutable +class GetTeamMembersByTeamIdVariables { + final String teamId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTeamMembersByTeamIdVariables.fromJson(Map json): + + teamId = nativeFromJson(json['teamId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamMembersByTeamIdVariables otherTyped = other as GetTeamMembersByTeamIdVariables; + return teamId == otherTyped.teamId; + + } + @override + int get hashCode => teamId.hashCode; + + + Map toJson() { + Map json = {}; + json['teamId'] = nativeToJson(teamId); + return json; + } + + GetTeamMembersByTeamIdVariables({ + required this.teamId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_teams_by_owner_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_teams_by_owner_id.dart new file mode 100644 index 00000000..cf4f44bc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_teams_by_owner_id.dart @@ -0,0 +1,235 @@ +part of 'generated.dart'; + +class GetTeamsByOwnerIdVariablesBuilder { + String ownerId; + + final FirebaseDataConnect _dataConnect; + GetTeamsByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => GetTeamsByOwnerIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetTeamsByOwnerIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetTeamsByOwnerIdVariables vars= GetTeamsByOwnerIdVariables(ownerId: ownerId,); + return _dataConnect.query("getTeamsByOwnerId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetTeamsByOwnerIdTeams { + final String id; + final String teamName; + final String ownerId; + final String ownerName; + final String ownerRole; + final String? email; + final String? companyLogo; + final int? totalMembers; + final int? activeMembers; + final int? totalHubs; + final AnyValue? departments; + final int? favoriteStaffCount; + final int? blockedStaffCount; + final AnyValue? favoriteStaff; + final AnyValue? blockedStaff; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetTeamsByOwnerIdTeams.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamName = nativeFromJson(json['teamName']), + ownerId = nativeFromJson(json['ownerId']), + ownerName = nativeFromJson(json['ownerName']), + ownerRole = nativeFromJson(json['ownerRole']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + companyLogo = json['companyLogo'] == null ? null : nativeFromJson(json['companyLogo']), + totalMembers = json['totalMembers'] == null ? null : nativeFromJson(json['totalMembers']), + activeMembers = json['activeMembers'] == null ? null : nativeFromJson(json['activeMembers']), + totalHubs = json['totalHubs'] == null ? null : nativeFromJson(json['totalHubs']), + departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), + favoriteStaffCount = json['favoriteStaffCount'] == null ? null : nativeFromJson(json['favoriteStaffCount']), + blockedStaffCount = json['blockedStaffCount'] == null ? null : nativeFromJson(json['blockedStaffCount']), + favoriteStaff = json['favoriteStaff'] == null ? null : AnyValue.fromJson(json['favoriteStaff']), + blockedStaff = json['blockedStaff'] == null ? null : AnyValue.fromJson(json['blockedStaff']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamsByOwnerIdTeams otherTyped = other as GetTeamsByOwnerIdTeams; + return id == otherTyped.id && + teamName == otherTyped.teamName && + ownerId == otherTyped.ownerId && + ownerName == otherTyped.ownerName && + ownerRole == otherTyped.ownerRole && + email == otherTyped.email && + companyLogo == otherTyped.companyLogo && + totalMembers == otherTyped.totalMembers && + activeMembers == otherTyped.activeMembers && + totalHubs == otherTyped.totalHubs && + departments == otherTyped.departments && + favoriteStaffCount == otherTyped.favoriteStaffCount && + blockedStaffCount == otherTyped.blockedStaffCount && + favoriteStaff == otherTyped.favoriteStaff && + blockedStaff == otherTyped.blockedStaff && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamName.hashCode, ownerId.hashCode, ownerName.hashCode, ownerRole.hashCode, email.hashCode, companyLogo.hashCode, totalMembers.hashCode, activeMembers.hashCode, totalHubs.hashCode, departments.hashCode, favoriteStaffCount.hashCode, blockedStaffCount.hashCode, favoriteStaff.hashCode, blockedStaff.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamName'] = nativeToJson(teamName); + json['ownerId'] = nativeToJson(ownerId); + json['ownerName'] = nativeToJson(ownerName); + json['ownerRole'] = nativeToJson(ownerRole); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (companyLogo != null) { + json['companyLogo'] = nativeToJson(companyLogo); + } + if (totalMembers != null) { + json['totalMembers'] = nativeToJson(totalMembers); + } + if (activeMembers != null) { + json['activeMembers'] = nativeToJson(activeMembers); + } + if (totalHubs != null) { + json['totalHubs'] = nativeToJson(totalHubs); + } + if (departments != null) { + json['departments'] = departments!.toJson(); + } + if (favoriteStaffCount != null) { + json['favoriteStaffCount'] = nativeToJson(favoriteStaffCount); + } + if (blockedStaffCount != null) { + json['blockedStaffCount'] = nativeToJson(blockedStaffCount); + } + if (favoriteStaff != null) { + json['favoriteStaff'] = favoriteStaff!.toJson(); + } + if (blockedStaff != null) { + json['blockedStaff'] = blockedStaff!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetTeamsByOwnerIdTeams({ + required this.id, + required this.teamName, + required this.ownerId, + required this.ownerName, + required this.ownerRole, + this.email, + this.companyLogo, + this.totalMembers, + this.activeMembers, + this.totalHubs, + this.departments, + this.favoriteStaffCount, + this.blockedStaffCount, + this.favoriteStaff, + this.blockedStaff, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetTeamsByOwnerIdData { + final List teams; + GetTeamsByOwnerIdData.fromJson(dynamic json): + + teams = (json['teams'] as List) + .map((e) => GetTeamsByOwnerIdTeams.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamsByOwnerIdData otherTyped = other as GetTeamsByOwnerIdData; + return teams == otherTyped.teams; + + } + @override + int get hashCode => teams.hashCode; + + + Map toJson() { + Map json = {}; + json['teams'] = teams.map((e) => e.toJson()).toList(); + return json; + } + + GetTeamsByOwnerIdData({ + required this.teams, + }); +} + +@immutable +class GetTeamsByOwnerIdVariables { + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetTeamsByOwnerIdVariables.fromJson(Map json): + + ownerId = nativeFromJson(json['ownerId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetTeamsByOwnerIdVariables otherTyped = other as GetTeamsByOwnerIdVariables; + return ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => ownerId.hashCode; + + + Map toJson() { + Map json = {}; + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + GetTeamsByOwnerIdVariables({ + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_user_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_user_by_id.dart new file mode 100644 index 00000000..167c4fec --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_user_by_id.dart @@ -0,0 +1,159 @@ +part of 'generated.dart'; + +class GetUserByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetUserByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetUserByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetUserByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetUserByIdVariables vars= GetUserByIdVariables(id: id,); + return _dataConnect.query("getUserById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetUserByIdUser { + final String id; + final String? email; + final String? fullName; + final EnumValue role; + final String? userRole; + final String? photoUrl; + GetUserByIdUser.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + role = userBaseRoleDeserializer(json['role']), + userRole = json['userRole'] == null ? null : nativeFromJson(json['userRole']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserByIdUser otherTyped = other as GetUserByIdUser; + return id == otherTyped.id && + email == otherTyped.email && + fullName == otherTyped.fullName && + role == otherTyped.role && + userRole == otherTyped.userRole && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, email.hashCode, fullName.hashCode, role.hashCode, userRole.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + json['role'] = + userBaseRoleSerializer(role) + ; + if (userRole != null) { + json['userRole'] = nativeToJson(userRole); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + return json; + } + + GetUserByIdUser({ + required this.id, + this.email, + this.fullName, + required this.role, + this.userRole, + this.photoUrl, + }); +} + +@immutable +class GetUserByIdData { + final GetUserByIdUser? user; + GetUserByIdData.fromJson(dynamic json): + + user = json['user'] == null ? null : GetUserByIdUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserByIdData otherTyped = other as GetUserByIdData; + return user == otherTyped.user; + + } + @override + int get hashCode => user.hashCode; + + + Map toJson() { + Map json = {}; + if (user != null) { + json['user'] = user!.toJson(); + } + return json; + } + + GetUserByIdData({ + this.user, + }); +} + +@immutable +class GetUserByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetUserByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserByIdVariables otherTyped = other as GetUserByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetUserByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_user_conversation_by_key.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_user_conversation_by_key.dart new file mode 100644 index 00000000..d0a8a9c8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_user_conversation_by_key.dart @@ -0,0 +1,313 @@ +part of 'generated.dart'; + +class GetUserConversationByKeyVariablesBuilder { + String conversationId; + String userId; + + final FirebaseDataConnect _dataConnect; + GetUserConversationByKeyVariablesBuilder(this._dataConnect, {required this.conversationId,required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => GetUserConversationByKeyData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetUserConversationByKeyVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetUserConversationByKeyVariables vars= GetUserConversationByKeyVariables(conversationId: conversationId,userId: userId,); + return _dataConnect.query("getUserConversationByKey", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetUserConversationByKeyUserConversation { + final String id; + final String conversationId; + final String userId; + final int? unreadCount; + final Timestamp? lastReadAt; + final Timestamp? createdAt; + final GetUserConversationByKeyUserConversationConversation conversation; + final GetUserConversationByKeyUserConversationUser user; + GetUserConversationByKeyUserConversation.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']), + unreadCount = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']), + lastReadAt = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + conversation = GetUserConversationByKeyUserConversationConversation.fromJson(json['conversation']), + user = GetUserConversationByKeyUserConversationUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserConversationByKeyUserConversation otherTyped = other as GetUserConversationByKeyUserConversation; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt && + createdAt == otherTyped.createdAt && + conversation == otherTyped.conversation && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode, createdAt.hashCode, conversation.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if (unreadCount != null) { + json['unreadCount'] = nativeToJson(unreadCount); + } + if (lastReadAt != null) { + json['lastReadAt'] = lastReadAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['conversation'] = conversation.toJson(); + json['user'] = user.toJson(); + return json; + } + + GetUserConversationByKeyUserConversation({ + required this.id, + required this.conversationId, + required this.userId, + this.unreadCount, + this.lastReadAt, + this.createdAt, + required this.conversation, + required this.user, + }); +} + +@immutable +class GetUserConversationByKeyUserConversationConversation { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + GetUserConversationByKeyUserConversationConversation.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserConversationByKeyUserConversationConversation otherTyped = other as GetUserConversationByKeyUserConversationConversation; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + GetUserConversationByKeyUserConversationConversation({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class GetUserConversationByKeyUserConversationUser { + final String id; + final String? fullName; + final String? photoUrl; + GetUserConversationByKeyUserConversationUser.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserConversationByKeyUserConversationUser otherTyped = other as GetUserConversationByKeyUserConversationUser; + return id == otherTyped.id && + fullName == otherTyped.fullName && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + return json; + } + + GetUserConversationByKeyUserConversationUser({ + required this.id, + this.fullName, + this.photoUrl, + }); +} + +@immutable +class GetUserConversationByKeyData { + final GetUserConversationByKeyUserConversation? userConversation; + GetUserConversationByKeyData.fromJson(dynamic json): + + userConversation = json['userConversation'] == null ? null : GetUserConversationByKeyUserConversation.fromJson(json['userConversation']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserConversationByKeyData otherTyped = other as GetUserConversationByKeyData; + return userConversation == otherTyped.userConversation; + + } + @override + int get hashCode => userConversation.hashCode; + + + Map toJson() { + Map json = {}; + if (userConversation != null) { + json['userConversation'] = userConversation!.toJson(); + } + return json; + } + + GetUserConversationByKeyData({ + this.userConversation, + }); +} + +@immutable +class GetUserConversationByKeyVariables { + final String conversationId; + final String userId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetUserConversationByKeyVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetUserConversationByKeyVariables otherTyped = other as GetUserConversationByKeyVariables; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + return json; + } + + GetUserConversationByKeyVariables({ + required this.conversationId, + required this.userId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_benefit_plan_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_benefit_plan_by_id.dart new file mode 100644 index 00000000..0ee45b1c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_benefit_plan_by_id.dart @@ -0,0 +1,222 @@ +part of 'generated.dart'; + +class GetVendorBenefitPlanByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetVendorBenefitPlanByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetVendorBenefitPlanByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetVendorBenefitPlanByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetVendorBenefitPlanByIdVariables vars= GetVendorBenefitPlanByIdVariables(id: id,); + return _dataConnect.query("getVendorBenefitPlanById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetVendorBenefitPlanByIdVendorBenefitPlan { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final GetVendorBenefitPlanByIdVendorBenefitPlanVendor vendor; + GetVendorBenefitPlanByIdVendorBenefitPlan.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = GetVendorBenefitPlanByIdVendorBenefitPlanVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorBenefitPlanByIdVendorBenefitPlan otherTyped = other as GetVendorBenefitPlanByIdVendorBenefitPlan; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['vendor'] = vendor.toJson(); + return json; + } + + GetVendorBenefitPlanByIdVendorBenefitPlan({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.vendor, + }); +} + +@immutable +class GetVendorBenefitPlanByIdVendorBenefitPlanVendor { + final String companyName; + GetVendorBenefitPlanByIdVendorBenefitPlanVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorBenefitPlanByIdVendorBenefitPlanVendor otherTyped = other as GetVendorBenefitPlanByIdVendorBenefitPlanVendor; + return companyName == otherTyped.companyName; + + } + @override + int get hashCode => companyName.hashCode; + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetVendorBenefitPlanByIdVendorBenefitPlanVendor({ + required this.companyName, + }); +} + +@immutable +class GetVendorBenefitPlanByIdData { + final GetVendorBenefitPlanByIdVendorBenefitPlan? vendorBenefitPlan; + GetVendorBenefitPlanByIdData.fromJson(dynamic json): + + vendorBenefitPlan = json['vendorBenefitPlan'] == null ? null : GetVendorBenefitPlanByIdVendorBenefitPlan.fromJson(json['vendorBenefitPlan']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorBenefitPlanByIdData otherTyped = other as GetVendorBenefitPlanByIdData; + return vendorBenefitPlan == otherTyped.vendorBenefitPlan; + + } + @override + int get hashCode => vendorBenefitPlan.hashCode; + + + Map toJson() { + Map json = {}; + if (vendorBenefitPlan != null) { + json['vendorBenefitPlan'] = vendorBenefitPlan!.toJson(); + } + return json; + } + + GetVendorBenefitPlanByIdData({ + this.vendorBenefitPlan, + }); +} + +@immutable +class GetVendorBenefitPlanByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetVendorBenefitPlanByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorBenefitPlanByIdVariables otherTyped = other as GetVendorBenefitPlanByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetVendorBenefitPlanByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_by_id.dart new file mode 100644 index 00000000..2838999b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_by_id.dart @@ -0,0 +1,285 @@ +part of 'generated.dart'; + +class GetVendorByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetVendorByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetVendorByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetVendorByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetVendorByIdVariables vars= GetVendorByIdVariables(id: id,); + return _dataConnect.query("getVendorById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetVendorByIdVendor { + final String id; + final String userId; + final String companyName; + final String? email; + final String? phone; + final String? photoUrl; + final String? address; + final String? billingAddress; + final String? timezone; + final String? legalName; + final String? doingBusinessAs; + final String? region; + final String? state; + final String? city; + final String? serviceSpecialty; + final EnumValue? approvalStatus; + final bool? isActive; + final double? markup; + final double? fee; + final double? csat; + final EnumValue? tier; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetVendorByIdVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + companyName = nativeFromJson(json['companyName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + billingAddress = json['billingAddress'] == null ? null : nativeFromJson(json['billingAddress']), + timezone = json['timezone'] == null ? null : nativeFromJson(json['timezone']), + legalName = json['legalName'] == null ? null : nativeFromJson(json['legalName']), + doingBusinessAs = json['doingBusinessAs'] == null ? null : nativeFromJson(json['doingBusinessAs']), + region = json['region'] == null ? null : nativeFromJson(json['region']), + state = json['state'] == null ? null : nativeFromJson(json['state']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + serviceSpecialty = json['serviceSpecialty'] == null ? null : nativeFromJson(json['serviceSpecialty']), + approvalStatus = json['approvalStatus'] == null ? null : approvalStatusDeserializer(json['approvalStatus']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + markup = json['markup'] == null ? null : nativeFromJson(json['markup']), + fee = json['fee'] == null ? null : nativeFromJson(json['fee']), + csat = json['csat'] == null ? null : nativeFromJson(json['csat']), + tier = json['tier'] == null ? null : vendorTierDeserializer(json['tier']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorByIdVendor otherTyped = other as GetVendorByIdVendor; + return id == otherTyped.id && + userId == otherTyped.userId && + companyName == otherTyped.companyName && + email == otherTyped.email && + phone == otherTyped.phone && + photoUrl == otherTyped.photoUrl && + address == otherTyped.address && + billingAddress == otherTyped.billingAddress && + timezone == otherTyped.timezone && + legalName == otherTyped.legalName && + doingBusinessAs == otherTyped.doingBusinessAs && + region == otherTyped.region && + state == otherTyped.state && + city == otherTyped.city && + serviceSpecialty == otherTyped.serviceSpecialty && + approvalStatus == otherTyped.approvalStatus && + isActive == otherTyped.isActive && + markup == otherTyped.markup && + fee == otherTyped.fee && + csat == otherTyped.csat && + tier == otherTyped.tier && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, companyName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode, address.hashCode, billingAddress.hashCode, timezone.hashCode, legalName.hashCode, doingBusinessAs.hashCode, region.hashCode, state.hashCode, city.hashCode, serviceSpecialty.hashCode, approvalStatus.hashCode, isActive.hashCode, markup.hashCode, fee.hashCode, csat.hashCode, tier.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['companyName'] = nativeToJson(companyName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (billingAddress != null) { + json['billingAddress'] = nativeToJson(billingAddress); + } + if (timezone != null) { + json['timezone'] = nativeToJson(timezone); + } + if (legalName != null) { + json['legalName'] = nativeToJson(legalName); + } + if (doingBusinessAs != null) { + json['doingBusinessAs'] = nativeToJson(doingBusinessAs); + } + if (region != null) { + json['region'] = nativeToJson(region); + } + if (state != null) { + json['state'] = nativeToJson(state); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (serviceSpecialty != null) { + json['serviceSpecialty'] = nativeToJson(serviceSpecialty); + } + if (approvalStatus != null) { + json['approvalStatus'] = + approvalStatusSerializer(approvalStatus!) + ; + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (markup != null) { + json['markup'] = nativeToJson(markup); + } + if (fee != null) { + json['fee'] = nativeToJson(fee); + } + if (csat != null) { + json['csat'] = nativeToJson(csat); + } + if (tier != null) { + json['tier'] = + vendorTierSerializer(tier!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetVendorByIdVendor({ + required this.id, + required this.userId, + required this.companyName, + this.email, + this.phone, + this.photoUrl, + this.address, + this.billingAddress, + this.timezone, + this.legalName, + this.doingBusinessAs, + this.region, + this.state, + this.city, + this.serviceSpecialty, + this.approvalStatus, + this.isActive, + this.markup, + this.fee, + this.csat, + this.tier, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetVendorByIdData { + final GetVendorByIdVendor? vendor; + GetVendorByIdData.fromJson(dynamic json): + + vendor = json['vendor'] == null ? null : GetVendorByIdVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorByIdData otherTyped = other as GetVendorByIdData; + return vendor == otherTyped.vendor; + + } + @override + int get hashCode => vendor.hashCode; + + + Map toJson() { + Map json = {}; + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + return json; + } + + GetVendorByIdData({ + this.vendor, + }); +} + +@immutable +class GetVendorByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetVendorByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorByIdVariables otherTyped = other as GetVendorByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetVendorByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_by_user_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_by_user_id.dart new file mode 100644 index 00000000..429a46a8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_by_user_id.dart @@ -0,0 +1,285 @@ +part of 'generated.dart'; + +class GetVendorByUserIdVariablesBuilder { + String userId; + + final FirebaseDataConnect _dataConnect; + GetVendorByUserIdVariablesBuilder(this._dataConnect, {required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => GetVendorByUserIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetVendorByUserIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetVendorByUserIdVariables vars= GetVendorByUserIdVariables(userId: userId,); + return _dataConnect.query("getVendorByUserId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetVendorByUserIdVendors { + final String id; + final String userId; + final String companyName; + final String? email; + final String? phone; + final String? photoUrl; + final String? address; + final String? billingAddress; + final String? timezone; + final String? legalName; + final String? doingBusinessAs; + final String? region; + final String? state; + final String? city; + final String? serviceSpecialty; + final EnumValue? approvalStatus; + final bool? isActive; + final double? markup; + final double? fee; + final double? csat; + final EnumValue? tier; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + GetVendorByUserIdVendors.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + companyName = nativeFromJson(json['companyName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + billingAddress = json['billingAddress'] == null ? null : nativeFromJson(json['billingAddress']), + timezone = json['timezone'] == null ? null : nativeFromJson(json['timezone']), + legalName = json['legalName'] == null ? null : nativeFromJson(json['legalName']), + doingBusinessAs = json['doingBusinessAs'] == null ? null : nativeFromJson(json['doingBusinessAs']), + region = json['region'] == null ? null : nativeFromJson(json['region']), + state = json['state'] == null ? null : nativeFromJson(json['state']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + serviceSpecialty = json['serviceSpecialty'] == null ? null : nativeFromJson(json['serviceSpecialty']), + approvalStatus = json['approvalStatus'] == null ? null : approvalStatusDeserializer(json['approvalStatus']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + markup = json['markup'] == null ? null : nativeFromJson(json['markup']), + fee = json['fee'] == null ? null : nativeFromJson(json['fee']), + csat = json['csat'] == null ? null : nativeFromJson(json['csat']), + tier = json['tier'] == null ? null : vendorTierDeserializer(json['tier']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorByUserIdVendors otherTyped = other as GetVendorByUserIdVendors; + return id == otherTyped.id && + userId == otherTyped.userId && + companyName == otherTyped.companyName && + email == otherTyped.email && + phone == otherTyped.phone && + photoUrl == otherTyped.photoUrl && + address == otherTyped.address && + billingAddress == otherTyped.billingAddress && + timezone == otherTyped.timezone && + legalName == otherTyped.legalName && + doingBusinessAs == otherTyped.doingBusinessAs && + region == otherTyped.region && + state == otherTyped.state && + city == otherTyped.city && + serviceSpecialty == otherTyped.serviceSpecialty && + approvalStatus == otherTyped.approvalStatus && + isActive == otherTyped.isActive && + markup == otherTyped.markup && + fee == otherTyped.fee && + csat == otherTyped.csat && + tier == otherTyped.tier && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, companyName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode, address.hashCode, billingAddress.hashCode, timezone.hashCode, legalName.hashCode, doingBusinessAs.hashCode, region.hashCode, state.hashCode, city.hashCode, serviceSpecialty.hashCode, approvalStatus.hashCode, isActive.hashCode, markup.hashCode, fee.hashCode, csat.hashCode, tier.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['companyName'] = nativeToJson(companyName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (billingAddress != null) { + json['billingAddress'] = nativeToJson(billingAddress); + } + if (timezone != null) { + json['timezone'] = nativeToJson(timezone); + } + if (legalName != null) { + json['legalName'] = nativeToJson(legalName); + } + if (doingBusinessAs != null) { + json['doingBusinessAs'] = nativeToJson(doingBusinessAs); + } + if (region != null) { + json['region'] = nativeToJson(region); + } + if (state != null) { + json['state'] = nativeToJson(state); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (serviceSpecialty != null) { + json['serviceSpecialty'] = nativeToJson(serviceSpecialty); + } + if (approvalStatus != null) { + json['approvalStatus'] = + approvalStatusSerializer(approvalStatus!) + ; + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (markup != null) { + json['markup'] = nativeToJson(markup); + } + if (fee != null) { + json['fee'] = nativeToJson(fee); + } + if (csat != null) { + json['csat'] = nativeToJson(csat); + } + if (tier != null) { + json['tier'] = + vendorTierSerializer(tier!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + GetVendorByUserIdVendors({ + required this.id, + required this.userId, + required this.companyName, + this.email, + this.phone, + this.photoUrl, + this.address, + this.billingAddress, + this.timezone, + this.legalName, + this.doingBusinessAs, + this.region, + this.state, + this.city, + this.serviceSpecialty, + this.approvalStatus, + this.isActive, + this.markup, + this.fee, + this.csat, + this.tier, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class GetVendorByUserIdData { + final List vendors; + GetVendorByUserIdData.fromJson(dynamic json): + + vendors = (json['vendors'] as List) + .map((e) => GetVendorByUserIdVendors.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorByUserIdData otherTyped = other as GetVendorByUserIdData; + return vendors == otherTyped.vendors; + + } + @override + int get hashCode => vendors.hashCode; + + + Map toJson() { + Map json = {}; + json['vendors'] = vendors.map((e) => e.toJson()).toList(); + return json; + } + + GetVendorByUserIdData({ + required this.vendors, + }); +} + +@immutable +class GetVendorByUserIdVariables { + final String userId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetVendorByUserIdVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorByUserIdVariables otherTyped = other as GetVendorByUserIdVariables; + return userId == otherTyped.userId; + + } + @override + int get hashCode => userId.hashCode; + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + return json; + } + + GetVendorByUserIdVariables({ + required this.userId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_rate_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_rate_by_id.dart new file mode 100644 index 00000000..e436ab02 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_vendor_rate_by_id.dart @@ -0,0 +1,240 @@ +part of 'generated.dart'; + +class GetVendorRateByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetVendorRateByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetVendorRateByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetVendorRateByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetVendorRateByIdVariables vars= GetVendorRateByIdVariables(id: id,); + return _dataConnect.query("getVendorRateById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetVendorRateByIdVendorRate { + final String id; + final String vendorId; + final String? roleName; + final EnumValue? category; + final double? clientRate; + final double? employeeWage; + final double? markupPercentage; + final double? vendorFeePercentage; + final bool? isActive; + final String? notes; + final Timestamp? createdAt; + final GetVendorRateByIdVendorRateVendor vendor; + GetVendorRateByIdVendorRate.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + roleName = json['roleName'] == null ? null : nativeFromJson(json['roleName']), + category = json['category'] == null ? null : categoryTypeDeserializer(json['category']), + clientRate = json['clientRate'] == null ? null : nativeFromJson(json['clientRate']), + employeeWage = json['employeeWage'] == null ? null : nativeFromJson(json['employeeWage']), + markupPercentage = json['markupPercentage'] == null ? null : nativeFromJson(json['markupPercentage']), + vendorFeePercentage = json['vendorFeePercentage'] == null ? null : nativeFromJson(json['vendorFeePercentage']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + vendor = GetVendorRateByIdVendorRateVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorRateByIdVendorRate otherTyped = other as GetVendorRateByIdVendorRate; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + roleName == otherTyped.roleName && + category == otherTyped.category && + clientRate == otherTyped.clientRate && + employeeWage == otherTyped.employeeWage && + markupPercentage == otherTyped.markupPercentage && + vendorFeePercentage == otherTyped.vendorFeePercentage && + isActive == otherTyped.isActive && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, roleName.hashCode, category.hashCode, clientRate.hashCode, employeeWage.hashCode, markupPercentage.hashCode, vendorFeePercentage.hashCode, isActive.hashCode, notes.hashCode, createdAt.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + if (roleName != null) { + json['roleName'] = nativeToJson(roleName); + } + if (category != null) { + json['category'] = + categoryTypeSerializer(category!) + ; + } + if (clientRate != null) { + json['clientRate'] = nativeToJson(clientRate); + } + if (employeeWage != null) { + json['employeeWage'] = nativeToJson(employeeWage); + } + if (markupPercentage != null) { + json['markupPercentage'] = nativeToJson(markupPercentage); + } + if (vendorFeePercentage != null) { + json['vendorFeePercentage'] = nativeToJson(vendorFeePercentage); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['vendor'] = vendor.toJson(); + return json; + } + + GetVendorRateByIdVendorRate({ + required this.id, + required this.vendorId, + this.roleName, + this.category, + this.clientRate, + this.employeeWage, + this.markupPercentage, + this.vendorFeePercentage, + this.isActive, + this.notes, + this.createdAt, + required this.vendor, + }); +} + +@immutable +class GetVendorRateByIdVendorRateVendor { + final String companyName; + final String? region; + GetVendorRateByIdVendorRateVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + region = json['region'] == null ? null : nativeFromJson(json['region']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorRateByIdVendorRateVendor otherTyped = other as GetVendorRateByIdVendorRateVendor; + return companyName == otherTyped.companyName && + region == otherTyped.region; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, region.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (region != null) { + json['region'] = nativeToJson(region); + } + return json; + } + + GetVendorRateByIdVendorRateVendor({ + required this.companyName, + this.region, + }); +} + +@immutable +class GetVendorRateByIdData { + final GetVendorRateByIdVendorRate? vendorRate; + GetVendorRateByIdData.fromJson(dynamic json): + + vendorRate = json['vendorRate'] == null ? null : GetVendorRateByIdVendorRate.fromJson(json['vendorRate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorRateByIdData otherTyped = other as GetVendorRateByIdData; + return vendorRate == otherTyped.vendorRate; + + } + @override + int get hashCode => vendorRate.hashCode; + + + Map toJson() { + Map json = {}; + if (vendorRate != null) { + json['vendorRate'] = vendorRate!.toJson(); + } + return json; + } + + GetVendorRateByIdData({ + this.vendorRate, + }); +} + +@immutable +class GetVendorRateByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetVendorRateByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetVendorRateByIdVariables otherTyped = other as GetVendorRateByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetVendorRateByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_id.dart new file mode 100644 index 00000000..35a8862f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_id.dart @@ -0,0 +1,259 @@ +part of 'generated.dart'; + +class GetWorkforceByIdVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + GetWorkforceByIdVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => GetWorkforceByIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetWorkforceByIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetWorkforceByIdVariables vars= GetWorkforceByIdVariables(id: id,); + return _dataConnect.query("getWorkforceById", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetWorkforceByIdWorkforce { + final String id; + final String vendorId; + final String staffId; + final String workforceNumber; + final EnumValue? employmentType; + final EnumValue? status; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final GetWorkforceByIdWorkforceStaff staff; + final GetWorkforceByIdWorkforceVendor vendor; + GetWorkforceByIdWorkforce.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + staffId = nativeFromJson(json['staffId']), + workforceNumber = nativeFromJson(json['workforceNumber']), + employmentType = json['employmentType'] == null ? null : workforceEmploymentTypeDeserializer(json['employmentType']), + status = json['status'] == null ? null : workforceStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + staff = GetWorkforceByIdWorkforceStaff.fromJson(json['staff']), + vendor = GetWorkforceByIdWorkforceVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByIdWorkforce otherTyped = other as GetWorkforceByIdWorkforce; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + staffId == otherTyped.staffId && + workforceNumber == otherTyped.workforceNumber && + employmentType == otherTyped.employmentType && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + staff == otherTyped.staff && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, staffId.hashCode, workforceNumber.hashCode, employmentType.hashCode, status.hashCode, createdAt.hashCode, updatedAt.hashCode, staff.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['staffId'] = nativeToJson(staffId); + json['workforceNumber'] = nativeToJson(workforceNumber); + if (employmentType != null) { + json['employmentType'] = + workforceEmploymentTypeSerializer(employmentType!) + ; + } + if (status != null) { + json['status'] = + workforceStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + json['staff'] = staff.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetWorkforceByIdWorkforce({ + required this.id, + required this.vendorId, + required this.staffId, + required this.workforceNumber, + this.employmentType, + this.status, + this.createdAt, + this.updatedAt, + required this.staff, + required this.vendor, + }); +} + +@immutable +class GetWorkforceByIdWorkforceStaff { + final String id; + final String fullName; + GetWorkforceByIdWorkforceStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByIdWorkforceStaff otherTyped = other as GetWorkforceByIdWorkforceStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + GetWorkforceByIdWorkforceStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class GetWorkforceByIdWorkforceVendor { + final String id; + final String companyName; + GetWorkforceByIdWorkforceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByIdWorkforceVendor otherTyped = other as GetWorkforceByIdWorkforceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetWorkforceByIdWorkforceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetWorkforceByIdData { + final GetWorkforceByIdWorkforce? workforce; + GetWorkforceByIdData.fromJson(dynamic json): + + workforce = json['workforce'] == null ? null : GetWorkforceByIdWorkforce.fromJson(json['workforce']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByIdData otherTyped = other as GetWorkforceByIdData; + return workforce == otherTyped.workforce; + + } + @override + int get hashCode => workforce.hashCode; + + + Map toJson() { + Map json = {}; + if (workforce != null) { + json['workforce'] = workforce!.toJson(); + } + return json; + } + + GetWorkforceByIdData({ + this.workforce, + }); +} + +@immutable +class GetWorkforceByIdVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetWorkforceByIdVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByIdVariables otherTyped = other as GetWorkforceByIdVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + GetWorkforceByIdVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_vendor_and_number.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_vendor_and_number.dart new file mode 100644 index 00000000..1f4ef4a0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_vendor_and_number.dart @@ -0,0 +1,149 @@ +part of 'generated.dart'; + +class GetWorkforceByVendorAndNumberVariablesBuilder { + String vendorId; + String workforceNumber; + + final FirebaseDataConnect _dataConnect; + GetWorkforceByVendorAndNumberVariablesBuilder(this._dataConnect, {required this.vendorId,required this.workforceNumber,}); + Deserializer dataDeserializer = (dynamic json) => GetWorkforceByVendorAndNumberData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetWorkforceByVendorAndNumberVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetWorkforceByVendorAndNumberVariables vars= GetWorkforceByVendorAndNumberVariables(vendorId: vendorId,workforceNumber: workforceNumber,); + return _dataConnect.query("getWorkforceByVendorAndNumber", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetWorkforceByVendorAndNumberWorkforces { + final String id; + final String staffId; + final String workforceNumber; + final EnumValue? status; + GetWorkforceByVendorAndNumberWorkforces.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + workforceNumber = nativeFromJson(json['workforceNumber']), + status = json['status'] == null ? null : workforceStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndNumberWorkforces otherTyped = other as GetWorkforceByVendorAndNumberWorkforces; + return id == otherTyped.id && + staffId == otherTyped.staffId && + workforceNumber == otherTyped.workforceNumber && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, workforceNumber.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['workforceNumber'] = nativeToJson(workforceNumber); + if (status != null) { + json['status'] = + workforceStatusSerializer(status!) + ; + } + return json; + } + + GetWorkforceByVendorAndNumberWorkforces({ + required this.id, + required this.staffId, + required this.workforceNumber, + this.status, + }); +} + +@immutable +class GetWorkforceByVendorAndNumberData { + final List workforces; + GetWorkforceByVendorAndNumberData.fromJson(dynamic json): + + workforces = (json['workforces'] as List) + .map((e) => GetWorkforceByVendorAndNumberWorkforces.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndNumberData otherTyped = other as GetWorkforceByVendorAndNumberData; + return workforces == otherTyped.workforces; + + } + @override + int get hashCode => workforces.hashCode; + + + Map toJson() { + Map json = {}; + json['workforces'] = workforces.map((e) => e.toJson()).toList(); + return json; + } + + GetWorkforceByVendorAndNumberData({ + required this.workforces, + }); +} + +@immutable +class GetWorkforceByVendorAndNumberVariables { + final String vendorId; + final String workforceNumber; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetWorkforceByVendorAndNumberVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + workforceNumber = nativeFromJson(json['workforceNumber']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndNumberVariables otherTyped = other as GetWorkforceByVendorAndNumberVariables; + return vendorId == otherTyped.vendorId && + workforceNumber == otherTyped.workforceNumber; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, workforceNumber.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['workforceNumber'] = nativeToJson(workforceNumber); + return json; + } + + GetWorkforceByVendorAndNumberVariables({ + required this.vendorId, + required this.workforceNumber, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_vendor_and_staff.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_vendor_and_staff.dart new file mode 100644 index 00000000..6505314b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/get_workforce_by_vendor_and_staff.dart @@ -0,0 +1,265 @@ +part of 'generated.dart'; + +class GetWorkforceByVendorAndStaffVariablesBuilder { + String vendorId; + String staffId; + + final FirebaseDataConnect _dataConnect; + GetWorkforceByVendorAndStaffVariablesBuilder(this._dataConnect, {required this.vendorId,required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => GetWorkforceByVendorAndStaffData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (GetWorkforceByVendorAndStaffVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + GetWorkforceByVendorAndStaffVariables vars= GetWorkforceByVendorAndStaffVariables(vendorId: vendorId,staffId: staffId,); + return _dataConnect.query("getWorkforceByVendorAndStaff", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class GetWorkforceByVendorAndStaffWorkforces { + final String id; + final String vendorId; + final String staffId; + final String workforceNumber; + final EnumValue? employmentType; + final EnumValue? status; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final GetWorkforceByVendorAndStaffWorkforcesStaff staff; + final GetWorkforceByVendorAndStaffWorkforcesVendor vendor; + GetWorkforceByVendorAndStaffWorkforces.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + staffId = nativeFromJson(json['staffId']), + workforceNumber = nativeFromJson(json['workforceNumber']), + employmentType = json['employmentType'] == null ? null : workforceEmploymentTypeDeserializer(json['employmentType']), + status = json['status'] == null ? null : workforceStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + staff = GetWorkforceByVendorAndStaffWorkforcesStaff.fromJson(json['staff']), + vendor = GetWorkforceByVendorAndStaffWorkforcesVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndStaffWorkforces otherTyped = other as GetWorkforceByVendorAndStaffWorkforces; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + staffId == otherTyped.staffId && + workforceNumber == otherTyped.workforceNumber && + employmentType == otherTyped.employmentType && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + staff == otherTyped.staff && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, staffId.hashCode, workforceNumber.hashCode, employmentType.hashCode, status.hashCode, createdAt.hashCode, updatedAt.hashCode, staff.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['staffId'] = nativeToJson(staffId); + json['workforceNumber'] = nativeToJson(workforceNumber); + if (employmentType != null) { + json['employmentType'] = + workforceEmploymentTypeSerializer(employmentType!) + ; + } + if (status != null) { + json['status'] = + workforceStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + json['staff'] = staff.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + GetWorkforceByVendorAndStaffWorkforces({ + required this.id, + required this.vendorId, + required this.staffId, + required this.workforceNumber, + this.employmentType, + this.status, + this.createdAt, + this.updatedAt, + required this.staff, + required this.vendor, + }); +} + +@immutable +class GetWorkforceByVendorAndStaffWorkforcesStaff { + final String id; + final String fullName; + GetWorkforceByVendorAndStaffWorkforcesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndStaffWorkforcesStaff otherTyped = other as GetWorkforceByVendorAndStaffWorkforcesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + GetWorkforceByVendorAndStaffWorkforcesStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class GetWorkforceByVendorAndStaffWorkforcesVendor { + final String id; + final String companyName; + GetWorkforceByVendorAndStaffWorkforcesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndStaffWorkforcesVendor otherTyped = other as GetWorkforceByVendorAndStaffWorkforcesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + GetWorkforceByVendorAndStaffWorkforcesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class GetWorkforceByVendorAndStaffData { + final List workforces; + GetWorkforceByVendorAndStaffData.fromJson(dynamic json): + + workforces = (json['workforces'] as List) + .map((e) => GetWorkforceByVendorAndStaffWorkforces.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndStaffData otherTyped = other as GetWorkforceByVendorAndStaffData; + return workforces == otherTyped.workforces; + + } + @override + int get hashCode => workforces.hashCode; + + + Map toJson() { + Map json = {}; + json['workforces'] = workforces.map((e) => e.toJson()).toList(); + return json; + } + + GetWorkforceByVendorAndStaffData({ + required this.workforces, + }); +} + +@immutable +class GetWorkforceByVendorAndStaffVariables { + final String vendorId; + final String staffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + GetWorkforceByVendorAndStaffVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final GetWorkforceByVendorAndStaffVariables otherTyped = other as GetWorkforceByVendorAndStaffVariables; + return vendorId == otherTyped.vendorId && + staffId == otherTyped.staffId; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, staffId.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['staffId'] = nativeToJson(staffId); + return json; + } + + GetWorkforceByVendorAndStaffVariables({ + required this.vendorId, + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/increment_unread_for_user.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/increment_unread_for_user.dart new file mode 100644 index 00000000..559f4fb9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/increment_unread_for_user.dart @@ -0,0 +1,141 @@ +part of 'generated.dart'; + +class IncrementUnreadForUserVariablesBuilder { + String conversationId; + String userId; + int unreadCount; + + final FirebaseDataConnect _dataConnect; + IncrementUnreadForUserVariablesBuilder(this._dataConnect, {required this.conversationId,required this.userId,required this.unreadCount,}); + Deserializer dataDeserializer = (dynamic json) => IncrementUnreadForUserData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (IncrementUnreadForUserVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + IncrementUnreadForUserVariables vars= IncrementUnreadForUserVariables(conversationId: conversationId,userId: userId,unreadCount: unreadCount,); + return _dataConnect.mutation("incrementUnreadForUser", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class IncrementUnreadForUserUserConversationUpdate { + final String conversationId; + final String userId; + IncrementUnreadForUserUserConversationUpdate.fromJson(dynamic json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final IncrementUnreadForUserUserConversationUpdate otherTyped = other as IncrementUnreadForUserUserConversationUpdate; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + return json; + } + + IncrementUnreadForUserUserConversationUpdate({ + required this.conversationId, + required this.userId, + }); +} + +@immutable +class IncrementUnreadForUserData { + final IncrementUnreadForUserUserConversationUpdate? userConversation_update; + IncrementUnreadForUserData.fromJson(dynamic json): + + userConversation_update = json['userConversation_update'] == null ? null : IncrementUnreadForUserUserConversationUpdate.fromJson(json['userConversation_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final IncrementUnreadForUserData otherTyped = other as IncrementUnreadForUserData; + return userConversation_update == otherTyped.userConversation_update; + + } + @override + int get hashCode => userConversation_update.hashCode; + + + Map toJson() { + Map json = {}; + if (userConversation_update != null) { + json['userConversation_update'] = userConversation_update!.toJson(); + } + return json; + } + + IncrementUnreadForUserData({ + this.userConversation_update, + }); +} + +@immutable +class IncrementUnreadForUserVariables { + final String conversationId; + final String userId; + final int unreadCount; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + IncrementUnreadForUserVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']), + unreadCount = nativeFromJson(json['unreadCount']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final IncrementUnreadForUserVariables otherTyped = other as IncrementUnreadForUserVariables; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode, unreadCount.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + json['unreadCount'] = nativeToJson(unreadCount); + return json; + } + + IncrementUnreadForUserVariables({ + required this.conversationId, + required this.userId, + required this.unreadCount, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_accounts.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_accounts.dart new file mode 100644 index 00000000..cb6aa7ce --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_accounts.dart @@ -0,0 +1,138 @@ +part of 'generated.dart'; + +class ListAccountsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListAccountsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListAccountsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listAccounts", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListAccountsAccounts { + final String id; + final String bank; + final EnumValue type; + final String last4; + final bool? isPrimary; + final String ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListAccountsAccounts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + bank = nativeFromJson(json['bank']), + type = accountTypeDeserializer(json['type']), + last4 = nativeFromJson(json['last4']), + isPrimary = json['isPrimary'] == null ? null : nativeFromJson(json['isPrimary']), + ownerId = nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAccountsAccounts otherTyped = other as ListAccountsAccounts; + return id == otherTyped.id && + bank == otherTyped.bank && + type == otherTyped.type && + last4 == otherTyped.last4 && + isPrimary == otherTyped.isPrimary && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['bank'] = nativeToJson(bank); + json['type'] = + accountTypeSerializer(type) + ; + json['last4'] = nativeToJson(last4); + if (isPrimary != null) { + json['isPrimary'] = nativeToJson(isPrimary); + } + json['ownerId'] = nativeToJson(ownerId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListAccountsAccounts({ + required this.id, + required this.bank, + required this.type, + required this.last4, + this.isPrimary, + required this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListAccountsData { + final List accounts; + ListAccountsData.fromJson(dynamic json): + + accounts = (json['accounts'] as List) + .map((e) => ListAccountsAccounts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAccountsData otherTyped = other as ListAccountsData; + return accounts == otherTyped.accounts; + + } + @override + int get hashCode => accounts.hashCode; + + + Map toJson() { + Map json = {}; + json['accounts'] = accounts.map((e) => e.toJson()).toList(); + return json; + } + + ListAccountsData({ + required this.accounts, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_active_vendor_benefit_plans_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_active_vendor_benefit_plans_by_vendor_id.dart new file mode 100644 index 00000000..3497fae5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_active_vendor_benefit_plans_by_vendor_id.dart @@ -0,0 +1,255 @@ +part of 'generated.dart'; + +class ListActiveVendorBenefitPlansByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListActiveVendorBenefitPlansByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListActiveVendorBenefitPlansByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListActiveVendorBenefitPlansByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListActiveVendorBenefitPlansByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListActiveVendorBenefitPlansByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListActiveVendorBenefitPlansByVendorIdVariables vars= ListActiveVendorBenefitPlansByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listActiveVendorBenefitPlansByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlans { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlansVendor vendor; + ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlans.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlansVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlans otherTyped = other as ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlans; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['vendor'] = vendor.toJson(); + return json; + } + + ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlans({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.vendor, + }); +} + +@immutable +class ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlansVendor { + final String companyName; + ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlansVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlansVendor otherTyped = other as ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlansVendor; + return companyName == otherTyped.companyName; + + } + @override + int get hashCode => companyName.hashCode; + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlansVendor({ + required this.companyName, + }); +} + +@immutable +class ListActiveVendorBenefitPlansByVendorIdData { + final List vendorBenefitPlans; + ListActiveVendorBenefitPlansByVendorIdData.fromJson(dynamic json): + + vendorBenefitPlans = (json['vendorBenefitPlans'] as List) + .map((e) => ListActiveVendorBenefitPlansByVendorIdVendorBenefitPlans.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActiveVendorBenefitPlansByVendorIdData otherTyped = other as ListActiveVendorBenefitPlansByVendorIdData; + return vendorBenefitPlans == otherTyped.vendorBenefitPlans; + + } + @override + int get hashCode => vendorBenefitPlans.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlans'] = vendorBenefitPlans.map((e) => e.toJson()).toList(); + return json; + } + + ListActiveVendorBenefitPlansByVendorIdData({ + required this.vendorBenefitPlans, + }); +} + +@immutable +class ListActiveVendorBenefitPlansByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListActiveVendorBenefitPlansByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActiveVendorBenefitPlansByVendorIdVariables otherTyped = other as ListActiveVendorBenefitPlansByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListActiveVendorBenefitPlansByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_activity_logs.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_activity_logs.dart new file mode 100644 index 00000000..9d2feac5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_activity_logs.dart @@ -0,0 +1,242 @@ +part of 'generated.dart'; + +class ListActivityLogsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListActivityLogsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListActivityLogsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListActivityLogsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListActivityLogsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListActivityLogsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListActivityLogsVariables vars= ListActivityLogsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listActivityLogs", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListActivityLogsActivityLogs { + final String id; + final String userId; + final Timestamp date; + final String? hourStart; + final String? hourEnd; + final String? totalhours; + final EnumValue? iconType; + final String? iconColor; + final String title; + final String description; + final bool? isRead; + final EnumValue activityType; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListActivityLogsActivityLogs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + date = Timestamp.fromJson(json['date']), + hourStart = json['hourStart'] == null ? null : nativeFromJson(json['hourStart']), + hourEnd = json['hourEnd'] == null ? null : nativeFromJson(json['hourEnd']), + totalhours = json['totalhours'] == null ? null : nativeFromJson(json['totalhours']), + iconType = json['iconType'] == null ? null : activityIconTypeDeserializer(json['iconType']), + iconColor = json['iconColor'] == null ? null : nativeFromJson(json['iconColor']), + title = nativeFromJson(json['title']), + description = nativeFromJson(json['description']), + isRead = json['isRead'] == null ? null : nativeFromJson(json['isRead']), + activityType = activityTypeDeserializer(json['activityType']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActivityLogsActivityLogs otherTyped = other as ListActivityLogsActivityLogs; + return id == otherTyped.id && + userId == otherTyped.userId && + date == otherTyped.date && + hourStart == otherTyped.hourStart && + hourEnd == otherTyped.hourEnd && + totalhours == otherTyped.totalhours && + iconType == otherTyped.iconType && + iconColor == otherTyped.iconColor && + title == otherTyped.title && + description == otherTyped.description && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, date.hashCode, hourStart.hashCode, hourEnd.hashCode, totalhours.hashCode, iconType.hashCode, iconColor.hashCode, title.hashCode, description.hashCode, isRead.hashCode, activityType.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['date'] = date.toJson(); + if (hourStart != null) { + json['hourStart'] = nativeToJson(hourStart); + } + if (hourEnd != null) { + json['hourEnd'] = nativeToJson(hourEnd); + } + if (totalhours != null) { + json['totalhours'] = nativeToJson(totalhours); + } + if (iconType != null) { + json['iconType'] = + activityIconTypeSerializer(iconType!) + ; + } + if (iconColor != null) { + json['iconColor'] = nativeToJson(iconColor); + } + json['title'] = nativeToJson(title); + json['description'] = nativeToJson(description); + if (isRead != null) { + json['isRead'] = nativeToJson(isRead); + } + json['activityType'] = + activityTypeSerializer(activityType) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListActivityLogsActivityLogs({ + required this.id, + required this.userId, + required this.date, + this.hourStart, + this.hourEnd, + this.totalhours, + this.iconType, + this.iconColor, + required this.title, + required this.description, + this.isRead, + required this.activityType, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListActivityLogsData { + final List activityLogs; + ListActivityLogsData.fromJson(dynamic json): + + activityLogs = (json['activityLogs'] as List) + .map((e) => ListActivityLogsActivityLogs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActivityLogsData otherTyped = other as ListActivityLogsData; + return activityLogs == otherTyped.activityLogs; + + } + @override + int get hashCode => activityLogs.hashCode; + + + Map toJson() { + Map json = {}; + json['activityLogs'] = activityLogs.map((e) => e.toJson()).toList(); + return json; + } + + ListActivityLogsData({ + required this.activityLogs, + }); +} + +@immutable +class ListActivityLogsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListActivityLogsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActivityLogsVariables otherTyped = other as ListActivityLogsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListActivityLogsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_activity_logs_by_user_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_activity_logs_by_user_id.dart new file mode 100644 index 00000000..4ef7eb46 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_activity_logs_by_user_id.dart @@ -0,0 +1,249 @@ +part of 'generated.dart'; + +class ListActivityLogsByUserIdVariablesBuilder { + String userId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListActivityLogsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListActivityLogsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListActivityLogsByUserIdVariablesBuilder(this._dataConnect, {required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => ListActivityLogsByUserIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListActivityLogsByUserIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListActivityLogsByUserIdVariables vars= ListActivityLogsByUserIdVariables(userId: userId,offset: _offset,limit: _limit,); + return _dataConnect.query("listActivityLogsByUserId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListActivityLogsByUserIdActivityLogs { + final String id; + final String userId; + final Timestamp date; + final String? hourStart; + final String? hourEnd; + final String? totalhours; + final EnumValue? iconType; + final String? iconColor; + final String title; + final String description; + final bool? isRead; + final EnumValue activityType; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListActivityLogsByUserIdActivityLogs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + date = Timestamp.fromJson(json['date']), + hourStart = json['hourStart'] == null ? null : nativeFromJson(json['hourStart']), + hourEnd = json['hourEnd'] == null ? null : nativeFromJson(json['hourEnd']), + totalhours = json['totalhours'] == null ? null : nativeFromJson(json['totalhours']), + iconType = json['iconType'] == null ? null : activityIconTypeDeserializer(json['iconType']), + iconColor = json['iconColor'] == null ? null : nativeFromJson(json['iconColor']), + title = nativeFromJson(json['title']), + description = nativeFromJson(json['description']), + isRead = json['isRead'] == null ? null : nativeFromJson(json['isRead']), + activityType = activityTypeDeserializer(json['activityType']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActivityLogsByUserIdActivityLogs otherTyped = other as ListActivityLogsByUserIdActivityLogs; + return id == otherTyped.id && + userId == otherTyped.userId && + date == otherTyped.date && + hourStart == otherTyped.hourStart && + hourEnd == otherTyped.hourEnd && + totalhours == otherTyped.totalhours && + iconType == otherTyped.iconType && + iconColor == otherTyped.iconColor && + title == otherTyped.title && + description == otherTyped.description && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, date.hashCode, hourStart.hashCode, hourEnd.hashCode, totalhours.hashCode, iconType.hashCode, iconColor.hashCode, title.hashCode, description.hashCode, isRead.hashCode, activityType.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['date'] = date.toJson(); + if (hourStart != null) { + json['hourStart'] = nativeToJson(hourStart); + } + if (hourEnd != null) { + json['hourEnd'] = nativeToJson(hourEnd); + } + if (totalhours != null) { + json['totalhours'] = nativeToJson(totalhours); + } + if (iconType != null) { + json['iconType'] = + activityIconTypeSerializer(iconType!) + ; + } + if (iconColor != null) { + json['iconColor'] = nativeToJson(iconColor); + } + json['title'] = nativeToJson(title); + json['description'] = nativeToJson(description); + if (isRead != null) { + json['isRead'] = nativeToJson(isRead); + } + json['activityType'] = + activityTypeSerializer(activityType) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListActivityLogsByUserIdActivityLogs({ + required this.id, + required this.userId, + required this.date, + this.hourStart, + this.hourEnd, + this.totalhours, + this.iconType, + this.iconColor, + required this.title, + required this.description, + this.isRead, + required this.activityType, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListActivityLogsByUserIdData { + final List activityLogs; + ListActivityLogsByUserIdData.fromJson(dynamic json): + + activityLogs = (json['activityLogs'] as List) + .map((e) => ListActivityLogsByUserIdActivityLogs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActivityLogsByUserIdData otherTyped = other as ListActivityLogsByUserIdData; + return activityLogs == otherTyped.activityLogs; + + } + @override + int get hashCode => activityLogs.hashCode; + + + Map toJson() { + Map json = {}; + json['activityLogs'] = activityLogs.map((e) => e.toJson()).toList(); + return json; + } + + ListActivityLogsByUserIdData({ + required this.activityLogs, + }); +} + +@immutable +class ListActivityLogsByUserIdVariables { + final String userId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListActivityLogsByUserIdVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListActivityLogsByUserIdVariables otherTyped = other as ListActivityLogsByUserIdVariables; + return userId == otherTyped.userId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListActivityLogsByUserIdVariables({ + required this.userId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications.dart new file mode 100644 index 00000000..f92a46c3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications.dart @@ -0,0 +1,509 @@ +part of 'generated.dart'; + +class ListApplicationsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListApplicationsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListApplicationsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listApplications", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListApplicationsApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + final Timestamp? appliedAt; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final EnumValue origin; + final Timestamp? createdAt; + final ListApplicationsApplicationsShift shift; + final ListApplicationsApplicationsShiftRole shiftRole; + ListApplicationsApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']), + appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + origin = applicationOriginDeserializer(json['origin']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + shift = ListApplicationsApplicationsShift.fromJson(json['shift']), + shiftRole = ListApplicationsApplicationsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsApplications otherTyped = other as ListApplicationsApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + appliedAt == otherTyped.appliedAt && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + origin == otherTyped.origin && + createdAt == otherTyped.createdAt && + shift == otherTyped.shift && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, appliedAt.hashCode, checkInTime.hashCode, checkOutTime.hashCode, origin.hashCode, createdAt.hashCode, shift.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + if (appliedAt != null) { + json['appliedAt'] = appliedAt!.toJson(); + } + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['origin'] = + applicationOriginSerializer(origin) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['shift'] = shift.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListApplicationsApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + this.appliedAt, + this.checkInTime, + this.checkOutTime, + required this.origin, + this.createdAt, + required this.shift, + required this.shiftRole, + }); +} + +@immutable +class ListApplicationsApplicationsShift { + final String id; + final String title; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final String? location; + final EnumValue? status; + final ListApplicationsApplicationsShiftOrder order; + ListApplicationsApplicationsShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + order = ListApplicationsApplicationsShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsApplicationsShift otherTyped = other as ListApplicationsApplicationsShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + location == otherTyped.location && + status == otherTyped.status && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + json['order'] = order.toJson(); + return json; + } + + ListApplicationsApplicationsShift({ + required this.id, + required this.title, + this.date, + this.startTime, + this.endTime, + this.location, + this.status, + required this.order, + }); +} + +@immutable +class ListApplicationsApplicationsShiftOrder { + final String id; + final String? eventName; + final String? location; + final ListApplicationsApplicationsShiftOrderBusiness business; + final ListApplicationsApplicationsShiftOrderVendor vendor; + ListApplicationsApplicationsShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + business = ListApplicationsApplicationsShiftOrderBusiness.fromJson(json['business']), + vendor = ListApplicationsApplicationsShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsApplicationsShiftOrder otherTyped = other as ListApplicationsApplicationsShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListApplicationsApplicationsShiftOrder({ + required this.id, + this.eventName, + this.location, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListApplicationsApplicationsShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListApplicationsApplicationsShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsApplicationsShiftOrderBusiness otherTyped = other as ListApplicationsApplicationsShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListApplicationsApplicationsShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListApplicationsApplicationsShiftOrderVendor { + final String id; + final String companyName; + ListApplicationsApplicationsShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsApplicationsShiftOrderVendor otherTyped = other as ListApplicationsApplicationsShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListApplicationsApplicationsShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListApplicationsApplicationsShiftRole { + final String id; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final ListApplicationsApplicationsShiftRoleRole role; + ListApplicationsApplicationsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListApplicationsApplicationsShiftRoleRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsApplicationsShiftRole otherTyped = other as ListApplicationsApplicationsShiftRole; + return id == otherTyped.id && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + return json; + } + + ListApplicationsApplicationsShiftRole({ + required this.id, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + }); +} + +@immutable +class ListApplicationsApplicationsShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListApplicationsApplicationsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsApplicationsShiftRoleRole otherTyped = other as ListApplicationsApplicationsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListApplicationsApplicationsShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListApplicationsData { + final List applications; + ListApplicationsData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => ListApplicationsApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsData otherTyped = other as ListApplicationsData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + ListApplicationsData({ + required this.applications, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_coverage.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_coverage.dart new file mode 100644 index 00000000..150fd861 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_coverage.dart @@ -0,0 +1,143 @@ +part of 'generated.dart'; + +class ListApplicationsForCoverageVariablesBuilder { + List shiftIds; + + final FirebaseDataConnect _dataConnect; + ListApplicationsForCoverageVariablesBuilder(this._dataConnect, {required this.shiftIds,}); + Deserializer dataDeserializer = (dynamic json) => ListApplicationsForCoverageData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListApplicationsForCoverageVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListApplicationsForCoverageVariables vars= ListApplicationsForCoverageVariables(shiftIds: shiftIds,); + return _dataConnect.query("listApplicationsForCoverage", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListApplicationsForCoverageApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + ListApplicationsForCoverageApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForCoverageApplications otherTyped = other as ListApplicationsForCoverageApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + return json; + } + + ListApplicationsForCoverageApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + }); +} + +@immutable +class ListApplicationsForCoverageData { + final List applications; + ListApplicationsForCoverageData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => ListApplicationsForCoverageApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForCoverageData otherTyped = other as ListApplicationsForCoverageData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + ListApplicationsForCoverageData({ + required this.applications, + }); +} + +@immutable +class ListApplicationsForCoverageVariables { + final List shiftIds; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListApplicationsForCoverageVariables.fromJson(Map json): + + shiftIds = (json['shiftIds'] as List) + .map((e) => nativeFromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForCoverageVariables otherTyped = other as ListApplicationsForCoverageVariables; + return shiftIds == otherTyped.shiftIds; + + } + @override + int get hashCode => shiftIds.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftIds'] = shiftIds.map((e) => nativeToJson(e)).toList(); + return json; + } + + ListApplicationsForCoverageVariables({ + required this.shiftIds, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_daily_ops.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_daily_ops.dart new file mode 100644 index 00000000..c64a0110 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_daily_ops.dart @@ -0,0 +1,157 @@ +part of 'generated.dart'; + +class ListApplicationsForDailyOpsVariablesBuilder { + List shiftIds; + + final FirebaseDataConnect _dataConnect; + ListApplicationsForDailyOpsVariablesBuilder(this._dataConnect, {required this.shiftIds,}); + Deserializer dataDeserializer = (dynamic json) => ListApplicationsForDailyOpsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListApplicationsForDailyOpsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListApplicationsForDailyOpsVariables vars= ListApplicationsForDailyOpsVariables(shiftIds: shiftIds,); + return _dataConnect.query("listApplicationsForDailyOps", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListApplicationsForDailyOpsApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + ListApplicationsForDailyOpsApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForDailyOpsApplications otherTyped = other as ListApplicationsForDailyOpsApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, checkInTime.hashCode, checkOutTime.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + return json; + } + + ListApplicationsForDailyOpsApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + this.checkInTime, + this.checkOutTime, + }); +} + +@immutable +class ListApplicationsForDailyOpsData { + final List applications; + ListApplicationsForDailyOpsData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => ListApplicationsForDailyOpsApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForDailyOpsData otherTyped = other as ListApplicationsForDailyOpsData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + ListApplicationsForDailyOpsData({ + required this.applications, + }); +} + +@immutable +class ListApplicationsForDailyOpsVariables { + final List shiftIds; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListApplicationsForDailyOpsVariables.fromJson(Map json): + + shiftIds = (json['shiftIds'] as List) + .map((e) => nativeFromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForDailyOpsVariables otherTyped = other as ListApplicationsForDailyOpsVariables; + return shiftIds == otherTyped.shiftIds; + + } + @override + int get hashCode => shiftIds.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftIds'] = shiftIds.map((e) => nativeToJson(e)).toList(); + return json; + } + + ListApplicationsForDailyOpsVariables({ + required this.shiftIds, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_no_show_range.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_no_show_range.dart new file mode 100644 index 00000000..e1c51a64 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_no_show_range.dart @@ -0,0 +1,143 @@ +part of 'generated.dart'; + +class ListApplicationsForNoShowRangeVariablesBuilder { + List shiftIds; + + final FirebaseDataConnect _dataConnect; + ListApplicationsForNoShowRangeVariablesBuilder(this._dataConnect, {required this.shiftIds,}); + Deserializer dataDeserializer = (dynamic json) => ListApplicationsForNoShowRangeData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListApplicationsForNoShowRangeVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListApplicationsForNoShowRangeVariables vars= ListApplicationsForNoShowRangeVariables(shiftIds: shiftIds,); + return _dataConnect.query("listApplicationsForNoShowRange", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListApplicationsForNoShowRangeApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + ListApplicationsForNoShowRangeApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForNoShowRangeApplications otherTyped = other as ListApplicationsForNoShowRangeApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + return json; + } + + ListApplicationsForNoShowRangeApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + }); +} + +@immutable +class ListApplicationsForNoShowRangeData { + final List applications; + ListApplicationsForNoShowRangeData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => ListApplicationsForNoShowRangeApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForNoShowRangeData otherTyped = other as ListApplicationsForNoShowRangeData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + ListApplicationsForNoShowRangeData({ + required this.applications, + }); +} + +@immutable +class ListApplicationsForNoShowRangeVariables { + final List shiftIds; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListApplicationsForNoShowRangeVariables.fromJson(Map json): + + shiftIds = (json['shiftIds'] as List) + .map((e) => nativeFromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForNoShowRangeVariables otherTyped = other as ListApplicationsForNoShowRangeVariables; + return shiftIds == otherTyped.shiftIds; + + } + @override + int get hashCode => shiftIds.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftIds'] = shiftIds.map((e) => nativeToJson(e)).toList(); + return json; + } + + ListApplicationsForNoShowRangeVariables({ + required this.shiftIds, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_performance.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_performance.dart new file mode 100644 index 00000000..6a2c7d27 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_applications_for_performance.dart @@ -0,0 +1,157 @@ +part of 'generated.dart'; + +class ListApplicationsForPerformanceVariablesBuilder { + List shiftIds; + + final FirebaseDataConnect _dataConnect; + ListApplicationsForPerformanceVariablesBuilder(this._dataConnect, {required this.shiftIds,}); + Deserializer dataDeserializer = (dynamic json) => ListApplicationsForPerformanceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListApplicationsForPerformanceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListApplicationsForPerformanceVariables vars= ListApplicationsForPerformanceVariables(shiftIds: shiftIds,); + return _dataConnect.query("listApplicationsForPerformance", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListApplicationsForPerformanceApplications { + final String id; + final String shiftId; + final String staffId; + final EnumValue status; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + ListApplicationsForPerformanceApplications.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + staffId = nativeFromJson(json['staffId']), + status = applicationStatusDeserializer(json['status']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForPerformanceApplications otherTyped = other as ListApplicationsForPerformanceApplications; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, checkInTime.hashCode, checkOutTime.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['staffId'] = nativeToJson(staffId); + json['status'] = + applicationStatusSerializer(status) + ; + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + return json; + } + + ListApplicationsForPerformanceApplications({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + this.checkInTime, + this.checkOutTime, + }); +} + +@immutable +class ListApplicationsForPerformanceData { + final List applications; + ListApplicationsForPerformanceData.fromJson(dynamic json): + + applications = (json['applications'] as List) + .map((e) => ListApplicationsForPerformanceApplications.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForPerformanceData otherTyped = other as ListApplicationsForPerformanceData; + return applications == otherTyped.applications; + + } + @override + int get hashCode => applications.hashCode; + + + Map toJson() { + Map json = {}; + json['applications'] = applications.map((e) => e.toJson()).toList(); + return json; + } + + ListApplicationsForPerformanceData({ + required this.applications, + }); +} + +@immutable +class ListApplicationsForPerformanceVariables { + final List shiftIds; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListApplicationsForPerformanceVariables.fromJson(Map json): + + shiftIds = (json['shiftIds'] as List) + .map((e) => nativeFromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListApplicationsForPerformanceVariables otherTyped = other as ListApplicationsForPerformanceVariables; + return shiftIds == otherTyped.shiftIds; + + } + @override + int get hashCode => shiftIds.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftIds'] = shiftIds.map((e) => nativeToJson(e)).toList(); + return json; + } + + ListApplicationsForPerformanceVariables({ + required this.shiftIds, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments.dart new file mode 100644 index 00000000..71c2f662 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments.dart @@ -0,0 +1,625 @@ +part of 'generated.dart'; + +class ListAssignmentsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListAssignmentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListAssignmentsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListAssignmentsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListAssignmentsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListAssignmentsVariables vars= ListAssignmentsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listAssignments", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListAssignmentsAssignments { + final String id; + final String? title; + final EnumValue? status; + final Timestamp? createdAt; + final ListAssignmentsAssignmentsWorkforce workforce; + final ListAssignmentsAssignmentsShiftRole shiftRole; + ListAssignmentsAssignments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + workforce = ListAssignmentsAssignmentsWorkforce.fromJson(json['workforce']), + shiftRole = ListAssignmentsAssignmentsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignments otherTyped = other as ListAssignmentsAssignments; + return id == otherTyped.id && + title == otherTyped.title && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + workforce == otherTyped.workforce && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, status.hashCode, createdAt.hashCode, workforce.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (status != null) { + json['status'] = + assignmentStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['workforce'] = workforce.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListAssignmentsAssignments({ + required this.id, + this.title, + this.status, + this.createdAt, + required this.workforce, + required this.shiftRole, + }); +} + +@immutable +class ListAssignmentsAssignmentsWorkforce { + final String id; + final String workforceNumber; + final ListAssignmentsAssignmentsWorkforceStaff staff; + ListAssignmentsAssignmentsWorkforce.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workforceNumber = nativeFromJson(json['workforceNumber']), + staff = ListAssignmentsAssignmentsWorkforceStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsWorkforce otherTyped = other as ListAssignmentsAssignmentsWorkforce; + return id == otherTyped.id && + workforceNumber == otherTyped.workforceNumber && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workforceNumber.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['workforceNumber'] = nativeToJson(workforceNumber); + json['staff'] = staff.toJson(); + return json; + } + + ListAssignmentsAssignmentsWorkforce({ + required this.id, + required this.workforceNumber, + required this.staff, + }); +} + +@immutable +class ListAssignmentsAssignmentsWorkforceStaff { + final String id; + final String fullName; + ListAssignmentsAssignmentsWorkforceStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsWorkforceStaff otherTyped = other as ListAssignmentsAssignmentsWorkforceStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListAssignmentsAssignmentsWorkforceStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListAssignmentsAssignmentsShiftRole { + final String id; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final ListAssignmentsAssignmentsShiftRoleRole role; + final ListAssignmentsAssignmentsShiftRoleShift shift; + ListAssignmentsAssignmentsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListAssignmentsAssignmentsShiftRoleRole.fromJson(json['role']), + shift = ListAssignmentsAssignmentsShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsShiftRole otherTyped = other as ListAssignmentsAssignmentsShiftRole; + return id == otherTyped.id && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListAssignmentsAssignmentsShiftRole({ + required this.id, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListAssignmentsAssignmentsShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListAssignmentsAssignmentsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsShiftRoleRole otherTyped = other as ListAssignmentsAssignmentsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListAssignmentsAssignmentsShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListAssignmentsAssignmentsShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? location; + final String? locationAddress; + final double? latitude; + final double? longitude; + final EnumValue? status; + final ListAssignmentsAssignmentsShiftRoleShiftOrder order; + ListAssignmentsAssignmentsShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + latitude = json['latitude'] == null ? null : nativeFromJson(json['latitude']), + longitude = json['longitude'] == null ? null : nativeFromJson(json['longitude']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + order = ListAssignmentsAssignmentsShiftRoleShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsShiftRoleShift otherTyped = other as ListAssignmentsAssignmentsShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + status == otherTyped.status && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, status.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (latitude != null) { + json['latitude'] = nativeToJson(latitude); + } + if (longitude != null) { + json['longitude'] = nativeToJson(longitude); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + json['order'] = order.toJson(); + return json; + } + + ListAssignmentsAssignmentsShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.location, + this.locationAddress, + this.latitude, + this.longitude, + this.status, + required this.order, + }); +} + +@immutable +class ListAssignmentsAssignmentsShiftRoleShiftOrder { + final String id; + final String? eventName; + final ListAssignmentsAssignmentsShiftRoleShiftOrderBusiness business; + final ListAssignmentsAssignmentsShiftRoleShiftOrderVendor vendor; + ListAssignmentsAssignmentsShiftRoleShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + business = ListAssignmentsAssignmentsShiftRoleShiftOrderBusiness.fromJson(json['business']), + vendor = ListAssignmentsAssignmentsShiftRoleShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsShiftRoleShiftOrder otherTyped = other as ListAssignmentsAssignmentsShiftRoleShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListAssignmentsAssignmentsShiftRoleShiftOrder({ + required this.id, + this.eventName, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListAssignmentsAssignmentsShiftRoleShiftOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListAssignmentsAssignmentsShiftRoleShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsShiftRoleShiftOrderBusiness otherTyped = other as ListAssignmentsAssignmentsShiftRoleShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListAssignmentsAssignmentsShiftRoleShiftOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListAssignmentsAssignmentsShiftRoleShiftOrderVendor { + final String id; + final String companyName; + ListAssignmentsAssignmentsShiftRoleShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsAssignmentsShiftRoleShiftOrderVendor otherTyped = other as ListAssignmentsAssignmentsShiftRoleShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListAssignmentsAssignmentsShiftRoleShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListAssignmentsData { + final List assignments; + ListAssignmentsData.fromJson(dynamic json): + + assignments = (json['assignments'] as List) + .map((e) => ListAssignmentsAssignments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsData otherTyped = other as ListAssignmentsData; + return assignments == otherTyped.assignments; + + } + @override + int get hashCode => assignments.hashCode; + + + Map toJson() { + Map json = {}; + json['assignments'] = assignments.map((e) => e.toJson()).toList(); + return json; + } + + ListAssignmentsData({ + required this.assignments, + }); +} + +@immutable +class ListAssignmentsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListAssignmentsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsVariables otherTyped = other as ListAssignmentsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListAssignmentsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_shift_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_shift_role.dart new file mode 100644 index 00000000..8c057dab --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_shift_role.dart @@ -0,0 +1,275 @@ +part of 'generated.dart'; + +class ListAssignmentsByShiftRoleVariablesBuilder { + String shiftId; + String roleId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListAssignmentsByShiftRoleVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsByShiftRoleVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListAssignmentsByShiftRoleVariablesBuilder(this._dataConnect, {required this.shiftId,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => ListAssignmentsByShiftRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListAssignmentsByShiftRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListAssignmentsByShiftRoleVariables vars= ListAssignmentsByShiftRoleVariables(shiftId: shiftId,roleId: roleId,offset: _offset,limit: _limit,); + return _dataConnect.query("listAssignmentsByShiftRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListAssignmentsByShiftRoleAssignments { + final String id; + final String? title; + final EnumValue? status; + final Timestamp? createdAt; + final ListAssignmentsByShiftRoleAssignmentsWorkforce workforce; + ListAssignmentsByShiftRoleAssignments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + workforce = ListAssignmentsByShiftRoleAssignmentsWorkforce.fromJson(json['workforce']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByShiftRoleAssignments otherTyped = other as ListAssignmentsByShiftRoleAssignments; + return id == otherTyped.id && + title == otherTyped.title && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + workforce == otherTyped.workforce; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, status.hashCode, createdAt.hashCode, workforce.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (status != null) { + json['status'] = + assignmentStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['workforce'] = workforce.toJson(); + return json; + } + + ListAssignmentsByShiftRoleAssignments({ + required this.id, + this.title, + this.status, + this.createdAt, + required this.workforce, + }); +} + +@immutable +class ListAssignmentsByShiftRoleAssignmentsWorkforce { + final String id; + final String workforceNumber; + final ListAssignmentsByShiftRoleAssignmentsWorkforceStaff staff; + ListAssignmentsByShiftRoleAssignmentsWorkforce.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workforceNumber = nativeFromJson(json['workforceNumber']), + staff = ListAssignmentsByShiftRoleAssignmentsWorkforceStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByShiftRoleAssignmentsWorkforce otherTyped = other as ListAssignmentsByShiftRoleAssignmentsWorkforce; + return id == otherTyped.id && + workforceNumber == otherTyped.workforceNumber && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workforceNumber.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['workforceNumber'] = nativeToJson(workforceNumber); + json['staff'] = staff.toJson(); + return json; + } + + ListAssignmentsByShiftRoleAssignmentsWorkforce({ + required this.id, + required this.workforceNumber, + required this.staff, + }); +} + +@immutable +class ListAssignmentsByShiftRoleAssignmentsWorkforceStaff { + final String id; + final String fullName; + ListAssignmentsByShiftRoleAssignmentsWorkforceStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByShiftRoleAssignmentsWorkforceStaff otherTyped = other as ListAssignmentsByShiftRoleAssignmentsWorkforceStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListAssignmentsByShiftRoleAssignmentsWorkforceStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListAssignmentsByShiftRoleData { + final List assignments; + ListAssignmentsByShiftRoleData.fromJson(dynamic json): + + assignments = (json['assignments'] as List) + .map((e) => ListAssignmentsByShiftRoleAssignments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByShiftRoleData otherTyped = other as ListAssignmentsByShiftRoleData; + return assignments == otherTyped.assignments; + + } + @override + int get hashCode => assignments.hashCode; + + + Map toJson() { + Map json = {}; + json['assignments'] = assignments.map((e) => e.toJson()).toList(); + return json; + } + + ListAssignmentsByShiftRoleData({ + required this.assignments, + }); +} + +@immutable +class ListAssignmentsByShiftRoleVariables { + final String shiftId; + final String roleId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListAssignmentsByShiftRoleVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']) { + + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByShiftRoleVariables otherTyped = other as ListAssignmentsByShiftRoleVariables; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListAssignmentsByShiftRoleVariables({ + required this.shiftId, + required this.roleId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_workforce_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_workforce_id.dart new file mode 100644 index 00000000..85eb0fb5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_workforce_id.dart @@ -0,0 +1,585 @@ +part of 'generated.dart'; + +class ListAssignmentsByWorkforceIdVariablesBuilder { + String workforceId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListAssignmentsByWorkforceIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsByWorkforceIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListAssignmentsByWorkforceIdVariablesBuilder(this._dataConnect, {required this.workforceId,}); + Deserializer dataDeserializer = (dynamic json) => ListAssignmentsByWorkforceIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListAssignmentsByWorkforceIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListAssignmentsByWorkforceIdVariables vars= ListAssignmentsByWorkforceIdVariables(workforceId: workforceId,offset: _offset,limit: _limit,); + return _dataConnect.query("listAssignmentsByWorkforceId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListAssignmentsByWorkforceIdAssignments { + final String id; + final String? title; + final EnumValue? status; + final Timestamp? createdAt; + final ListAssignmentsByWorkforceIdAssignmentsWorkforce workforce; + final ListAssignmentsByWorkforceIdAssignmentsShiftRole shiftRole; + ListAssignmentsByWorkforceIdAssignments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + workforce = ListAssignmentsByWorkforceIdAssignmentsWorkforce.fromJson(json['workforce']), + shiftRole = ListAssignmentsByWorkforceIdAssignmentsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignments otherTyped = other as ListAssignmentsByWorkforceIdAssignments; + return id == otherTyped.id && + title == otherTyped.title && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + workforce == otherTyped.workforce && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, status.hashCode, createdAt.hashCode, workforce.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (status != null) { + json['status'] = + assignmentStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['workforce'] = workforce.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdAssignments({ + required this.id, + this.title, + this.status, + this.createdAt, + required this.workforce, + required this.shiftRole, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsWorkforce { + final String id; + final String workforceNumber; + final ListAssignmentsByWorkforceIdAssignmentsWorkforceStaff staff; + ListAssignmentsByWorkforceIdAssignmentsWorkforce.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workforceNumber = nativeFromJson(json['workforceNumber']), + staff = ListAssignmentsByWorkforceIdAssignmentsWorkforceStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsWorkforce otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsWorkforce; + return id == otherTyped.id && + workforceNumber == otherTyped.workforceNumber && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workforceNumber.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['workforceNumber'] = nativeToJson(workforceNumber); + json['staff'] = staff.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsWorkforce({ + required this.id, + required this.workforceNumber, + required this.staff, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsWorkforceStaff { + final String id; + final String fullName; + ListAssignmentsByWorkforceIdAssignmentsWorkforceStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsWorkforceStaff otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsWorkforceStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsWorkforceStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsShiftRole { + final String id; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleRole role; + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShift shift; + ListAssignmentsByWorkforceIdAssignmentsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListAssignmentsByWorkforceIdAssignmentsShiftRoleRole.fromJson(json['role']), + shift = ListAssignmentsByWorkforceIdAssignmentsShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsShiftRole otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsShiftRole; + return id == otherTyped.id && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsShiftRole({ + required this.id, + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListAssignmentsByWorkforceIdAssignmentsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleRole otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? location; + final EnumValue? status; + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrder order; + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + order = ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShift otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + status == otherTyped.status && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, status.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + json['order'] = order.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.location, + this.status, + required this.order, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrder { + final String id; + final String? eventName; + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderBusiness business; + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderVendor vendor; + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + business = ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderBusiness.fromJson(json['business']), + vendor = ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrder otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrder({ + required this.id, + this.eventName, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderBusiness { + final String id; + final String businessName; + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderBusiness otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderVendor { + final String id; + final String companyName; + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderVendor otherTyped = other as ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListAssignmentsByWorkforceIdAssignmentsShiftRoleShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdData { + final List assignments; + ListAssignmentsByWorkforceIdData.fromJson(dynamic json): + + assignments = (json['assignments'] as List) + .map((e) => ListAssignmentsByWorkforceIdAssignments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdData otherTyped = other as ListAssignmentsByWorkforceIdData; + return assignments == otherTyped.assignments; + + } + @override + int get hashCode => assignments.hashCode; + + + Map toJson() { + Map json = {}; + json['assignments'] = assignments.map((e) => e.toJson()).toList(); + return json; + } + + ListAssignmentsByWorkforceIdData({ + required this.assignments, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdVariables { + final String workforceId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListAssignmentsByWorkforceIdVariables.fromJson(Map json): + + workforceId = nativeFromJson(json['workforceId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdVariables otherTyped = other as ListAssignmentsByWorkforceIdVariables; + return workforceId == otherTyped.workforceId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([workforceId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['workforceId'] = nativeToJson(workforceId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListAssignmentsByWorkforceIdVariables({ + required this.workforceId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_workforce_ids.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_workforce_ids.dart new file mode 100644 index 00000000..41b688bc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_assignments_by_workforce_ids.dart @@ -0,0 +1,538 @@ +part of 'generated.dart'; + +class ListAssignmentsByWorkforceIdsVariablesBuilder { + List workforceIds; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListAssignmentsByWorkforceIdsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListAssignmentsByWorkforceIdsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListAssignmentsByWorkforceIdsVariablesBuilder(this._dataConnect, {required this.workforceIds,}); + Deserializer dataDeserializer = (dynamic json) => ListAssignmentsByWorkforceIdsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListAssignmentsByWorkforceIdsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListAssignmentsByWorkforceIdsVariables vars= ListAssignmentsByWorkforceIdsVariables(workforceIds: workforceIds,offset: _offset,limit: _limit,); + return _dataConnect.query("listAssignmentsByWorkforceIds", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignments { + final String id; + final String? title; + final EnumValue? status; + final Timestamp? createdAt; + final ListAssignmentsByWorkforceIdsAssignmentsWorkforce workforce; + final ListAssignmentsByWorkforceIdsAssignmentsShiftRole shiftRole; + ListAssignmentsByWorkforceIdsAssignments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + status = json['status'] == null ? null : assignmentStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + workforce = ListAssignmentsByWorkforceIdsAssignmentsWorkforce.fromJson(json['workforce']), + shiftRole = ListAssignmentsByWorkforceIdsAssignmentsShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignments otherTyped = other as ListAssignmentsByWorkforceIdsAssignments; + return id == otherTyped.id && + title == otherTyped.title && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + workforce == otherTyped.workforce && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, status.hashCode, createdAt.hashCode, workforce.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (status != null) { + json['status'] = + assignmentStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['workforce'] = workforce.toJson(); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdsAssignments({ + required this.id, + this.title, + this.status, + this.createdAt, + required this.workforce, + required this.shiftRole, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsWorkforce { + final String id; + final String workforceNumber; + final ListAssignmentsByWorkforceIdsAssignmentsWorkforceStaff staff; + ListAssignmentsByWorkforceIdsAssignmentsWorkforce.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workforceNumber = nativeFromJson(json['workforceNumber']), + staff = ListAssignmentsByWorkforceIdsAssignmentsWorkforceStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsWorkforce otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsWorkforce; + return id == otherTyped.id && + workforceNumber == otherTyped.workforceNumber && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workforceNumber.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['workforceNumber'] = nativeToJson(workforceNumber); + json['staff'] = staff.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsWorkforce({ + required this.id, + required this.workforceNumber, + required this.staff, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsWorkforceStaff { + final String id; + final String fullName; + ListAssignmentsByWorkforceIdsAssignmentsWorkforceStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsWorkforceStaff otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsWorkforceStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsWorkforceStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsShiftRole { + final String id; + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole role; + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift shift; + ListAssignmentsByWorkforceIdsAssignmentsShiftRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + role = ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole.fromJson(json['role']), + shift = ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsShiftRole otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRole; + return id == otherTyped.id && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsShiftRole({ + required this.id, + required this.role, + required this.shift, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole { + final String id; + final String name; + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleRole({ + required this.id, + required this.name, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder order; + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + order = ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + json['order'] = order.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShift({ + required this.id, + required this.title, + this.date, + required this.order, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder { + final String id; + final String? eventName; + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderBusiness business; + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderVendor vendor; + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + business = ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderBusiness.fromJson(json['business']), + vendor = ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrder({ + required this.id, + this.eventName, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderBusiness { + final String id; + final String businessName; + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderBusiness otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderVendor { + final String id; + final String companyName; + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderVendor otherTyped = other as ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListAssignmentsByWorkforceIdsAssignmentsShiftRoleShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsData { + final List assignments; + ListAssignmentsByWorkforceIdsData.fromJson(dynamic json): + + assignments = (json['assignments'] as List) + .map((e) => ListAssignmentsByWorkforceIdsAssignments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsData otherTyped = other as ListAssignmentsByWorkforceIdsData; + return assignments == otherTyped.assignments; + + } + @override + int get hashCode => assignments.hashCode; + + + Map toJson() { + Map json = {}; + json['assignments'] = assignments.map((e) => e.toJson()).toList(); + return json; + } + + ListAssignmentsByWorkforceIdsData({ + required this.assignments, + }); +} + +@immutable +class ListAssignmentsByWorkforceIdsVariables { + final List workforceIds; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListAssignmentsByWorkforceIdsVariables.fromJson(Map json): + + workforceIds = (json['workforceIds'] as List) + .map((e) => nativeFromJson(e)) + .toList() { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAssignmentsByWorkforceIdsVariables otherTyped = other as ListAssignmentsByWorkforceIdsVariables; + return workforceIds == otherTyped.workforceIds && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([workforceIds.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['workforceIds'] = workforceIds.map((e) => nativeToJson(e)).toList(); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListAssignmentsByWorkforceIdsVariables({ + required this.workforceIds, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_attire_options.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_attire_options.dart new file mode 100644 index 00000000..ca615c26 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_attire_options.dart @@ -0,0 +1,133 @@ +part of 'generated.dart'; + +class ListAttireOptionsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListAttireOptionsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListAttireOptionsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listAttireOptions", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListAttireOptionsAttireOptions { + final String id; + final String itemId; + final String label; + final String? icon; + final String? imageUrl; + final bool? isMandatory; + final String? vendorId; + final Timestamp? createdAt; + ListAttireOptionsAttireOptions.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + itemId = nativeFromJson(json['itemId']), + label = nativeFromJson(json['label']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + imageUrl = json['imageUrl'] == null ? null : nativeFromJson(json['imageUrl']), + isMandatory = json['isMandatory'] == null ? null : nativeFromJson(json['isMandatory']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAttireOptionsAttireOptions otherTyped = other as ListAttireOptionsAttireOptions; + return id == otherTyped.id && + itemId == otherTyped.itemId && + label == otherTyped.label && + icon == otherTyped.icon && + imageUrl == otherTyped.imageUrl && + isMandatory == otherTyped.isMandatory && + vendorId == otherTyped.vendorId && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, itemId.hashCode, label.hashCode, icon.hashCode, imageUrl.hashCode, isMandatory.hashCode, vendorId.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['itemId'] = nativeToJson(itemId); + json['label'] = nativeToJson(label); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (imageUrl != null) { + json['imageUrl'] = nativeToJson(imageUrl); + } + if (isMandatory != null) { + json['isMandatory'] = nativeToJson(isMandatory); + } + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListAttireOptionsAttireOptions({ + required this.id, + required this.itemId, + required this.label, + this.icon, + this.imageUrl, + this.isMandatory, + this.vendorId, + this.createdAt, + }); +} + +@immutable +class ListAttireOptionsData { + final List attireOptions; + ListAttireOptionsData.fromJson(dynamic json): + + attireOptions = (json['attireOptions'] as List) + .map((e) => ListAttireOptionsAttireOptions.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListAttireOptionsData otherTyped = other as ListAttireOptionsData; + return attireOptions == otherTyped.attireOptions; + + } + @override + int get hashCode => attireOptions.hashCode; + + + Map toJson() { + Map json = {}; + json['attireOptions'] = attireOptions.map((e) => e.toJson()).toList(); + return json; + } + + ListAttireOptionsData({ + required this.attireOptions, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data.dart new file mode 100644 index 00000000..6ba3c923 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data.dart @@ -0,0 +1,286 @@ +part of 'generated.dart'; + +class ListBenefitsDataVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListBenefitsDataVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListBenefitsDataVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListBenefitsDataData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListBenefitsDataVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListBenefitsDataVariables vars= ListBenefitsDataVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listBenefitsData", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListBenefitsDataBenefitsDatas { + final String id; + final String vendorBenefitPlanId; + final int current; + final String staffId; + final ListBenefitsDataBenefitsDatasStaff staff; + final ListBenefitsDataBenefitsDatasVendorBenefitPlan vendorBenefitPlan; + ListBenefitsDataBenefitsDatas.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + current = nativeFromJson(json['current']), + staffId = nativeFromJson(json['staffId']), + staff = ListBenefitsDataBenefitsDatasStaff.fromJson(json['staff']), + vendorBenefitPlan = ListBenefitsDataBenefitsDatasVendorBenefitPlan.fromJson(json['vendorBenefitPlan']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataBenefitsDatas otherTyped = other as ListBenefitsDataBenefitsDatas; + return id == otherTyped.id && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + current == otherTyped.current && + staffId == otherTyped.staffId && + staff == otherTyped.staff && + vendorBenefitPlan == otherTyped.vendorBenefitPlan; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorBenefitPlanId.hashCode, current.hashCode, staffId.hashCode, staff.hashCode, vendorBenefitPlan.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['current'] = nativeToJson(current); + json['staffId'] = nativeToJson(staffId); + json['staff'] = staff.toJson(); + json['vendorBenefitPlan'] = vendorBenefitPlan.toJson(); + return json; + } + + ListBenefitsDataBenefitsDatas({ + required this.id, + required this.vendorBenefitPlanId, + required this.current, + required this.staffId, + required this.staff, + required this.vendorBenefitPlan, + }); +} + +@immutable +class ListBenefitsDataBenefitsDatasStaff { + final String id; + final String fullName; + ListBenefitsDataBenefitsDatasStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataBenefitsDatasStaff otherTyped = other as ListBenefitsDataBenefitsDatasStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListBenefitsDataBenefitsDatasStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListBenefitsDataBenefitsDatasVendorBenefitPlan { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + ListBenefitsDataBenefitsDatasVendorBenefitPlan.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataBenefitsDatasVendorBenefitPlan otherTyped = other as ListBenefitsDataBenefitsDatasVendorBenefitPlan; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + return json; + } + + ListBenefitsDataBenefitsDatasVendorBenefitPlan({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + }); +} + +@immutable +class ListBenefitsDataData { + final List benefitsDatas; + ListBenefitsDataData.fromJson(dynamic json): + + benefitsDatas = (json['benefitsDatas'] as List) + .map((e) => ListBenefitsDataBenefitsDatas.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataData otherTyped = other as ListBenefitsDataData; + return benefitsDatas == otherTyped.benefitsDatas; + + } + @override + int get hashCode => benefitsDatas.hashCode; + + + Map toJson() { + Map json = {}; + json['benefitsDatas'] = benefitsDatas.map((e) => e.toJson()).toList(); + return json; + } + + ListBenefitsDataData({ + required this.benefitsDatas, + }); +} + +@immutable +class ListBenefitsDataVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListBenefitsDataVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataVariables otherTyped = other as ListBenefitsDataVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListBenefitsDataVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_staff_id.dart new file mode 100644 index 00000000..dcb5e7b5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_staff_id.dart @@ -0,0 +1,293 @@ +part of 'generated.dart'; + +class ListBenefitsDataByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListBenefitsDataByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListBenefitsDataByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListBenefitsDataByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListBenefitsDataByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListBenefitsDataByStaffIdVariables vars= ListBenefitsDataByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("listBenefitsDataByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListBenefitsDataByStaffIdBenefitsDatas { + final String id; + final String vendorBenefitPlanId; + final int current; + final String staffId; + final ListBenefitsDataByStaffIdBenefitsDatasStaff staff; + final ListBenefitsDataByStaffIdBenefitsDatasVendorBenefitPlan vendorBenefitPlan; + ListBenefitsDataByStaffIdBenefitsDatas.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + current = nativeFromJson(json['current']), + staffId = nativeFromJson(json['staffId']), + staff = ListBenefitsDataByStaffIdBenefitsDatasStaff.fromJson(json['staff']), + vendorBenefitPlan = ListBenefitsDataByStaffIdBenefitsDatasVendorBenefitPlan.fromJson(json['vendorBenefitPlan']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByStaffIdBenefitsDatas otherTyped = other as ListBenefitsDataByStaffIdBenefitsDatas; + return id == otherTyped.id && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + current == otherTyped.current && + staffId == otherTyped.staffId && + staff == otherTyped.staff && + vendorBenefitPlan == otherTyped.vendorBenefitPlan; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorBenefitPlanId.hashCode, current.hashCode, staffId.hashCode, staff.hashCode, vendorBenefitPlan.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['current'] = nativeToJson(current); + json['staffId'] = nativeToJson(staffId); + json['staff'] = staff.toJson(); + json['vendorBenefitPlan'] = vendorBenefitPlan.toJson(); + return json; + } + + ListBenefitsDataByStaffIdBenefitsDatas({ + required this.id, + required this.vendorBenefitPlanId, + required this.current, + required this.staffId, + required this.staff, + required this.vendorBenefitPlan, + }); +} + +@immutable +class ListBenefitsDataByStaffIdBenefitsDatasStaff { + final String id; + final String fullName; + ListBenefitsDataByStaffIdBenefitsDatasStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByStaffIdBenefitsDatasStaff otherTyped = other as ListBenefitsDataByStaffIdBenefitsDatasStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListBenefitsDataByStaffIdBenefitsDatasStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListBenefitsDataByStaffIdBenefitsDatasVendorBenefitPlan { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + ListBenefitsDataByStaffIdBenefitsDatasVendorBenefitPlan.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByStaffIdBenefitsDatasVendorBenefitPlan otherTyped = other as ListBenefitsDataByStaffIdBenefitsDatasVendorBenefitPlan; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + return json; + } + + ListBenefitsDataByStaffIdBenefitsDatasVendorBenefitPlan({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + }); +} + +@immutable +class ListBenefitsDataByStaffIdData { + final List benefitsDatas; + ListBenefitsDataByStaffIdData.fromJson(dynamic json): + + benefitsDatas = (json['benefitsDatas'] as List) + .map((e) => ListBenefitsDataByStaffIdBenefitsDatas.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByStaffIdData otherTyped = other as ListBenefitsDataByStaffIdData; + return benefitsDatas == otherTyped.benefitsDatas; + + } + @override + int get hashCode => benefitsDatas.hashCode; + + + Map toJson() { + Map json = {}; + json['benefitsDatas'] = benefitsDatas.map((e) => e.toJson()).toList(); + return json; + } + + ListBenefitsDataByStaffIdData({ + required this.benefitsDatas, + }); +} + +@immutable +class ListBenefitsDataByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListBenefitsDataByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByStaffIdVariables otherTyped = other as ListBenefitsDataByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListBenefitsDataByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_vendor_benefit_plan_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_vendor_benefit_plan_id.dart new file mode 100644 index 00000000..c0e6d452 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_vendor_benefit_plan_id.dart @@ -0,0 +1,293 @@ +part of 'generated.dart'; + +class ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder { + String vendorBenefitPlanId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListBenefitsDataByVendorBenefitPlanIdVariablesBuilder(this._dataConnect, {required this.vendorBenefitPlanId,}); + Deserializer dataDeserializer = (dynamic json) => ListBenefitsDataByVendorBenefitPlanIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListBenefitsDataByVendorBenefitPlanIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListBenefitsDataByVendorBenefitPlanIdVariables vars= ListBenefitsDataByVendorBenefitPlanIdVariables(vendorBenefitPlanId: vendorBenefitPlanId,offset: _offset,limit: _limit,); + return _dataConnect.query("listBenefitsDataByVendorBenefitPlanId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdBenefitsDatas { + final String id; + final String vendorBenefitPlanId; + final int current; + final String staffId; + final ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasStaff staff; + final ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasVendorBenefitPlan vendorBenefitPlan; + ListBenefitsDataByVendorBenefitPlanIdBenefitsDatas.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + current = nativeFromJson(json['current']), + staffId = nativeFromJson(json['staffId']), + staff = ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasStaff.fromJson(json['staff']), + vendorBenefitPlan = ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasVendorBenefitPlan.fromJson(json['vendorBenefitPlan']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdBenefitsDatas otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdBenefitsDatas; + return id == otherTyped.id && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + current == otherTyped.current && + staffId == otherTyped.staffId && + staff == otherTyped.staff && + vendorBenefitPlan == otherTyped.vendorBenefitPlan; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorBenefitPlanId.hashCode, current.hashCode, staffId.hashCode, staff.hashCode, vendorBenefitPlan.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['current'] = nativeToJson(current); + json['staffId'] = nativeToJson(staffId); + json['staff'] = staff.toJson(); + json['vendorBenefitPlan'] = vendorBenefitPlan.toJson(); + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdBenefitsDatas({ + required this.id, + required this.vendorBenefitPlanId, + required this.current, + required this.staffId, + required this.staff, + required this.vendorBenefitPlan, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasStaff { + final String id; + final String fullName; + ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasStaff otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasVendorBenefitPlan { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasVendorBenefitPlan.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasVendorBenefitPlan otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasVendorBenefitPlan; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdBenefitsDatasVendorBenefitPlan({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdData { + final List benefitsDatas; + ListBenefitsDataByVendorBenefitPlanIdData.fromJson(dynamic json): + + benefitsDatas = (json['benefitsDatas'] as List) + .map((e) => ListBenefitsDataByVendorBenefitPlanIdBenefitsDatas.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdData otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdData; + return benefitsDatas == otherTyped.benefitsDatas; + + } + @override + int get hashCode => benefitsDatas.hashCode; + + + Map toJson() { + Map json = {}; + json['benefitsDatas'] = benefitsDatas.map((e) => e.toJson()).toList(); + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdData({ + required this.benefitsDatas, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdVariables { + final String vendorBenefitPlanId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListBenefitsDataByVendorBenefitPlanIdVariables.fromJson(Map json): + + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdVariables otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdVariables; + return vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorBenefitPlanId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdVariables({ + required this.vendorBenefitPlanId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_vendor_benefit_plan_ids.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_vendor_benefit_plan_ids.dart new file mode 100644 index 00000000..de055ed1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_benefits_data_by_vendor_benefit_plan_ids.dart @@ -0,0 +1,295 @@ +part of 'generated.dart'; + +class ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder { + List vendorBenefitPlanIds; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListBenefitsDataByVendorBenefitPlanIdsVariablesBuilder(this._dataConnect, {required this.vendorBenefitPlanIds,}); + Deserializer dataDeserializer = (dynamic json) => ListBenefitsDataByVendorBenefitPlanIdsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListBenefitsDataByVendorBenefitPlanIdsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListBenefitsDataByVendorBenefitPlanIdsVariables vars= ListBenefitsDataByVendorBenefitPlanIdsVariables(vendorBenefitPlanIds: vendorBenefitPlanIds,offset: _offset,limit: _limit,); + return _dataConnect.query("listBenefitsDataByVendorBenefitPlanIds", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatas { + final String id; + final String vendorBenefitPlanId; + final int current; + final String staffId; + final ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff staff; + final ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan vendorBenefitPlan; + ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatas.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + current = nativeFromJson(json['current']), + staffId = nativeFromJson(json['staffId']), + staff = ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff.fromJson(json['staff']), + vendorBenefitPlan = ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan.fromJson(json['vendorBenefitPlan']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatas otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatas; + return id == otherTyped.id && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + current == otherTyped.current && + staffId == otherTyped.staffId && + staff == otherTyped.staff && + vendorBenefitPlan == otherTyped.vendorBenefitPlan; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorBenefitPlanId.hashCode, current.hashCode, staffId.hashCode, staff.hashCode, vendorBenefitPlan.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['current'] = nativeToJson(current); + json['staffId'] = nativeToJson(staffId); + json['staff'] = staff.toJson(); + json['vendorBenefitPlan'] = vendorBenefitPlan.toJson(); + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatas({ + required this.id, + required this.vendorBenefitPlanId, + required this.current, + required this.staffId, + required this.staff, + required this.vendorBenefitPlan, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff { + final String id; + final String fullName; + ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatasVendorBenefitPlan({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdsData { + final List benefitsDatas; + ListBenefitsDataByVendorBenefitPlanIdsData.fromJson(dynamic json): + + benefitsDatas = (json['benefitsDatas'] as List) + .map((e) => ListBenefitsDataByVendorBenefitPlanIdsBenefitsDatas.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdsData otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsData; + return benefitsDatas == otherTyped.benefitsDatas; + + } + @override + int get hashCode => benefitsDatas.hashCode; + + + Map toJson() { + Map json = {}; + json['benefitsDatas'] = benefitsDatas.map((e) => e.toJson()).toList(); + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdsData({ + required this.benefitsDatas, + }); +} + +@immutable +class ListBenefitsDataByVendorBenefitPlanIdsVariables { + final List vendorBenefitPlanIds; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListBenefitsDataByVendorBenefitPlanIdsVariables.fromJson(Map json): + + vendorBenefitPlanIds = (json['vendorBenefitPlanIds'] as List) + .map((e) => nativeFromJson(e)) + .toList() { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBenefitsDataByVendorBenefitPlanIdsVariables otherTyped = other as ListBenefitsDataByVendorBenefitPlanIdsVariables; + return vendorBenefitPlanIds == otherTyped.vendorBenefitPlanIds && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorBenefitPlanIds.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlanIds'] = vendorBenefitPlanIds.map((e) => nativeToJson(e)).toList(); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListBenefitsDataByVendorBenefitPlanIdsVariables({ + required this.vendorBenefitPlanIds, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_businesses.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_businesses.dart new file mode 100644 index 00000000..146298ef --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_businesses.dart @@ -0,0 +1,200 @@ +part of 'generated.dart'; + +class ListBusinessesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListBusinessesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListBusinessesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listBusinesses", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListBusinessesBusinesses { + final String id; + final String businessName; + final String? contactName; + final String userId; + final String? companyLogoUrl; + final String? phone; + final String? email; + final String? hubBuilding; + final String? address; + final String? city; + final EnumValue? area; + final EnumValue? sector; + final EnumValue rateGroup; + final EnumValue status; + final String? notes; + final Timestamp? createdAt; + final Timestamp? updatedAt; + ListBusinessesBusinesses.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']), + userId = nativeFromJson(json['userId']), + companyLogoUrl = json['companyLogoUrl'] == null ? null : nativeFromJson(json['companyLogoUrl']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + hubBuilding = json['hubBuilding'] == null ? null : nativeFromJson(json['hubBuilding']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + area = json['area'] == null ? null : businessAreaDeserializer(json['area']), + sector = json['sector'] == null ? null : businessSectorDeserializer(json['sector']), + rateGroup = businessRateGroupDeserializer(json['rateGroup']), + status = businessStatusDeserializer(json['status']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBusinessesBusinesses otherTyped = other as ListBusinessesBusinesses; + return id == otherTyped.id && + businessName == otherTyped.businessName && + contactName == otherTyped.contactName && + userId == otherTyped.userId && + companyLogoUrl == otherTyped.companyLogoUrl && + phone == otherTyped.phone && + email == otherTyped.email && + hubBuilding == otherTyped.hubBuilding && + address == otherTyped.address && + city == otherTyped.city && + area == otherTyped.area && + sector == otherTyped.sector && + rateGroup == otherTyped.rateGroup && + status == otherTyped.status && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, contactName.hashCode, userId.hashCode, companyLogoUrl.hashCode, phone.hashCode, email.hashCode, hubBuilding.hashCode, address.hashCode, city.hashCode, area.hashCode, sector.hashCode, rateGroup.hashCode, status.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + json['userId'] = nativeToJson(userId); + if (companyLogoUrl != null) { + json['companyLogoUrl'] = nativeToJson(companyLogoUrl); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (hubBuilding != null) { + json['hubBuilding'] = nativeToJson(hubBuilding); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (area != null) { + json['area'] = + businessAreaSerializer(area!) + ; + } + if (sector != null) { + json['sector'] = + businessSectorSerializer(sector!) + ; + } + json['rateGroup'] = + businessRateGroupSerializer(rateGroup) + ; + json['status'] = + businessStatusSerializer(status) + ; + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + ListBusinessesBusinesses({ + required this.id, + required this.businessName, + this.contactName, + required this.userId, + this.companyLogoUrl, + this.phone, + this.email, + this.hubBuilding, + this.address, + this.city, + this.area, + this.sector, + required this.rateGroup, + required this.status, + this.notes, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class ListBusinessesData { + final List businesses; + ListBusinessesData.fromJson(dynamic json): + + businesses = (json['businesses'] as List) + .map((e) => ListBusinessesBusinesses.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListBusinessesData otherTyped = other as ListBusinessesData; + return businesses == otherTyped.businesses; + + } + @override + int get hashCode => businesses.hashCode; + + + Map toJson() { + Map json = {}; + json['businesses'] = businesses.map((e) => e.toJson()).toList(); + return json; + } + + ListBusinessesData({ + required this.businesses, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_categories.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_categories.dart new file mode 100644 index 00000000..363c245e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_categories.dart @@ -0,0 +1,126 @@ +part of 'generated.dart'; + +class ListCategoriesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListCategoriesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListCategoriesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listCategories", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListCategoriesCategories { + final String id; + final String categoryId; + final String label; + final String? icon; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListCategoriesCategories.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + categoryId = nativeFromJson(json['categoryId']), + label = nativeFromJson(json['label']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCategoriesCategories otherTyped = other as ListCategoriesCategories; + return id == otherTyped.id && + categoryId == otherTyped.categoryId && + label == otherTyped.label && + icon == otherTyped.icon && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, categoryId.hashCode, label.hashCode, icon.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['categoryId'] = nativeToJson(categoryId); + json['label'] = nativeToJson(label); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListCategoriesCategories({ + required this.id, + required this.categoryId, + required this.label, + this.icon, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListCategoriesData { + final List categories; + ListCategoriesData.fromJson(dynamic json): + + categories = (json['categories'] as List) + .map((e) => ListCategoriesCategories.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCategoriesData otherTyped = other as ListCategoriesData; + return categories == otherTyped.categories; + + } + @override + int get hashCode => categories.hashCode; + + + Map toJson() { + Map json = {}; + json['categories'] = categories.map((e) => e.toJson()).toList(); + return json; + } + + ListCategoriesData({ + required this.categories, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_certificates.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_certificates.dart new file mode 100644 index 00000000..037c7c39 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_certificates.dart @@ -0,0 +1,216 @@ +part of 'generated.dart'; + +class ListCertificatesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListCertificatesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListCertificatesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listCertificates", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListCertificatesCertificates { + final String id; + final String name; + final String? description; + final Timestamp? expiry; + final EnumValue status; + final String? fileUrl; + final String? icon; + final String staffId; + final EnumValue? certificationType; + final String? issuer; + final EnumValue? validationStatus; + final String? certificateNumber; + final Timestamp? createdAt; + final ListCertificatesCertificatesStaff staff; + ListCertificatesCertificates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + expiry = json['expiry'] == null ? null : Timestamp.fromJson(json['expiry']), + status = certificateStatusDeserializer(json['status']), + fileUrl = json['fileUrl'] == null ? null : nativeFromJson(json['fileUrl']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + staffId = nativeFromJson(json['staffId']), + certificationType = json['certificationType'] == null ? null : complianceTypeDeserializer(json['certificationType']), + issuer = json['issuer'] == null ? null : nativeFromJson(json['issuer']), + validationStatus = json['validationStatus'] == null ? null : validationStatusDeserializer(json['validationStatus']), + certificateNumber = json['certificateNumber'] == null ? null : nativeFromJson(json['certificateNumber']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + staff = ListCertificatesCertificatesStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCertificatesCertificates otherTyped = other as ListCertificatesCertificates; + return id == otherTyped.id && + name == otherTyped.name && + description == otherTyped.description && + expiry == otherTyped.expiry && + status == otherTyped.status && + fileUrl == otherTyped.fileUrl && + icon == otherTyped.icon && + staffId == otherTyped.staffId && + certificationType == otherTyped.certificationType && + issuer == otherTyped.issuer && + validationStatus == otherTyped.validationStatus && + certificateNumber == otherTyped.certificateNumber && + createdAt == otherTyped.createdAt && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, description.hashCode, expiry.hashCode, status.hashCode, fileUrl.hashCode, icon.hashCode, staffId.hashCode, certificationType.hashCode, issuer.hashCode, validationStatus.hashCode, certificateNumber.hashCode, createdAt.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (expiry != null) { + json['expiry'] = expiry!.toJson(); + } + json['status'] = + certificateStatusSerializer(status) + ; + if (fileUrl != null) { + json['fileUrl'] = nativeToJson(fileUrl); + } + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + json['staffId'] = nativeToJson(staffId); + if (certificationType != null) { + json['certificationType'] = + complianceTypeSerializer(certificationType!) + ; + } + if (issuer != null) { + json['issuer'] = nativeToJson(issuer); + } + if (validationStatus != null) { + json['validationStatus'] = + validationStatusSerializer(validationStatus!) + ; + } + if (certificateNumber != null) { + json['certificateNumber'] = nativeToJson(certificateNumber); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['staff'] = staff.toJson(); + return json; + } + + ListCertificatesCertificates({ + required this.id, + required this.name, + this.description, + this.expiry, + required this.status, + this.fileUrl, + this.icon, + required this.staffId, + this.certificationType, + this.issuer, + this.validationStatus, + this.certificateNumber, + this.createdAt, + required this.staff, + }); +} + +@immutable +class ListCertificatesCertificatesStaff { + final String id; + final String fullName; + ListCertificatesCertificatesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCertificatesCertificatesStaff otherTyped = other as ListCertificatesCertificatesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListCertificatesCertificatesStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListCertificatesData { + final List certificates; + ListCertificatesData.fromJson(dynamic json): + + certificates = (json['certificates'] as List) + .map((e) => ListCertificatesCertificates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCertificatesData otherTyped = other as ListCertificatesData; + return certificates == otherTyped.certificates; + + } + @override + int get hashCode => certificates.hashCode; + + + Map toJson() { + Map json = {}; + json['certificates'] = certificates.map((e) => e.toJson()).toList(); + return json; + } + + ListCertificatesData({ + required this.certificates, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_certificates_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_certificates_by_staff_id.dart new file mode 100644 index 00000000..fb63414f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_certificates_by_staff_id.dart @@ -0,0 +1,252 @@ +part of 'generated.dart'; + +class ListCertificatesByStaffIdVariablesBuilder { + String staffId; + + final FirebaseDataConnect _dataConnect; + ListCertificatesByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListCertificatesByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListCertificatesByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListCertificatesByStaffIdVariables vars= ListCertificatesByStaffIdVariables(staffId: staffId,); + return _dataConnect.query("listCertificatesByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListCertificatesByStaffIdCertificates { + final String id; + final String name; + final String? description; + final Timestamp? expiry; + final EnumValue status; + final String? fileUrl; + final String? icon; + final String staffId; + final EnumValue? certificationType; + final String? issuer; + final EnumValue? validationStatus; + final String? certificateNumber; + final Timestamp? createdAt; + final ListCertificatesByStaffIdCertificatesStaff staff; + ListCertificatesByStaffIdCertificates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + expiry = json['expiry'] == null ? null : Timestamp.fromJson(json['expiry']), + status = certificateStatusDeserializer(json['status']), + fileUrl = json['fileUrl'] == null ? null : nativeFromJson(json['fileUrl']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + staffId = nativeFromJson(json['staffId']), + certificationType = json['certificationType'] == null ? null : complianceTypeDeserializer(json['certificationType']), + issuer = json['issuer'] == null ? null : nativeFromJson(json['issuer']), + validationStatus = json['validationStatus'] == null ? null : validationStatusDeserializer(json['validationStatus']), + certificateNumber = json['certificateNumber'] == null ? null : nativeFromJson(json['certificateNumber']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + staff = ListCertificatesByStaffIdCertificatesStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCertificatesByStaffIdCertificates otherTyped = other as ListCertificatesByStaffIdCertificates; + return id == otherTyped.id && + name == otherTyped.name && + description == otherTyped.description && + expiry == otherTyped.expiry && + status == otherTyped.status && + fileUrl == otherTyped.fileUrl && + icon == otherTyped.icon && + staffId == otherTyped.staffId && + certificationType == otherTyped.certificationType && + issuer == otherTyped.issuer && + validationStatus == otherTyped.validationStatus && + certificateNumber == otherTyped.certificateNumber && + createdAt == otherTyped.createdAt && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, description.hashCode, expiry.hashCode, status.hashCode, fileUrl.hashCode, icon.hashCode, staffId.hashCode, certificationType.hashCode, issuer.hashCode, validationStatus.hashCode, certificateNumber.hashCode, createdAt.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (expiry != null) { + json['expiry'] = expiry!.toJson(); + } + json['status'] = + certificateStatusSerializer(status) + ; + if (fileUrl != null) { + json['fileUrl'] = nativeToJson(fileUrl); + } + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + json['staffId'] = nativeToJson(staffId); + if (certificationType != null) { + json['certificationType'] = + complianceTypeSerializer(certificationType!) + ; + } + if (issuer != null) { + json['issuer'] = nativeToJson(issuer); + } + if (validationStatus != null) { + json['validationStatus'] = + validationStatusSerializer(validationStatus!) + ; + } + if (certificateNumber != null) { + json['certificateNumber'] = nativeToJson(certificateNumber); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['staff'] = staff.toJson(); + return json; + } + + ListCertificatesByStaffIdCertificates({ + required this.id, + required this.name, + this.description, + this.expiry, + required this.status, + this.fileUrl, + this.icon, + required this.staffId, + this.certificationType, + this.issuer, + this.validationStatus, + this.certificateNumber, + this.createdAt, + required this.staff, + }); +} + +@immutable +class ListCertificatesByStaffIdCertificatesStaff { + final String id; + final String fullName; + ListCertificatesByStaffIdCertificatesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCertificatesByStaffIdCertificatesStaff otherTyped = other as ListCertificatesByStaffIdCertificatesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListCertificatesByStaffIdCertificatesStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListCertificatesByStaffIdData { + final List certificates; + ListCertificatesByStaffIdData.fromJson(dynamic json): + + certificates = (json['certificates'] as List) + .map((e) => ListCertificatesByStaffIdCertificates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCertificatesByStaffIdData otherTyped = other as ListCertificatesByStaffIdData; + return certificates == otherTyped.certificates; + + } + @override + int get hashCode => certificates.hashCode; + + + Map toJson() { + Map json = {}; + json['certificates'] = certificates.map((e) => e.toJson()).toList(); + return json; + } + + ListCertificatesByStaffIdData({ + required this.certificates, + }); +} + +@immutable +class ListCertificatesByStaffIdVariables { + final String staffId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListCertificatesByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCertificatesByStaffIdVariables otherTyped = other as ListCertificatesByStaffIdVariables; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + ListCertificatesByStaffIdVariables({ + required this.staffId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedback_ratings_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedback_ratings_by_vendor_id.dart new file mode 100644 index 00000000..d8d6a5e9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedback_ratings_by_vendor_id.dart @@ -0,0 +1,266 @@ +part of 'generated.dart'; + +class ListClientFeedbackRatingsByVendorIdVariablesBuilder { + String vendorId; + Optional _dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + Optional _dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; ListClientFeedbackRatingsByVendorIdVariablesBuilder dateFrom(Timestamp? t) { + _dateFrom.value = t; + return this; + } + ListClientFeedbackRatingsByVendorIdVariablesBuilder dateTo(Timestamp? t) { + _dateTo.value = t; + return this; + } + + ListClientFeedbackRatingsByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListClientFeedbackRatingsByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListClientFeedbackRatingsByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListClientFeedbackRatingsByVendorIdVariables vars= ListClientFeedbackRatingsByVendorIdVariables(vendorId: vendorId,dateFrom: _dateFrom,dateTo: _dateTo,); + return _dataConnect.query("listClientFeedbackRatingsByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListClientFeedbackRatingsByVendorIdClientFeedbacks { + final String id; + final int? rating; + final String? comment; + final Timestamp? date; + final ListClientFeedbackRatingsByVendorIdClientFeedbacksBusiness business; + final ListClientFeedbackRatingsByVendorIdClientFeedbacksVendor vendor; + ListClientFeedbackRatingsByVendorIdClientFeedbacks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + rating = json['rating'] == null ? null : nativeFromJson(json['rating']), + comment = json['comment'] == null ? null : nativeFromJson(json['comment']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + business = ListClientFeedbackRatingsByVendorIdClientFeedbacksBusiness.fromJson(json['business']), + vendor = ListClientFeedbackRatingsByVendorIdClientFeedbacksVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbackRatingsByVendorIdClientFeedbacks otherTyped = other as ListClientFeedbackRatingsByVendorIdClientFeedbacks; + return id == otherTyped.id && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, rating.hashCode, comment.hashCode, date.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (rating != null) { + json['rating'] = nativeToJson(rating); + } + if (comment != null) { + json['comment'] = nativeToJson(comment); + } + if (date != null) { + json['date'] = date!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListClientFeedbackRatingsByVendorIdClientFeedbacks({ + required this.id, + this.rating, + this.comment, + this.date, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListClientFeedbackRatingsByVendorIdClientFeedbacksBusiness { + final String id; + final String businessName; + ListClientFeedbackRatingsByVendorIdClientFeedbacksBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbackRatingsByVendorIdClientFeedbacksBusiness otherTyped = other as ListClientFeedbackRatingsByVendorIdClientFeedbacksBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListClientFeedbackRatingsByVendorIdClientFeedbacksBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListClientFeedbackRatingsByVendorIdClientFeedbacksVendor { + final String id; + final String companyName; + ListClientFeedbackRatingsByVendorIdClientFeedbacksVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbackRatingsByVendorIdClientFeedbacksVendor otherTyped = other as ListClientFeedbackRatingsByVendorIdClientFeedbacksVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListClientFeedbackRatingsByVendorIdClientFeedbacksVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListClientFeedbackRatingsByVendorIdData { + final List clientFeedbacks; + ListClientFeedbackRatingsByVendorIdData.fromJson(dynamic json): + + clientFeedbacks = (json['clientFeedbacks'] as List) + .map((e) => ListClientFeedbackRatingsByVendorIdClientFeedbacks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbackRatingsByVendorIdData otherTyped = other as ListClientFeedbackRatingsByVendorIdData; + return clientFeedbacks == otherTyped.clientFeedbacks; + + } + @override + int get hashCode => clientFeedbacks.hashCode; + + + Map toJson() { + Map json = {}; + json['clientFeedbacks'] = clientFeedbacks.map((e) => e.toJson()).toList(); + return json; + } + + ListClientFeedbackRatingsByVendorIdData({ + required this.clientFeedbacks, + }); +} + +@immutable +class ListClientFeedbackRatingsByVendorIdVariables { + final String vendorId; + late final OptionaldateFrom; + late final OptionaldateTo; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListClientFeedbackRatingsByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + dateFrom = Optional.optional((json) => json['dateFrom'] = Timestamp.fromJson(json['dateFrom']), defaultSerializer); + dateFrom.value = json['dateFrom'] == null ? null : Timestamp.fromJson(json['dateFrom']); + + + dateTo = Optional.optional((json) => json['dateTo'] = Timestamp.fromJson(json['dateTo']), defaultSerializer); + dateTo.value = json['dateTo'] == null ? null : Timestamp.fromJson(json['dateTo']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbackRatingsByVendorIdVariables otherTyped = other as ListClientFeedbackRatingsByVendorIdVariables; + return vendorId == otherTyped.vendorId && + dateFrom == otherTyped.dateFrom && + dateTo == otherTyped.dateTo; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, dateFrom.hashCode, dateTo.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(dateFrom.state == OptionalState.set) { + json['dateFrom'] = dateFrom.toJson(); + } + if(dateTo.state == OptionalState.set) { + json['dateTo'] = dateTo.toJson(); + } + return json; + } + + ListClientFeedbackRatingsByVendorIdVariables({ + required this.vendorId, + required this.dateFrom, + required this.dateTo, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks.dart new file mode 100644 index 00000000..6d119685 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks.dart @@ -0,0 +1,276 @@ +part of 'generated.dart'; + +class ListClientFeedbacksVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListClientFeedbacksVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListClientFeedbacksVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListClientFeedbacksData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListClientFeedbacksVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListClientFeedbacksVariables vars= ListClientFeedbacksVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listClientFeedbacks", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListClientFeedbacksClientFeedbacks { + final String id; + final String businessId; + final String vendorId; + final int? rating; + final String? comment; + final Timestamp? date; + final Timestamp? createdAt; + final ListClientFeedbacksClientFeedbacksBusiness business; + final ListClientFeedbacksClientFeedbacksVendor vendor; + ListClientFeedbacksClientFeedbacks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + rating = json['rating'] == null ? null : nativeFromJson(json['rating']), + comment = json['comment'] == null ? null : nativeFromJson(json['comment']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = ListClientFeedbacksClientFeedbacksBusiness.fromJson(json['business']), + vendor = ListClientFeedbacksClientFeedbacksVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksClientFeedbacks otherTyped = other as ListClientFeedbacksClientFeedbacks; + return id == otherTyped.id && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if (rating != null) { + json['rating'] = nativeToJson(rating); + } + if (comment != null) { + json['comment'] = nativeToJson(comment); + } + if (date != null) { + json['date'] = date!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListClientFeedbacksClientFeedbacks({ + required this.id, + required this.businessId, + required this.vendorId, + this.rating, + this.comment, + this.date, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListClientFeedbacksClientFeedbacksBusiness { + final String id; + final String businessName; + ListClientFeedbacksClientFeedbacksBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksClientFeedbacksBusiness otherTyped = other as ListClientFeedbacksClientFeedbacksBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListClientFeedbacksClientFeedbacksBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListClientFeedbacksClientFeedbacksVendor { + final String id; + final String companyName; + ListClientFeedbacksClientFeedbacksVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksClientFeedbacksVendor otherTyped = other as ListClientFeedbacksClientFeedbacksVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListClientFeedbacksClientFeedbacksVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListClientFeedbacksData { + final List clientFeedbacks; + ListClientFeedbacksData.fromJson(dynamic json): + + clientFeedbacks = (json['clientFeedbacks'] as List) + .map((e) => ListClientFeedbacksClientFeedbacks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksData otherTyped = other as ListClientFeedbacksData; + return clientFeedbacks == otherTyped.clientFeedbacks; + + } + @override + int get hashCode => clientFeedbacks.hashCode; + + + Map toJson() { + Map json = {}; + json['clientFeedbacks'] = clientFeedbacks.map((e) => e.toJson()).toList(); + return json; + } + + ListClientFeedbacksData({ + required this.clientFeedbacks, + }); +} + +@immutable +class ListClientFeedbacksVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListClientFeedbacksVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksVariables otherTyped = other as ListClientFeedbacksVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListClientFeedbacksVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_business_and_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_business_and_vendor.dart new file mode 100644 index 00000000..33e2a3c3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_business_and_vendor.dart @@ -0,0 +1,290 @@ +part of 'generated.dart'; + +class ListClientFeedbacksByBusinessAndVendorVariablesBuilder { + String businessId; + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListClientFeedbacksByBusinessAndVendorVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksByBusinessAndVendorVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListClientFeedbacksByBusinessAndVendorVariablesBuilder(this._dataConnect, {required this.businessId,required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListClientFeedbacksByBusinessAndVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListClientFeedbacksByBusinessAndVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListClientFeedbacksByBusinessAndVendorVariables vars= ListClientFeedbacksByBusinessAndVendorVariables(businessId: businessId,vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listClientFeedbacksByBusinessAndVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListClientFeedbacksByBusinessAndVendorClientFeedbacks { + final String id; + final String businessId; + final String vendorId; + final int? rating; + final String? comment; + final Timestamp? date; + final Timestamp? createdAt; + final ListClientFeedbacksByBusinessAndVendorClientFeedbacksBusiness business; + final ListClientFeedbacksByBusinessAndVendorClientFeedbacksVendor vendor; + ListClientFeedbacksByBusinessAndVendorClientFeedbacks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + rating = json['rating'] == null ? null : nativeFromJson(json['rating']), + comment = json['comment'] == null ? null : nativeFromJson(json['comment']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = ListClientFeedbacksByBusinessAndVendorClientFeedbacksBusiness.fromJson(json['business']), + vendor = ListClientFeedbacksByBusinessAndVendorClientFeedbacksVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessAndVendorClientFeedbacks otherTyped = other as ListClientFeedbacksByBusinessAndVendorClientFeedbacks; + return id == otherTyped.id && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if (rating != null) { + json['rating'] = nativeToJson(rating); + } + if (comment != null) { + json['comment'] = nativeToJson(comment); + } + if (date != null) { + json['date'] = date!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListClientFeedbacksByBusinessAndVendorClientFeedbacks({ + required this.id, + required this.businessId, + required this.vendorId, + this.rating, + this.comment, + this.date, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListClientFeedbacksByBusinessAndVendorClientFeedbacksBusiness { + final String id; + final String businessName; + ListClientFeedbacksByBusinessAndVendorClientFeedbacksBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessAndVendorClientFeedbacksBusiness otherTyped = other as ListClientFeedbacksByBusinessAndVendorClientFeedbacksBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListClientFeedbacksByBusinessAndVendorClientFeedbacksBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListClientFeedbacksByBusinessAndVendorClientFeedbacksVendor { + final String id; + final String companyName; + ListClientFeedbacksByBusinessAndVendorClientFeedbacksVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessAndVendorClientFeedbacksVendor otherTyped = other as ListClientFeedbacksByBusinessAndVendorClientFeedbacksVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListClientFeedbacksByBusinessAndVendorClientFeedbacksVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListClientFeedbacksByBusinessAndVendorData { + final List clientFeedbacks; + ListClientFeedbacksByBusinessAndVendorData.fromJson(dynamic json): + + clientFeedbacks = (json['clientFeedbacks'] as List) + .map((e) => ListClientFeedbacksByBusinessAndVendorClientFeedbacks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessAndVendorData otherTyped = other as ListClientFeedbacksByBusinessAndVendorData; + return clientFeedbacks == otherTyped.clientFeedbacks; + + } + @override + int get hashCode => clientFeedbacks.hashCode; + + + Map toJson() { + Map json = {}; + json['clientFeedbacks'] = clientFeedbacks.map((e) => e.toJson()).toList(); + return json; + } + + ListClientFeedbacksByBusinessAndVendorData({ + required this.clientFeedbacks, + }); +} + +@immutable +class ListClientFeedbacksByBusinessAndVendorVariables { + final String businessId; + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListClientFeedbacksByBusinessAndVendorVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']) { + + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessAndVendorVariables otherTyped = other as ListClientFeedbacksByBusinessAndVendorVariables; + return businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListClientFeedbacksByBusinessAndVendorVariables({ + required this.businessId, + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_business_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_business_id.dart new file mode 100644 index 00000000..7a2165d9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_business_id.dart @@ -0,0 +1,283 @@ +part of 'generated.dart'; + +class ListClientFeedbacksByBusinessIdVariablesBuilder { + String businessId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListClientFeedbacksByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListClientFeedbacksByBusinessIdVariablesBuilder(this._dataConnect, {required this.businessId,}); + Deserializer dataDeserializer = (dynamic json) => ListClientFeedbacksByBusinessIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListClientFeedbacksByBusinessIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListClientFeedbacksByBusinessIdVariables vars= ListClientFeedbacksByBusinessIdVariables(businessId: businessId,offset: _offset,limit: _limit,); + return _dataConnect.query("listClientFeedbacksByBusinessId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListClientFeedbacksByBusinessIdClientFeedbacks { + final String id; + final String businessId; + final String vendorId; + final int? rating; + final String? comment; + final Timestamp? date; + final Timestamp? createdAt; + final ListClientFeedbacksByBusinessIdClientFeedbacksBusiness business; + final ListClientFeedbacksByBusinessIdClientFeedbacksVendor vendor; + ListClientFeedbacksByBusinessIdClientFeedbacks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + rating = json['rating'] == null ? null : nativeFromJson(json['rating']), + comment = json['comment'] == null ? null : nativeFromJson(json['comment']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = ListClientFeedbacksByBusinessIdClientFeedbacksBusiness.fromJson(json['business']), + vendor = ListClientFeedbacksByBusinessIdClientFeedbacksVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessIdClientFeedbacks otherTyped = other as ListClientFeedbacksByBusinessIdClientFeedbacks; + return id == otherTyped.id && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if (rating != null) { + json['rating'] = nativeToJson(rating); + } + if (comment != null) { + json['comment'] = nativeToJson(comment); + } + if (date != null) { + json['date'] = date!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListClientFeedbacksByBusinessIdClientFeedbacks({ + required this.id, + required this.businessId, + required this.vendorId, + this.rating, + this.comment, + this.date, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListClientFeedbacksByBusinessIdClientFeedbacksBusiness { + final String id; + final String businessName; + ListClientFeedbacksByBusinessIdClientFeedbacksBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessIdClientFeedbacksBusiness otherTyped = other as ListClientFeedbacksByBusinessIdClientFeedbacksBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListClientFeedbacksByBusinessIdClientFeedbacksBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListClientFeedbacksByBusinessIdClientFeedbacksVendor { + final String id; + final String companyName; + ListClientFeedbacksByBusinessIdClientFeedbacksVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessIdClientFeedbacksVendor otherTyped = other as ListClientFeedbacksByBusinessIdClientFeedbacksVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListClientFeedbacksByBusinessIdClientFeedbacksVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListClientFeedbacksByBusinessIdData { + final List clientFeedbacks; + ListClientFeedbacksByBusinessIdData.fromJson(dynamic json): + + clientFeedbacks = (json['clientFeedbacks'] as List) + .map((e) => ListClientFeedbacksByBusinessIdClientFeedbacks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessIdData otherTyped = other as ListClientFeedbacksByBusinessIdData; + return clientFeedbacks == otherTyped.clientFeedbacks; + + } + @override + int get hashCode => clientFeedbacks.hashCode; + + + Map toJson() { + Map json = {}; + json['clientFeedbacks'] = clientFeedbacks.map((e) => e.toJson()).toList(); + return json; + } + + ListClientFeedbacksByBusinessIdData({ + required this.clientFeedbacks, + }); +} + +@immutable +class ListClientFeedbacksByBusinessIdVariables { + final String businessId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListClientFeedbacksByBusinessIdVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByBusinessIdVariables otherTyped = other as ListClientFeedbacksByBusinessIdVariables; + return businessId == otherTyped.businessId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListClientFeedbacksByBusinessIdVariables({ + required this.businessId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_vendor_id.dart new file mode 100644 index 00000000..25eb54d6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_client_feedbacks_by_vendor_id.dart @@ -0,0 +1,283 @@ +part of 'generated.dart'; + +class ListClientFeedbacksByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListClientFeedbacksByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListClientFeedbacksByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListClientFeedbacksByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListClientFeedbacksByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListClientFeedbacksByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListClientFeedbacksByVendorIdVariables vars= ListClientFeedbacksByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listClientFeedbacksByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListClientFeedbacksByVendorIdClientFeedbacks { + final String id; + final String businessId; + final String vendorId; + final int? rating; + final String? comment; + final Timestamp? date; + final Timestamp? createdAt; + final ListClientFeedbacksByVendorIdClientFeedbacksBusiness business; + final ListClientFeedbacksByVendorIdClientFeedbacksVendor vendor; + ListClientFeedbacksByVendorIdClientFeedbacks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + rating = json['rating'] == null ? null : nativeFromJson(json['rating']), + comment = json['comment'] == null ? null : nativeFromJson(json['comment']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = ListClientFeedbacksByVendorIdClientFeedbacksBusiness.fromJson(json['business']), + vendor = ListClientFeedbacksByVendorIdClientFeedbacksVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByVendorIdClientFeedbacks otherTyped = other as ListClientFeedbacksByVendorIdClientFeedbacks; + return id == otherTyped.id && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + if (rating != null) { + json['rating'] = nativeToJson(rating); + } + if (comment != null) { + json['comment'] = nativeToJson(comment); + } + if (date != null) { + json['date'] = date!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListClientFeedbacksByVendorIdClientFeedbacks({ + required this.id, + required this.businessId, + required this.vendorId, + this.rating, + this.comment, + this.date, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListClientFeedbacksByVendorIdClientFeedbacksBusiness { + final String id; + final String businessName; + ListClientFeedbacksByVendorIdClientFeedbacksBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByVendorIdClientFeedbacksBusiness otherTyped = other as ListClientFeedbacksByVendorIdClientFeedbacksBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListClientFeedbacksByVendorIdClientFeedbacksBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListClientFeedbacksByVendorIdClientFeedbacksVendor { + final String id; + final String companyName; + ListClientFeedbacksByVendorIdClientFeedbacksVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByVendorIdClientFeedbacksVendor otherTyped = other as ListClientFeedbacksByVendorIdClientFeedbacksVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListClientFeedbacksByVendorIdClientFeedbacksVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListClientFeedbacksByVendorIdData { + final List clientFeedbacks; + ListClientFeedbacksByVendorIdData.fromJson(dynamic json): + + clientFeedbacks = (json['clientFeedbacks'] as List) + .map((e) => ListClientFeedbacksByVendorIdClientFeedbacks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByVendorIdData otherTyped = other as ListClientFeedbacksByVendorIdData; + return clientFeedbacks == otherTyped.clientFeedbacks; + + } + @override + int get hashCode => clientFeedbacks.hashCode; + + + Map toJson() { + Map json = {}; + json['clientFeedbacks'] = clientFeedbacks.map((e) => e.toJson()).toList(); + return json; + } + + ListClientFeedbacksByVendorIdData({ + required this.clientFeedbacks, + }); +} + +@immutable +class ListClientFeedbacksByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListClientFeedbacksByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListClientFeedbacksByVendorIdVariables otherTyped = other as ListClientFeedbacksByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListClientFeedbacksByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations.dart new file mode 100644 index 00000000..0cb1336c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations.dart @@ -0,0 +1,210 @@ +part of 'generated.dart'; + +class ListConversationsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListConversationsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListConversationsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListConversationsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListConversationsVariables vars= ListConversationsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listConversations", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListConversationsConversations { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + ListConversationsConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsConversations otherTyped = other as ListConversationsConversations; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListConversationsConversations({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class ListConversationsData { + final List conversations; + ListConversationsData.fromJson(dynamic json): + + conversations = (json['conversations'] as List) + .map((e) => ListConversationsConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsData otherTyped = other as ListConversationsData; + return conversations == otherTyped.conversations; + + } + @override + int get hashCode => conversations.hashCode; + + + Map toJson() { + Map json = {}; + json['conversations'] = conversations.map((e) => e.toJson()).toList(); + return json; + } + + ListConversationsData({ + required this.conversations, + }); +} + +@immutable +class ListConversationsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListConversationsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsVariables otherTyped = other as ListConversationsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListConversationsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations_by_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations_by_status.dart new file mode 100644 index 00000000..9ee20ec4 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations_by_status.dart @@ -0,0 +1,219 @@ +part of 'generated.dart'; + +class ListConversationsByStatusVariablesBuilder { + ConversationStatus status; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListConversationsByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListConversationsByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListConversationsByStatusVariablesBuilder(this._dataConnect, {required this.status,}); + Deserializer dataDeserializer = (dynamic json) => ListConversationsByStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListConversationsByStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListConversationsByStatusVariables vars= ListConversationsByStatusVariables(status: status,offset: _offset,limit: _limit,); + return _dataConnect.query("listConversationsByStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListConversationsByStatusConversations { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + ListConversationsByStatusConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsByStatusConversations otherTyped = other as ListConversationsByStatusConversations; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListConversationsByStatusConversations({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class ListConversationsByStatusData { + final List conversations; + ListConversationsByStatusData.fromJson(dynamic json): + + conversations = (json['conversations'] as List) + .map((e) => ListConversationsByStatusConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsByStatusData otherTyped = other as ListConversationsByStatusData; + return conversations == otherTyped.conversations; + + } + @override + int get hashCode => conversations.hashCode; + + + Map toJson() { + Map json = {}; + json['conversations'] = conversations.map((e) => e.toJson()).toList(); + return json; + } + + ListConversationsByStatusData({ + required this.conversations, + }); +} + +@immutable +class ListConversationsByStatusVariables { + final ConversationStatus status; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListConversationsByStatusVariables.fromJson(Map json): + + status = ConversationStatus.values.byName(json['status']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsByStatusVariables otherTyped = other as ListConversationsByStatusVariables; + return status == otherTyped.status && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + status.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListConversationsByStatusVariables({ + required this.status, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations_by_type.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations_by_type.dart new file mode 100644 index 00000000..8ffb4682 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_conversations_by_type.dart @@ -0,0 +1,219 @@ +part of 'generated.dart'; + +class ListConversationsByTypeVariablesBuilder { + ConversationType conversationType; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListConversationsByTypeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListConversationsByTypeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListConversationsByTypeVariablesBuilder(this._dataConnect, {required this.conversationType,}); + Deserializer dataDeserializer = (dynamic json) => ListConversationsByTypeData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListConversationsByTypeVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListConversationsByTypeVariables vars= ListConversationsByTypeVariables(conversationType: conversationType,offset: _offset,limit: _limit,); + return _dataConnect.query("listConversationsByType", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListConversationsByTypeConversations { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + ListConversationsByTypeConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsByTypeConversations otherTyped = other as ListConversationsByTypeConversations; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListConversationsByTypeConversations({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class ListConversationsByTypeData { + final List conversations; + ListConversationsByTypeData.fromJson(dynamic json): + + conversations = (json['conversations'] as List) + .map((e) => ListConversationsByTypeConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsByTypeData otherTyped = other as ListConversationsByTypeData; + return conversations == otherTyped.conversations; + + } + @override + int get hashCode => conversations.hashCode; + + + Map toJson() { + Map json = {}; + json['conversations'] = conversations.map((e) => e.toJson()).toList(); + return json; + } + + ListConversationsByTypeData({ + required this.conversations, + }); +} + +@immutable +class ListConversationsByTypeVariables { + final ConversationType conversationType; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListConversationsByTypeVariables.fromJson(Map json): + + conversationType = ConversationType.values.byName(json['conversationType']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListConversationsByTypeVariables otherTyped = other as ListConversationsByTypeVariables; + return conversationType == otherTyped.conversationType && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([conversationType.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationType'] = + conversationType.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListConversationsByTypeVariables({ + required this.conversationType, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_courses.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_courses.dart new file mode 100644 index 00000000..ddf27479 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_courses.dart @@ -0,0 +1,193 @@ +part of 'generated.dart'; + +class ListCoursesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListCoursesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListCoursesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listCourses", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListCoursesCourses { + final String id; + final String? title; + final String? description; + final String? thumbnailUrl; + final int? durationMinutes; + final int? xpReward; + final String categoryId; + final String? levelRequired; + final bool? isCertification; + final Timestamp? createdAt; + final ListCoursesCoursesCategory category; + ListCoursesCourses.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + thumbnailUrl = json['thumbnailUrl'] == null ? null : nativeFromJson(json['thumbnailUrl']), + durationMinutes = json['durationMinutes'] == null ? null : nativeFromJson(json['durationMinutes']), + xpReward = json['xpReward'] == null ? null : nativeFromJson(json['xpReward']), + categoryId = nativeFromJson(json['categoryId']), + levelRequired = json['levelRequired'] == null ? null : nativeFromJson(json['levelRequired']), + isCertification = json['isCertification'] == null ? null : nativeFromJson(json['isCertification']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + category = ListCoursesCoursesCategory.fromJson(json['category']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCoursesCourses otherTyped = other as ListCoursesCourses; + return id == otherTyped.id && + title == otherTyped.title && + description == otherTyped.description && + thumbnailUrl == otherTyped.thumbnailUrl && + durationMinutes == otherTyped.durationMinutes && + xpReward == otherTyped.xpReward && + categoryId == otherTyped.categoryId && + levelRequired == otherTyped.levelRequired && + isCertification == otherTyped.isCertification && + createdAt == otherTyped.createdAt && + category == otherTyped.category; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, description.hashCode, thumbnailUrl.hashCode, durationMinutes.hashCode, xpReward.hashCode, categoryId.hashCode, levelRequired.hashCode, isCertification.hashCode, createdAt.hashCode, category.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (title != null) { + json['title'] = nativeToJson(title); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (thumbnailUrl != null) { + json['thumbnailUrl'] = nativeToJson(thumbnailUrl); + } + if (durationMinutes != null) { + json['durationMinutes'] = nativeToJson(durationMinutes); + } + if (xpReward != null) { + json['xpReward'] = nativeToJson(xpReward); + } + json['categoryId'] = nativeToJson(categoryId); + if (levelRequired != null) { + json['levelRequired'] = nativeToJson(levelRequired); + } + if (isCertification != null) { + json['isCertification'] = nativeToJson(isCertification); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['category'] = category.toJson(); + return json; + } + + ListCoursesCourses({ + required this.id, + this.title, + this.description, + this.thumbnailUrl, + this.durationMinutes, + this.xpReward, + required this.categoryId, + this.levelRequired, + this.isCertification, + this.createdAt, + required this.category, + }); +} + +@immutable +class ListCoursesCoursesCategory { + final String id; + final String label; + ListCoursesCoursesCategory.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + label = nativeFromJson(json['label']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCoursesCoursesCategory otherTyped = other as ListCoursesCoursesCategory; + return id == otherTyped.id && + label == otherTyped.label; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, label.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['label'] = nativeToJson(label); + return json; + } + + ListCoursesCoursesCategory({ + required this.id, + required this.label, + }); +} + +@immutable +class ListCoursesData { + final List courses; + ListCoursesData.fromJson(dynamic json): + + courses = (json['courses'] as List) + .map((e) => ListCoursesCourses.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCoursesData otherTyped = other as ListCoursesData; + return courses == otherTyped.courses; + + } + @override + int get hashCode => courses.hashCode; + + + Map toJson() { + Map json = {}; + json['courses'] = courses.map((e) => e.toJson()).toList(); + return json; + } + + ListCoursesData({ + required this.courses, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_custom_rate_cards.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_custom_rate_cards.dart new file mode 100644 index 00000000..e5dcbc90 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_custom_rate_cards.dart @@ -0,0 +1,128 @@ +part of 'generated.dart'; + +class ListCustomRateCardsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListCustomRateCardsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListCustomRateCardsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listCustomRateCards", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListCustomRateCardsCustomRateCards { + final String id; + final String name; + final String? baseBook; + final double? discount; + final bool? isDefault; + final Timestamp? createdAt; + final Timestamp? updatedAt; + ListCustomRateCardsCustomRateCards.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + baseBook = json['baseBook'] == null ? null : nativeFromJson(json['baseBook']), + discount = json['discount'] == null ? null : nativeFromJson(json['discount']), + isDefault = json['isDefault'] == null ? null : nativeFromJson(json['isDefault']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCustomRateCardsCustomRateCards otherTyped = other as ListCustomRateCardsCustomRateCards; + return id == otherTyped.id && + name == otherTyped.name && + baseBook == otherTyped.baseBook && + discount == otherTyped.discount && + isDefault == otherTyped.isDefault && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, baseBook.hashCode, discount.hashCode, isDefault.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (baseBook != null) { + json['baseBook'] = nativeToJson(baseBook); + } + if (discount != null) { + json['discount'] = nativeToJson(discount); + } + if (isDefault != null) { + json['isDefault'] = nativeToJson(isDefault); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + ListCustomRateCardsCustomRateCards({ + required this.id, + required this.name, + this.baseBook, + this.discount, + this.isDefault, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class ListCustomRateCardsData { + final List customRateCards; + ListCustomRateCardsData.fromJson(dynamic json): + + customRateCards = (json['customRateCards'] as List) + .map((e) => ListCustomRateCardsCustomRateCards.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListCustomRateCardsData otherTyped = other as ListCustomRateCardsData; + return customRateCards == otherTyped.customRateCards; + + } + @override + int get hashCode => customRateCards.hashCode; + + + Map toJson() { + Map json = {}; + json['customRateCards'] = customRateCards.map((e) => e.toJson()).toList(); + return json; + } + + ListCustomRateCardsData({ + required this.customRateCards, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_documents.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_documents.dart new file mode 100644 index 00000000..8960c342 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_documents.dart @@ -0,0 +1,114 @@ +part of 'generated.dart'; + +class ListDocumentsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListDocumentsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListDocumentsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listDocuments", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListDocumentsDocuments { + final String id; + final EnumValue documentType; + final String name; + final String? description; + final Timestamp? createdAt; + ListDocumentsDocuments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + documentType = documentTypeDeserializer(json['documentType']), + name = nativeFromJson(json['name']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListDocumentsDocuments otherTyped = other as ListDocumentsDocuments; + return id == otherTyped.id && + documentType == otherTyped.documentType && + name == otherTyped.name && + description == otherTyped.description && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, documentType.hashCode, name.hashCode, description.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['documentType'] = + documentTypeSerializer(documentType) + ; + json['name'] = nativeToJson(name); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListDocumentsDocuments({ + required this.id, + required this.documentType, + required this.name, + this.description, + this.createdAt, + }); +} + +@immutable +class ListDocumentsData { + final List documents; + ListDocumentsData.fromJson(dynamic json): + + documents = (json['documents'] as List) + .map((e) => ListDocumentsDocuments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListDocumentsData otherTyped = other as ListDocumentsData; + return documents == otherTyped.documents; + + } + @override + int get hashCode => documents.hashCode; + + + Map toJson() { + Map json = {}; + json['documents'] = documents.map((e) => e.toJson()).toList(); + return json; + } + + ListDocumentsData({ + required this.documents, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_emergency_contacts.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_emergency_contacts.dart new file mode 100644 index 00000000..ea448d2b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_emergency_contacts.dart @@ -0,0 +1,131 @@ +part of 'generated.dart'; + +class ListEmergencyContactsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListEmergencyContactsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListEmergencyContactsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listEmergencyContacts", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListEmergencyContactsEmergencyContacts { + final String id; + final String name; + final String phone; + final EnumValue relationship; + final String staffId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListEmergencyContactsEmergencyContacts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + phone = nativeFromJson(json['phone']), + relationship = relationshipTypeDeserializer(json['relationship']), + staffId = nativeFromJson(json['staffId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListEmergencyContactsEmergencyContacts otherTyped = other as ListEmergencyContactsEmergencyContacts; + return id == otherTyped.id && + name == otherTyped.name && + phone == otherTyped.phone && + relationship == otherTyped.relationship && + staffId == otherTyped.staffId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, phone.hashCode, relationship.hashCode, staffId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['phone'] = nativeToJson(phone); + json['relationship'] = + relationshipTypeSerializer(relationship) + ; + json['staffId'] = nativeToJson(staffId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListEmergencyContactsEmergencyContacts({ + required this.id, + required this.name, + required this.phone, + required this.relationship, + required this.staffId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListEmergencyContactsData { + final List emergencyContacts; + ListEmergencyContactsData.fromJson(dynamic json): + + emergencyContacts = (json['emergencyContacts'] as List) + .map((e) => ListEmergencyContactsEmergencyContacts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListEmergencyContactsData otherTyped = other as ListEmergencyContactsData; + return emergencyContacts == otherTyped.emergencyContacts; + + } + @override + int get hashCode => emergencyContacts.hashCode; + + + Map toJson() { + Map json = {}; + json['emergencyContacts'] = emergencyContacts.map((e) => e.toJson()).toList(); + return json; + } + + ListEmergencyContactsData({ + required this.emergencyContacts, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_faq_datas.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_faq_datas.dart new file mode 100644 index 00000000..3c4366d7 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_faq_datas.dart @@ -0,0 +1,123 @@ +part of 'generated.dart'; + +class ListFaqDatasVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListFaqDatasVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListFaqDatasData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listFaqDatas", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListFaqDatasFaqDatas { + final String id; + final String category; + final List? questions; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListFaqDatasFaqDatas.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + category = nativeFromJson(json['category']), + questions = json['questions'] == null ? null : (json['questions'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListFaqDatasFaqDatas otherTyped = other as ListFaqDatasFaqDatas; + return id == otherTyped.id && + category == otherTyped.category && + questions == otherTyped.questions && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, category.hashCode, questions.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['category'] = nativeToJson(category); + if (questions != null) { + json['questions'] = questions?.map((e) => e!.toJson()).toList(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListFaqDatasFaqDatas({ + required this.id, + required this.category, + this.questions, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListFaqDatasData { + final List faqDatas; + ListFaqDatasData.fromJson(dynamic json): + + faqDatas = (json['faqDatas'] as List) + .map((e) => ListFaqDatasFaqDatas.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListFaqDatasData otherTyped = other as ListFaqDatasData; + return faqDatas == otherTyped.faqDatas; + + } + @override + int get hashCode => faqDatas.hashCode; + + + Map toJson() { + Map json = {}; + json['faqDatas'] = faqDatas.map((e) => e.toJson()).toList(); + return json; + } + + ListFaqDatasData({ + required this.faqDatas, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_hubs.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_hubs.dart new file mode 100644 index 00000000..e8b694f7 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_hubs.dart @@ -0,0 +1,140 @@ +part of 'generated.dart'; + +class ListHubsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListHubsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListHubsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listHubs", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListHubsHubs { + final String id; + final String name; + final String? locationName; + final String? address; + final String? nfcTagId; + final String ownerId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListHubsHubs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + locationName = json['locationName'] == null ? null : nativeFromJson(json['locationName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + nfcTagId = json['nfcTagId'] == null ? null : nativeFromJson(json['nfcTagId']), + ownerId = nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListHubsHubs otherTyped = other as ListHubsHubs; + return id == otherTyped.id && + name == otherTyped.name && + locationName == otherTyped.locationName && + address == otherTyped.address && + nfcTagId == otherTyped.nfcTagId && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, locationName.hashCode, address.hashCode, nfcTagId.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (locationName != null) { + json['locationName'] = nativeToJson(locationName); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (nfcTagId != null) { + json['nfcTagId'] = nativeToJson(nfcTagId); + } + json['ownerId'] = nativeToJson(ownerId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListHubsHubs({ + required this.id, + required this.name, + this.locationName, + this.address, + this.nfcTagId, + required this.ownerId, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListHubsData { + final List hubs; + ListHubsData.fromJson(dynamic json): + + hubs = (json['hubs'] as List) + .map((e) => ListHubsHubs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListHubsData otherTyped = other as ListHubsData; + return hubs == otherTyped.hubs; + + } + @override + int get hashCode => hubs.hashCode; + + + Map toJson() { + Map json = {}; + json['hubs'] = hubs.map((e) => e.toJson()).toList(); + return json; + } + + ListHubsData({ + required this.hubs, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates.dart new file mode 100644 index 00000000..a532cfa7 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates.dart @@ -0,0 +1,477 @@ +part of 'generated.dart'; + +class ListInvoiceTemplatesVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListInvoiceTemplatesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoiceTemplatesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListInvoiceTemplatesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoiceTemplatesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoiceTemplatesVariables vars= ListInvoiceTemplatesVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoiceTemplates", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoiceTemplatesInvoiceTemplates { + final String id; + final String name; + final String ownerId; + final String? vendorId; + final String? businessId; + final String? orderId; + final EnumValue? paymentTerms; + final String? invoiceNumber; + final Timestamp? issueDate; + final Timestamp? dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double? amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListInvoiceTemplatesInvoiceTemplatesVendor? vendor; + final ListInvoiceTemplatesInvoiceTemplatesBusiness? business; + final ListInvoiceTemplatesInvoiceTemplatesOrder? order; + ListInvoiceTemplatesInvoiceTemplates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + businessId = json['businessId'] == null ? null : nativeFromJson(json['businessId']), + orderId = json['orderId'] == null ? null : nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsTempDeserializer(json['paymentTerms']), + invoiceNumber = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']), + issueDate = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = json['amount'] == null ? null : nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = json['vendor'] == null ? null : ListInvoiceTemplatesInvoiceTemplatesVendor.fromJson(json['vendor']), + business = json['business'] == null ? null : ListInvoiceTemplatesInvoiceTemplatesBusiness.fromJson(json['business']), + order = json['order'] == null ? null : ListInvoiceTemplatesInvoiceTemplatesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesInvoiceTemplates otherTyped = other as ListInvoiceTemplatesInvoiceTemplates; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (businessId != null) { + json['businessId'] = nativeToJson(businessId); + } + if (orderId != null) { + json['orderId'] = nativeToJson(orderId); + } + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsTempSerializer(paymentTerms!) + ; + } + if (invoiceNumber != null) { + json['invoiceNumber'] = nativeToJson(invoiceNumber); + } + if (issueDate != null) { + json['issueDate'] = issueDate!.toJson(); + } + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + if (amount != null) { + json['amount'] = nativeToJson(amount); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + if (business != null) { + json['business'] = business!.toJson(); + } + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + ListInvoiceTemplatesInvoiceTemplates({ + required this.id, + required this.name, + required this.ownerId, + this.vendorId, + this.businessId, + this.orderId, + this.paymentTerms, + this.invoiceNumber, + this.issueDate, + this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.createdAt, + this.updatedAt, + this.createdBy, + this.vendor, + this.business, + this.order, + }); +} + +@immutable +class ListInvoiceTemplatesInvoiceTemplatesVendor { + final String id; + final String companyName; + ListInvoiceTemplatesInvoiceTemplatesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesInvoiceTemplatesVendor otherTyped = other as ListInvoiceTemplatesInvoiceTemplatesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoiceTemplatesInvoiceTemplatesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoiceTemplatesInvoiceTemplatesBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListInvoiceTemplatesInvoiceTemplatesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesInvoiceTemplatesBusiness otherTyped = other as ListInvoiceTemplatesInvoiceTemplatesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListInvoiceTemplatesInvoiceTemplatesBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListInvoiceTemplatesInvoiceTemplatesOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + ListInvoiceTemplatesInvoiceTemplatesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesInvoiceTemplatesOrder otherTyped = other as ListInvoiceTemplatesInvoiceTemplatesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + return json; + } + + ListInvoiceTemplatesInvoiceTemplatesOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + }); +} + +@immutable +class ListInvoiceTemplatesData { + final List invoiceTemplates; + ListInvoiceTemplatesData.fromJson(dynamic json): + + invoiceTemplates = (json['invoiceTemplates'] as List) + .map((e) => ListInvoiceTemplatesInvoiceTemplates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesData otherTyped = other as ListInvoiceTemplatesData; + return invoiceTemplates == otherTyped.invoiceTemplates; + + } + @override + int get hashCode => invoiceTemplates.hashCode; + + + Map toJson() { + Map json = {}; + json['invoiceTemplates'] = invoiceTemplates.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoiceTemplatesData({ + required this.invoiceTemplates, + }); +} + +@immutable +class ListInvoiceTemplatesVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoiceTemplatesVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesVariables otherTyped = other as ListInvoiceTemplatesVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoiceTemplatesVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_business_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_business_id.dart new file mode 100644 index 00000000..00c92572 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_business_id.dart @@ -0,0 +1,484 @@ +part of 'generated.dart'; + +class ListInvoiceTemplatesByBusinessIdVariablesBuilder { + String businessId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoiceTemplatesByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoiceTemplatesByBusinessIdVariablesBuilder(this._dataConnect, {required this.businessId,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoiceTemplatesByBusinessIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoiceTemplatesByBusinessIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoiceTemplatesByBusinessIdVariables vars= ListInvoiceTemplatesByBusinessIdVariables(businessId: businessId,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoiceTemplatesByBusinessId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoiceTemplatesByBusinessIdInvoiceTemplates { + final String id; + final String name; + final String ownerId; + final String? vendorId; + final String? businessId; + final String? orderId; + final EnumValue? paymentTerms; + final String? invoiceNumber; + final Timestamp? issueDate; + final Timestamp? dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double? amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListInvoiceTemplatesByBusinessIdInvoiceTemplatesVendor? vendor; + final ListInvoiceTemplatesByBusinessIdInvoiceTemplatesBusiness? business; + final ListInvoiceTemplatesByBusinessIdInvoiceTemplatesOrder? order; + ListInvoiceTemplatesByBusinessIdInvoiceTemplates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + businessId = json['businessId'] == null ? null : nativeFromJson(json['businessId']), + orderId = json['orderId'] == null ? null : nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsTempDeserializer(json['paymentTerms']), + invoiceNumber = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']), + issueDate = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = json['amount'] == null ? null : nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = json['vendor'] == null ? null : ListInvoiceTemplatesByBusinessIdInvoiceTemplatesVendor.fromJson(json['vendor']), + business = json['business'] == null ? null : ListInvoiceTemplatesByBusinessIdInvoiceTemplatesBusiness.fromJson(json['business']), + order = json['order'] == null ? null : ListInvoiceTemplatesByBusinessIdInvoiceTemplatesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByBusinessIdInvoiceTemplates otherTyped = other as ListInvoiceTemplatesByBusinessIdInvoiceTemplates; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (businessId != null) { + json['businessId'] = nativeToJson(businessId); + } + if (orderId != null) { + json['orderId'] = nativeToJson(orderId); + } + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsTempSerializer(paymentTerms!) + ; + } + if (invoiceNumber != null) { + json['invoiceNumber'] = nativeToJson(invoiceNumber); + } + if (issueDate != null) { + json['issueDate'] = issueDate!.toJson(); + } + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + if (amount != null) { + json['amount'] = nativeToJson(amount); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + if (business != null) { + json['business'] = business!.toJson(); + } + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + ListInvoiceTemplatesByBusinessIdInvoiceTemplates({ + required this.id, + required this.name, + required this.ownerId, + this.vendorId, + this.businessId, + this.orderId, + this.paymentTerms, + this.invoiceNumber, + this.issueDate, + this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.createdAt, + this.updatedAt, + this.createdBy, + this.vendor, + this.business, + this.order, + }); +} + +@immutable +class ListInvoiceTemplatesByBusinessIdInvoiceTemplatesVendor { + final String id; + final String companyName; + ListInvoiceTemplatesByBusinessIdInvoiceTemplatesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByBusinessIdInvoiceTemplatesVendor otherTyped = other as ListInvoiceTemplatesByBusinessIdInvoiceTemplatesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoiceTemplatesByBusinessIdInvoiceTemplatesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoiceTemplatesByBusinessIdInvoiceTemplatesBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListInvoiceTemplatesByBusinessIdInvoiceTemplatesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByBusinessIdInvoiceTemplatesBusiness otherTyped = other as ListInvoiceTemplatesByBusinessIdInvoiceTemplatesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListInvoiceTemplatesByBusinessIdInvoiceTemplatesBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListInvoiceTemplatesByBusinessIdInvoiceTemplatesOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + ListInvoiceTemplatesByBusinessIdInvoiceTemplatesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByBusinessIdInvoiceTemplatesOrder otherTyped = other as ListInvoiceTemplatesByBusinessIdInvoiceTemplatesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + return json; + } + + ListInvoiceTemplatesByBusinessIdInvoiceTemplatesOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + }); +} + +@immutable +class ListInvoiceTemplatesByBusinessIdData { + final List invoiceTemplates; + ListInvoiceTemplatesByBusinessIdData.fromJson(dynamic json): + + invoiceTemplates = (json['invoiceTemplates'] as List) + .map((e) => ListInvoiceTemplatesByBusinessIdInvoiceTemplates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByBusinessIdData otherTyped = other as ListInvoiceTemplatesByBusinessIdData; + return invoiceTemplates == otherTyped.invoiceTemplates; + + } + @override + int get hashCode => invoiceTemplates.hashCode; + + + Map toJson() { + Map json = {}; + json['invoiceTemplates'] = invoiceTemplates.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoiceTemplatesByBusinessIdData({ + required this.invoiceTemplates, + }); +} + +@immutable +class ListInvoiceTemplatesByBusinessIdVariables { + final String businessId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoiceTemplatesByBusinessIdVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByBusinessIdVariables otherTyped = other as ListInvoiceTemplatesByBusinessIdVariables; + return businessId == otherTyped.businessId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoiceTemplatesByBusinessIdVariables({ + required this.businessId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_order_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_order_id.dart new file mode 100644 index 00000000..c8538655 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_order_id.dart @@ -0,0 +1,484 @@ +part of 'generated.dart'; + +class ListInvoiceTemplatesByOrderIdVariablesBuilder { + String orderId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoiceTemplatesByOrderIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByOrderIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoiceTemplatesByOrderIdVariablesBuilder(this._dataConnect, {required this.orderId,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoiceTemplatesByOrderIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoiceTemplatesByOrderIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoiceTemplatesByOrderIdVariables vars= ListInvoiceTemplatesByOrderIdVariables(orderId: orderId,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoiceTemplatesByOrderId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoiceTemplatesByOrderIdInvoiceTemplates { + final String id; + final String name; + final String ownerId; + final String? vendorId; + final String? businessId; + final String? orderId; + final EnumValue? paymentTerms; + final String? invoiceNumber; + final Timestamp? issueDate; + final Timestamp? dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double? amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListInvoiceTemplatesByOrderIdInvoiceTemplatesVendor? vendor; + final ListInvoiceTemplatesByOrderIdInvoiceTemplatesBusiness? business; + final ListInvoiceTemplatesByOrderIdInvoiceTemplatesOrder? order; + ListInvoiceTemplatesByOrderIdInvoiceTemplates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + businessId = json['businessId'] == null ? null : nativeFromJson(json['businessId']), + orderId = json['orderId'] == null ? null : nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsTempDeserializer(json['paymentTerms']), + invoiceNumber = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']), + issueDate = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = json['amount'] == null ? null : nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = json['vendor'] == null ? null : ListInvoiceTemplatesByOrderIdInvoiceTemplatesVendor.fromJson(json['vendor']), + business = json['business'] == null ? null : ListInvoiceTemplatesByOrderIdInvoiceTemplatesBusiness.fromJson(json['business']), + order = json['order'] == null ? null : ListInvoiceTemplatesByOrderIdInvoiceTemplatesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOrderIdInvoiceTemplates otherTyped = other as ListInvoiceTemplatesByOrderIdInvoiceTemplates; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (businessId != null) { + json['businessId'] = nativeToJson(businessId); + } + if (orderId != null) { + json['orderId'] = nativeToJson(orderId); + } + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsTempSerializer(paymentTerms!) + ; + } + if (invoiceNumber != null) { + json['invoiceNumber'] = nativeToJson(invoiceNumber); + } + if (issueDate != null) { + json['issueDate'] = issueDate!.toJson(); + } + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + if (amount != null) { + json['amount'] = nativeToJson(amount); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + if (business != null) { + json['business'] = business!.toJson(); + } + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + ListInvoiceTemplatesByOrderIdInvoiceTemplates({ + required this.id, + required this.name, + required this.ownerId, + this.vendorId, + this.businessId, + this.orderId, + this.paymentTerms, + this.invoiceNumber, + this.issueDate, + this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.createdAt, + this.updatedAt, + this.createdBy, + this.vendor, + this.business, + this.order, + }); +} + +@immutable +class ListInvoiceTemplatesByOrderIdInvoiceTemplatesVendor { + final String id; + final String companyName; + ListInvoiceTemplatesByOrderIdInvoiceTemplatesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOrderIdInvoiceTemplatesVendor otherTyped = other as ListInvoiceTemplatesByOrderIdInvoiceTemplatesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoiceTemplatesByOrderIdInvoiceTemplatesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoiceTemplatesByOrderIdInvoiceTemplatesBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListInvoiceTemplatesByOrderIdInvoiceTemplatesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOrderIdInvoiceTemplatesBusiness otherTyped = other as ListInvoiceTemplatesByOrderIdInvoiceTemplatesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListInvoiceTemplatesByOrderIdInvoiceTemplatesBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListInvoiceTemplatesByOrderIdInvoiceTemplatesOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + ListInvoiceTemplatesByOrderIdInvoiceTemplatesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOrderIdInvoiceTemplatesOrder otherTyped = other as ListInvoiceTemplatesByOrderIdInvoiceTemplatesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + return json; + } + + ListInvoiceTemplatesByOrderIdInvoiceTemplatesOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + }); +} + +@immutable +class ListInvoiceTemplatesByOrderIdData { + final List invoiceTemplates; + ListInvoiceTemplatesByOrderIdData.fromJson(dynamic json): + + invoiceTemplates = (json['invoiceTemplates'] as List) + .map((e) => ListInvoiceTemplatesByOrderIdInvoiceTemplates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOrderIdData otherTyped = other as ListInvoiceTemplatesByOrderIdData; + return invoiceTemplates == otherTyped.invoiceTemplates; + + } + @override + int get hashCode => invoiceTemplates.hashCode; + + + Map toJson() { + Map json = {}; + json['invoiceTemplates'] = invoiceTemplates.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoiceTemplatesByOrderIdData({ + required this.invoiceTemplates, + }); +} + +@immutable +class ListInvoiceTemplatesByOrderIdVariables { + final String orderId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoiceTemplatesByOrderIdVariables.fromJson(Map json): + + orderId = nativeFromJson(json['orderId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOrderIdVariables otherTyped = other as ListInvoiceTemplatesByOrderIdVariables; + return orderId == otherTyped.orderId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([orderId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['orderId'] = nativeToJson(orderId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoiceTemplatesByOrderIdVariables({ + required this.orderId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_owner_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_owner_id.dart new file mode 100644 index 00000000..205eeae8 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_owner_id.dart @@ -0,0 +1,484 @@ +part of 'generated.dart'; + +class ListInvoiceTemplatesByOwnerIdVariablesBuilder { + String ownerId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoiceTemplatesByOwnerIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByOwnerIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoiceTemplatesByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoiceTemplatesByOwnerIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoiceTemplatesByOwnerIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoiceTemplatesByOwnerIdVariables vars= ListInvoiceTemplatesByOwnerIdVariables(ownerId: ownerId,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoiceTemplatesByOwnerId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoiceTemplatesByOwnerIdInvoiceTemplates { + final String id; + final String name; + final String ownerId; + final String? vendorId; + final String? businessId; + final String? orderId; + final EnumValue? paymentTerms; + final String? invoiceNumber; + final Timestamp? issueDate; + final Timestamp? dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double? amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListInvoiceTemplatesByOwnerIdInvoiceTemplatesVendor? vendor; + final ListInvoiceTemplatesByOwnerIdInvoiceTemplatesBusiness? business; + final ListInvoiceTemplatesByOwnerIdInvoiceTemplatesOrder? order; + ListInvoiceTemplatesByOwnerIdInvoiceTemplates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + businessId = json['businessId'] == null ? null : nativeFromJson(json['businessId']), + orderId = json['orderId'] == null ? null : nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsTempDeserializer(json['paymentTerms']), + invoiceNumber = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']), + issueDate = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = json['amount'] == null ? null : nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = json['vendor'] == null ? null : ListInvoiceTemplatesByOwnerIdInvoiceTemplatesVendor.fromJson(json['vendor']), + business = json['business'] == null ? null : ListInvoiceTemplatesByOwnerIdInvoiceTemplatesBusiness.fromJson(json['business']), + order = json['order'] == null ? null : ListInvoiceTemplatesByOwnerIdInvoiceTemplatesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOwnerIdInvoiceTemplates otherTyped = other as ListInvoiceTemplatesByOwnerIdInvoiceTemplates; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (businessId != null) { + json['businessId'] = nativeToJson(businessId); + } + if (orderId != null) { + json['orderId'] = nativeToJson(orderId); + } + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsTempSerializer(paymentTerms!) + ; + } + if (invoiceNumber != null) { + json['invoiceNumber'] = nativeToJson(invoiceNumber); + } + if (issueDate != null) { + json['issueDate'] = issueDate!.toJson(); + } + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + if (amount != null) { + json['amount'] = nativeToJson(amount); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + if (business != null) { + json['business'] = business!.toJson(); + } + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + ListInvoiceTemplatesByOwnerIdInvoiceTemplates({ + required this.id, + required this.name, + required this.ownerId, + this.vendorId, + this.businessId, + this.orderId, + this.paymentTerms, + this.invoiceNumber, + this.issueDate, + this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.createdAt, + this.updatedAt, + this.createdBy, + this.vendor, + this.business, + this.order, + }); +} + +@immutable +class ListInvoiceTemplatesByOwnerIdInvoiceTemplatesVendor { + final String id; + final String companyName; + ListInvoiceTemplatesByOwnerIdInvoiceTemplatesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOwnerIdInvoiceTemplatesVendor otherTyped = other as ListInvoiceTemplatesByOwnerIdInvoiceTemplatesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoiceTemplatesByOwnerIdInvoiceTemplatesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoiceTemplatesByOwnerIdInvoiceTemplatesBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListInvoiceTemplatesByOwnerIdInvoiceTemplatesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOwnerIdInvoiceTemplatesBusiness otherTyped = other as ListInvoiceTemplatesByOwnerIdInvoiceTemplatesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListInvoiceTemplatesByOwnerIdInvoiceTemplatesBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListInvoiceTemplatesByOwnerIdInvoiceTemplatesOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + ListInvoiceTemplatesByOwnerIdInvoiceTemplatesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOwnerIdInvoiceTemplatesOrder otherTyped = other as ListInvoiceTemplatesByOwnerIdInvoiceTemplatesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + return json; + } + + ListInvoiceTemplatesByOwnerIdInvoiceTemplatesOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + }); +} + +@immutable +class ListInvoiceTemplatesByOwnerIdData { + final List invoiceTemplates; + ListInvoiceTemplatesByOwnerIdData.fromJson(dynamic json): + + invoiceTemplates = (json['invoiceTemplates'] as List) + .map((e) => ListInvoiceTemplatesByOwnerIdInvoiceTemplates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOwnerIdData otherTyped = other as ListInvoiceTemplatesByOwnerIdData; + return invoiceTemplates == otherTyped.invoiceTemplates; + + } + @override + int get hashCode => invoiceTemplates.hashCode; + + + Map toJson() { + Map json = {}; + json['invoiceTemplates'] = invoiceTemplates.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoiceTemplatesByOwnerIdData({ + required this.invoiceTemplates, + }); +} + +@immutable +class ListInvoiceTemplatesByOwnerIdVariables { + final String ownerId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoiceTemplatesByOwnerIdVariables.fromJson(Map json): + + ownerId = nativeFromJson(json['ownerId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByOwnerIdVariables otherTyped = other as ListInvoiceTemplatesByOwnerIdVariables; + return ownerId == otherTyped.ownerId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([ownerId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['ownerId'] = nativeToJson(ownerId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoiceTemplatesByOwnerIdVariables({ + required this.ownerId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_vendor_id.dart new file mode 100644 index 00000000..aae5f57f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoice_templates_by_vendor_id.dart @@ -0,0 +1,484 @@ +part of 'generated.dart'; + +class ListInvoiceTemplatesByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoiceTemplatesByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoiceTemplatesByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoiceTemplatesByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoiceTemplatesByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoiceTemplatesByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoiceTemplatesByVendorIdVariables vars= ListInvoiceTemplatesByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoiceTemplatesByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoiceTemplatesByVendorIdInvoiceTemplates { + final String id; + final String name; + final String ownerId; + final String? vendorId; + final String? businessId; + final String? orderId; + final EnumValue? paymentTerms; + final String? invoiceNumber; + final Timestamp? issueDate; + final Timestamp? dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double? amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListInvoiceTemplatesByVendorIdInvoiceTemplatesVendor? vendor; + final ListInvoiceTemplatesByVendorIdInvoiceTemplatesBusiness? business; + final ListInvoiceTemplatesByVendorIdInvoiceTemplatesOrder? order; + ListInvoiceTemplatesByVendorIdInvoiceTemplates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + businessId = json['businessId'] == null ? null : nativeFromJson(json['businessId']), + orderId = json['orderId'] == null ? null : nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsTempDeserializer(json['paymentTerms']), + invoiceNumber = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']), + issueDate = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = json['amount'] == null ? null : nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = json['vendor'] == null ? null : ListInvoiceTemplatesByVendorIdInvoiceTemplatesVendor.fromJson(json['vendor']), + business = json['business'] == null ? null : ListInvoiceTemplatesByVendorIdInvoiceTemplatesBusiness.fromJson(json['business']), + order = json['order'] == null ? null : ListInvoiceTemplatesByVendorIdInvoiceTemplatesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByVendorIdInvoiceTemplates otherTyped = other as ListInvoiceTemplatesByVendorIdInvoiceTemplates; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (businessId != null) { + json['businessId'] = nativeToJson(businessId); + } + if (orderId != null) { + json['orderId'] = nativeToJson(orderId); + } + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsTempSerializer(paymentTerms!) + ; + } + if (invoiceNumber != null) { + json['invoiceNumber'] = nativeToJson(invoiceNumber); + } + if (issueDate != null) { + json['issueDate'] = issueDate!.toJson(); + } + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + if (amount != null) { + json['amount'] = nativeToJson(amount); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + if (business != null) { + json['business'] = business!.toJson(); + } + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + ListInvoiceTemplatesByVendorIdInvoiceTemplates({ + required this.id, + required this.name, + required this.ownerId, + this.vendorId, + this.businessId, + this.orderId, + this.paymentTerms, + this.invoiceNumber, + this.issueDate, + this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.createdAt, + this.updatedAt, + this.createdBy, + this.vendor, + this.business, + this.order, + }); +} + +@immutable +class ListInvoiceTemplatesByVendorIdInvoiceTemplatesVendor { + final String id; + final String companyName; + ListInvoiceTemplatesByVendorIdInvoiceTemplatesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByVendorIdInvoiceTemplatesVendor otherTyped = other as ListInvoiceTemplatesByVendorIdInvoiceTemplatesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoiceTemplatesByVendorIdInvoiceTemplatesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoiceTemplatesByVendorIdInvoiceTemplatesBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListInvoiceTemplatesByVendorIdInvoiceTemplatesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByVendorIdInvoiceTemplatesBusiness otherTyped = other as ListInvoiceTemplatesByVendorIdInvoiceTemplatesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListInvoiceTemplatesByVendorIdInvoiceTemplatesBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListInvoiceTemplatesByVendorIdInvoiceTemplatesOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + ListInvoiceTemplatesByVendorIdInvoiceTemplatesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByVendorIdInvoiceTemplatesOrder otherTyped = other as ListInvoiceTemplatesByVendorIdInvoiceTemplatesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + return json; + } + + ListInvoiceTemplatesByVendorIdInvoiceTemplatesOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + }); +} + +@immutable +class ListInvoiceTemplatesByVendorIdData { + final List invoiceTemplates; + ListInvoiceTemplatesByVendorIdData.fromJson(dynamic json): + + invoiceTemplates = (json['invoiceTemplates'] as List) + .map((e) => ListInvoiceTemplatesByVendorIdInvoiceTemplates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByVendorIdData otherTyped = other as ListInvoiceTemplatesByVendorIdData; + return invoiceTemplates == otherTyped.invoiceTemplates; + + } + @override + int get hashCode => invoiceTemplates.hashCode; + + + Map toJson() { + Map json = {}; + json['invoiceTemplates'] = invoiceTemplates.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoiceTemplatesByVendorIdData({ + required this.invoiceTemplates, + }); +} + +@immutable +class ListInvoiceTemplatesByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoiceTemplatesByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoiceTemplatesByVendorIdVariables otherTyped = other as ListInvoiceTemplatesByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoiceTemplatesByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices.dart new file mode 100644 index 00000000..74c1ebe9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices.dart @@ -0,0 +1,474 @@ +part of 'generated.dart'; + +class ListInvoicesVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListInvoicesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoicesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesVariables vars= ListInvoicesVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoices", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesInvoices { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final ListInvoicesInvoicesVendor vendor; + final ListInvoicesInvoicesBusiness business; + final ListInvoicesInvoicesOrder order; + ListInvoicesInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = ListInvoicesInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesInvoices otherTyped = other as ListInvoicesInvoices; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesInvoices({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesInvoicesVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + ListInvoicesInvoicesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesInvoicesVendor otherTyped = other as ListInvoicesInvoicesVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListInvoicesInvoicesVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class ListInvoicesInvoicesBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + ListInvoicesInvoicesBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesInvoicesBusiness otherTyped = other as ListInvoicesInvoicesBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListInvoicesInvoicesBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class ListInvoicesInvoicesOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + ListInvoicesInvoicesOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesInvoicesOrder otherTyped = other as ListInvoicesInvoicesOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + ListInvoicesInvoicesOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class ListInvoicesData { + final List invoices; + ListInvoicesData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesData otherTyped = other as ListInvoicesData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesVariables otherTyped = other as ListInvoicesVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoicesVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_business_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_business_id.dart new file mode 100644 index 00000000..0b3dd14c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_business_id.dart @@ -0,0 +1,481 @@ +part of 'generated.dart'; + +class ListInvoicesByBusinessIdVariablesBuilder { + String businessId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoicesByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoicesByBusinessIdVariablesBuilder(this._dataConnect, {required this.businessId,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesByBusinessIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesByBusinessIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesByBusinessIdVariables vars= ListInvoicesByBusinessIdVariables(businessId: businessId,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoicesByBusinessId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesByBusinessIdInvoices { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final ListInvoicesByBusinessIdInvoicesVendor vendor; + final ListInvoicesByBusinessIdInvoicesBusiness business; + final ListInvoicesByBusinessIdInvoicesOrder order; + ListInvoicesByBusinessIdInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = ListInvoicesByBusinessIdInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesByBusinessIdInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesByBusinessIdInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByBusinessIdInvoices otherTyped = other as ListInvoicesByBusinessIdInvoices; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesByBusinessIdInvoices({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesByBusinessIdInvoicesVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + ListInvoicesByBusinessIdInvoicesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByBusinessIdInvoicesVendor otherTyped = other as ListInvoicesByBusinessIdInvoicesVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListInvoicesByBusinessIdInvoicesVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class ListInvoicesByBusinessIdInvoicesBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + ListInvoicesByBusinessIdInvoicesBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByBusinessIdInvoicesBusiness otherTyped = other as ListInvoicesByBusinessIdInvoicesBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListInvoicesByBusinessIdInvoicesBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class ListInvoicesByBusinessIdInvoicesOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + ListInvoicesByBusinessIdInvoicesOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByBusinessIdInvoicesOrder otherTyped = other as ListInvoicesByBusinessIdInvoicesOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + ListInvoicesByBusinessIdInvoicesOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class ListInvoicesByBusinessIdData { + final List invoices; + ListInvoicesByBusinessIdData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesByBusinessIdInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByBusinessIdData otherTyped = other as ListInvoicesByBusinessIdData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesByBusinessIdData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesByBusinessIdVariables { + final String businessId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesByBusinessIdVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByBusinessIdVariables otherTyped = other as ListInvoicesByBusinessIdVariables; + return businessId == otherTyped.businessId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoicesByBusinessIdVariables({ + required this.businessId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_order_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_order_id.dart new file mode 100644 index 00000000..6217a941 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_order_id.dart @@ -0,0 +1,481 @@ +part of 'generated.dart'; + +class ListInvoicesByOrderIdVariablesBuilder { + String orderId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoicesByOrderIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByOrderIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoicesByOrderIdVariablesBuilder(this._dataConnect, {required this.orderId,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesByOrderIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesByOrderIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesByOrderIdVariables vars= ListInvoicesByOrderIdVariables(orderId: orderId,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoicesByOrderId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesByOrderIdInvoices { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final ListInvoicesByOrderIdInvoicesVendor vendor; + final ListInvoicesByOrderIdInvoicesBusiness business; + final ListInvoicesByOrderIdInvoicesOrder order; + ListInvoicesByOrderIdInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = ListInvoicesByOrderIdInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesByOrderIdInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesByOrderIdInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByOrderIdInvoices otherTyped = other as ListInvoicesByOrderIdInvoices; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesByOrderIdInvoices({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesByOrderIdInvoicesVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + ListInvoicesByOrderIdInvoicesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByOrderIdInvoicesVendor otherTyped = other as ListInvoicesByOrderIdInvoicesVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListInvoicesByOrderIdInvoicesVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class ListInvoicesByOrderIdInvoicesBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + ListInvoicesByOrderIdInvoicesBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByOrderIdInvoicesBusiness otherTyped = other as ListInvoicesByOrderIdInvoicesBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListInvoicesByOrderIdInvoicesBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class ListInvoicesByOrderIdInvoicesOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + ListInvoicesByOrderIdInvoicesOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByOrderIdInvoicesOrder otherTyped = other as ListInvoicesByOrderIdInvoicesOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + ListInvoicesByOrderIdInvoicesOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class ListInvoicesByOrderIdData { + final List invoices; + ListInvoicesByOrderIdData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesByOrderIdInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByOrderIdData otherTyped = other as ListInvoicesByOrderIdData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesByOrderIdData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesByOrderIdVariables { + final String orderId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesByOrderIdVariables.fromJson(Map json): + + orderId = nativeFromJson(json['orderId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByOrderIdVariables otherTyped = other as ListInvoicesByOrderIdVariables; + return orderId == otherTyped.orderId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([orderId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['orderId'] = nativeToJson(orderId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoicesByOrderIdVariables({ + required this.orderId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_status.dart new file mode 100644 index 00000000..7a04a11e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_status.dart @@ -0,0 +1,483 @@ +part of 'generated.dart'; + +class ListInvoicesByStatusVariablesBuilder { + InvoiceStatus status; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoicesByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoicesByStatusVariablesBuilder(this._dataConnect, {required this.status,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesByStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesByStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesByStatusVariables vars= ListInvoicesByStatusVariables(status: status,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoicesByStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesByStatusInvoices { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final ListInvoicesByStatusInvoicesVendor vendor; + final ListInvoicesByStatusInvoicesBusiness business; + final ListInvoicesByStatusInvoicesOrder order; + ListInvoicesByStatusInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = ListInvoicesByStatusInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesByStatusInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesByStatusInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByStatusInvoices otherTyped = other as ListInvoicesByStatusInvoices; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesByStatusInvoices({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesByStatusInvoicesVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + ListInvoicesByStatusInvoicesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByStatusInvoicesVendor otherTyped = other as ListInvoicesByStatusInvoicesVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListInvoicesByStatusInvoicesVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class ListInvoicesByStatusInvoicesBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + ListInvoicesByStatusInvoicesBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByStatusInvoicesBusiness otherTyped = other as ListInvoicesByStatusInvoicesBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListInvoicesByStatusInvoicesBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class ListInvoicesByStatusInvoicesOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + ListInvoicesByStatusInvoicesOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByStatusInvoicesOrder otherTyped = other as ListInvoicesByStatusInvoicesOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + ListInvoicesByStatusInvoicesOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class ListInvoicesByStatusData { + final List invoices; + ListInvoicesByStatusData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesByStatusInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByStatusData otherTyped = other as ListInvoicesByStatusData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesByStatusData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesByStatusVariables { + final InvoiceStatus status; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesByStatusVariables.fromJson(Map json): + + status = InvoiceStatus.values.byName(json['status']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByStatusVariables otherTyped = other as ListInvoicesByStatusVariables; + return status == otherTyped.status && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + status.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoicesByStatusVariables({ + required this.status, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_vendor_id.dart new file mode 100644 index 00000000..373c5622 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_by_vendor_id.dart @@ -0,0 +1,481 @@ +part of 'generated.dart'; + +class ListInvoicesByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListInvoicesByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListInvoicesByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListInvoicesByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesByVendorIdVariables vars= ListInvoicesByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listInvoicesByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesByVendorIdInvoices { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final ListInvoicesByVendorIdInvoicesVendor vendor; + final ListInvoicesByVendorIdInvoicesBusiness business; + final ListInvoicesByVendorIdInvoicesOrder order; + ListInvoicesByVendorIdInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = ListInvoicesByVendorIdInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesByVendorIdInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesByVendorIdInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByVendorIdInvoices otherTyped = other as ListInvoicesByVendorIdInvoices; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesByVendorIdInvoices({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesByVendorIdInvoicesVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + ListInvoicesByVendorIdInvoicesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByVendorIdInvoicesVendor otherTyped = other as ListInvoicesByVendorIdInvoicesVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListInvoicesByVendorIdInvoicesVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class ListInvoicesByVendorIdInvoicesBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + ListInvoicesByVendorIdInvoicesBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByVendorIdInvoicesBusiness otherTyped = other as ListInvoicesByVendorIdInvoicesBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListInvoicesByVendorIdInvoicesBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class ListInvoicesByVendorIdInvoicesOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + ListInvoicesByVendorIdInvoicesOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByVendorIdInvoicesOrder otherTyped = other as ListInvoicesByVendorIdInvoicesOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + ListInvoicesByVendorIdInvoicesOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class ListInvoicesByVendorIdData { + final List invoices; + ListInvoicesByVendorIdData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesByVendorIdInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByVendorIdData otherTyped = other as ListInvoicesByVendorIdData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesByVendorIdData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesByVendorIdVariables otherTyped = other as ListInvoicesByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListInvoicesByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_business.dart new file mode 100644 index 00000000..1cc05b81 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_business.dart @@ -0,0 +1,297 @@ +part of 'generated.dart'; + +class ListInvoicesForSpendByBusinessVariablesBuilder { + String businessId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListInvoicesForSpendByBusinessVariablesBuilder(this._dataConnect, {required this.businessId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesForSpendByBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesForSpendByBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesForSpendByBusinessVariables vars= ListInvoicesForSpendByBusinessVariables(businessId: businessId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listInvoicesForSpendByBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesForSpendByBusinessInvoices { + final String id; + final Timestamp issueDate; + final Timestamp dueDate; + final double amount; + final EnumValue status; + final String invoiceNumber; + final ListInvoicesForSpendByBusinessInvoicesVendor vendor; + final ListInvoicesForSpendByBusinessInvoicesBusiness business; + final ListInvoicesForSpendByBusinessInvoicesOrder order; + ListInvoicesForSpendByBusinessInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + amount = nativeFromJson(json['amount']), + status = invoiceStatusDeserializer(json['status']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + vendor = ListInvoicesForSpendByBusinessInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesForSpendByBusinessInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesForSpendByBusinessInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByBusinessInvoices otherTyped = other as ListInvoicesForSpendByBusinessInvoices; + return id == otherTyped.id && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + amount == otherTyped.amount && + status == otherTyped.status && + invoiceNumber == otherTyped.invoiceNumber && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, issueDate.hashCode, dueDate.hashCode, amount.hashCode, status.hashCode, invoiceNumber.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + json['amount'] = nativeToJson(amount); + json['status'] = + invoiceStatusSerializer(status) + ; + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesForSpendByBusinessInvoices({ + required this.id, + required this.issueDate, + required this.dueDate, + required this.amount, + required this.status, + required this.invoiceNumber, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesForSpendByBusinessInvoicesVendor { + final String id; + final String companyName; + ListInvoicesForSpendByBusinessInvoicesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByBusinessInvoicesVendor otherTyped = other as ListInvoicesForSpendByBusinessInvoicesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoicesForSpendByBusinessInvoicesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoicesForSpendByBusinessInvoicesBusiness { + final String id; + final String businessName; + ListInvoicesForSpendByBusinessInvoicesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByBusinessInvoicesBusiness otherTyped = other as ListInvoicesForSpendByBusinessInvoicesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListInvoicesForSpendByBusinessInvoicesBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListInvoicesForSpendByBusinessInvoicesOrder { + final String id; + final String? eventName; + ListInvoicesForSpendByBusinessInvoicesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByBusinessInvoicesOrder otherTyped = other as ListInvoicesForSpendByBusinessInvoicesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + return json; + } + + ListInvoicesForSpendByBusinessInvoicesOrder({ + required this.id, + this.eventName, + }); +} + +@immutable +class ListInvoicesForSpendByBusinessData { + final List invoices; + ListInvoicesForSpendByBusinessData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesForSpendByBusinessInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByBusinessData otherTyped = other as ListInvoicesForSpendByBusinessData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesForSpendByBusinessData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesForSpendByBusinessVariables { + final String businessId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesForSpendByBusinessVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByBusinessVariables otherTyped = other as ListInvoicesForSpendByBusinessVariables; + return businessId == otherTyped.businessId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListInvoicesForSpendByBusinessVariables({ + required this.businessId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_order.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_order.dart new file mode 100644 index 00000000..d8c0f580 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_order.dart @@ -0,0 +1,297 @@ +part of 'generated.dart'; + +class ListInvoicesForSpendByOrderVariablesBuilder { + String orderId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListInvoicesForSpendByOrderVariablesBuilder(this._dataConnect, {required this.orderId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesForSpendByOrderData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesForSpendByOrderVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesForSpendByOrderVariables vars= ListInvoicesForSpendByOrderVariables(orderId: orderId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listInvoicesForSpendByOrder", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesForSpendByOrderInvoices { + final String id; + final Timestamp issueDate; + final Timestamp dueDate; + final double amount; + final EnumValue status; + final String invoiceNumber; + final ListInvoicesForSpendByOrderInvoicesVendor vendor; + final ListInvoicesForSpendByOrderInvoicesBusiness business; + final ListInvoicesForSpendByOrderInvoicesOrder order; + ListInvoicesForSpendByOrderInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + amount = nativeFromJson(json['amount']), + status = invoiceStatusDeserializer(json['status']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + vendor = ListInvoicesForSpendByOrderInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesForSpendByOrderInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesForSpendByOrderInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByOrderInvoices otherTyped = other as ListInvoicesForSpendByOrderInvoices; + return id == otherTyped.id && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + amount == otherTyped.amount && + status == otherTyped.status && + invoiceNumber == otherTyped.invoiceNumber && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, issueDate.hashCode, dueDate.hashCode, amount.hashCode, status.hashCode, invoiceNumber.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + json['amount'] = nativeToJson(amount); + json['status'] = + invoiceStatusSerializer(status) + ; + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesForSpendByOrderInvoices({ + required this.id, + required this.issueDate, + required this.dueDate, + required this.amount, + required this.status, + required this.invoiceNumber, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesForSpendByOrderInvoicesVendor { + final String id; + final String companyName; + ListInvoicesForSpendByOrderInvoicesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByOrderInvoicesVendor otherTyped = other as ListInvoicesForSpendByOrderInvoicesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoicesForSpendByOrderInvoicesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoicesForSpendByOrderInvoicesBusiness { + final String id; + final String businessName; + ListInvoicesForSpendByOrderInvoicesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByOrderInvoicesBusiness otherTyped = other as ListInvoicesForSpendByOrderInvoicesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListInvoicesForSpendByOrderInvoicesBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListInvoicesForSpendByOrderInvoicesOrder { + final String id; + final String? eventName; + ListInvoicesForSpendByOrderInvoicesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByOrderInvoicesOrder otherTyped = other as ListInvoicesForSpendByOrderInvoicesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + return json; + } + + ListInvoicesForSpendByOrderInvoicesOrder({ + required this.id, + this.eventName, + }); +} + +@immutable +class ListInvoicesForSpendByOrderData { + final List invoices; + ListInvoicesForSpendByOrderData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesForSpendByOrderInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByOrderData otherTyped = other as ListInvoicesForSpendByOrderData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesForSpendByOrderData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesForSpendByOrderVariables { + final String orderId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesForSpendByOrderVariables.fromJson(Map json): + + orderId = nativeFromJson(json['orderId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByOrderVariables otherTyped = other as ListInvoicesForSpendByOrderVariables; + return orderId == otherTyped.orderId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([orderId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['orderId'] = nativeToJson(orderId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListInvoicesForSpendByOrderVariables({ + required this.orderId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_vendor.dart new file mode 100644 index 00000000..a3d2f7fa --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_invoices_for_spend_by_vendor.dart @@ -0,0 +1,297 @@ +part of 'generated.dart'; + +class ListInvoicesForSpendByVendorVariablesBuilder { + String vendorId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListInvoicesForSpendByVendorVariablesBuilder(this._dataConnect, {required this.vendorId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListInvoicesForSpendByVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListInvoicesForSpendByVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListInvoicesForSpendByVendorVariables vars= ListInvoicesForSpendByVendorVariables(vendorId: vendorId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listInvoicesForSpendByVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListInvoicesForSpendByVendorInvoices { + final String id; + final Timestamp issueDate; + final Timestamp dueDate; + final double amount; + final EnumValue status; + final String invoiceNumber; + final ListInvoicesForSpendByVendorInvoicesVendor vendor; + final ListInvoicesForSpendByVendorInvoicesBusiness business; + final ListInvoicesForSpendByVendorInvoicesOrder order; + ListInvoicesForSpendByVendorInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + amount = nativeFromJson(json['amount']), + status = invoiceStatusDeserializer(json['status']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + vendor = ListInvoicesForSpendByVendorInvoicesVendor.fromJson(json['vendor']), + business = ListInvoicesForSpendByVendorInvoicesBusiness.fromJson(json['business']), + order = ListInvoicesForSpendByVendorInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByVendorInvoices otherTyped = other as ListInvoicesForSpendByVendorInvoices; + return id == otherTyped.id && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + amount == otherTyped.amount && + status == otherTyped.status && + invoiceNumber == otherTyped.invoiceNumber && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, issueDate.hashCode, dueDate.hashCode, amount.hashCode, status.hashCode, invoiceNumber.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + json['amount'] = nativeToJson(amount); + json['status'] = + invoiceStatusSerializer(status) + ; + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListInvoicesForSpendByVendorInvoices({ + required this.id, + required this.issueDate, + required this.dueDate, + required this.amount, + required this.status, + required this.invoiceNumber, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListInvoicesForSpendByVendorInvoicesVendor { + final String id; + final String companyName; + ListInvoicesForSpendByVendorInvoicesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByVendorInvoicesVendor otherTyped = other as ListInvoicesForSpendByVendorInvoicesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListInvoicesForSpendByVendorInvoicesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListInvoicesForSpendByVendorInvoicesBusiness { + final String id; + final String businessName; + ListInvoicesForSpendByVendorInvoicesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByVendorInvoicesBusiness otherTyped = other as ListInvoicesForSpendByVendorInvoicesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListInvoicesForSpendByVendorInvoicesBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListInvoicesForSpendByVendorInvoicesOrder { + final String id; + final String? eventName; + ListInvoicesForSpendByVendorInvoicesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByVendorInvoicesOrder otherTyped = other as ListInvoicesForSpendByVendorInvoicesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + return json; + } + + ListInvoicesForSpendByVendorInvoicesOrder({ + required this.id, + this.eventName, + }); +} + +@immutable +class ListInvoicesForSpendByVendorData { + final List invoices; + ListInvoicesForSpendByVendorData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListInvoicesForSpendByVendorInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByVendorData otherTyped = other as ListInvoicesForSpendByVendorData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListInvoicesForSpendByVendorData({ + required this.invoices, + }); +} + +@immutable +class ListInvoicesForSpendByVendorVariables { + final String vendorId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListInvoicesForSpendByVendorVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListInvoicesForSpendByVendorVariables otherTyped = other as ListInvoicesForSpendByVendorVariables; + return vendorId == otherTyped.vendorId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListInvoicesForSpendByVendorVariables({ + required this.vendorId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_levels.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_levels.dart new file mode 100644 index 00000000..f431c5a2 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_levels.dart @@ -0,0 +1,133 @@ +part of 'generated.dart'; + +class ListLevelsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListLevelsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListLevelsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listLevels", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListLevelsLevels { + final String id; + final String name; + final int xpRequired; + final String? icon; + final AnyValue? colors; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListLevelsLevels.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + xpRequired = nativeFromJson(json['xpRequired']), + icon = json['icon'] == null ? null : nativeFromJson(json['icon']), + colors = json['colors'] == null ? null : AnyValue.fromJson(json['colors']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListLevelsLevels otherTyped = other as ListLevelsLevels; + return id == otherTyped.id && + name == otherTyped.name && + xpRequired == otherTyped.xpRequired && + icon == otherTyped.icon && + colors == otherTyped.colors && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, xpRequired.hashCode, icon.hashCode, colors.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['xpRequired'] = nativeToJson(xpRequired); + if (icon != null) { + json['icon'] = nativeToJson(icon); + } + if (colors != null) { + json['colors'] = colors!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListLevelsLevels({ + required this.id, + required this.name, + required this.xpRequired, + this.icon, + this.colors, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListLevelsData { + final List levels; + ListLevelsData.fromJson(dynamic json): + + levels = (json['levels'] as List) + .map((e) => ListLevelsLevels.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListLevelsData otherTyped = other as ListLevelsData; + return levels == otherTyped.levels; + + } + @override + int get hashCode => levels.hashCode; + + + Map toJson() { + Map json = {}; + json['levels'] = levels.map((e) => e.toJson()).toList(); + return json; + } + + ListLevelsData({ + required this.levels, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_messages.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_messages.dart new file mode 100644 index 00000000..0f842596 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_messages.dart @@ -0,0 +1,158 @@ +part of 'generated.dart'; + +class ListMessagesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListMessagesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListMessagesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listMessages", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListMessagesMessages { + final String id; + final String conversationId; + final String senderId; + final String content; + final bool? isSystem; + final Timestamp? createdAt; + final ListMessagesMessagesUser user; + ListMessagesMessages.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + senderId = nativeFromJson(json['senderId']), + content = nativeFromJson(json['content']), + isSystem = json['isSystem'] == null ? null : nativeFromJson(json['isSystem']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + user = ListMessagesMessagesUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListMessagesMessages otherTyped = other as ListMessagesMessages; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + senderId == otherTyped.senderId && + content == otherTyped.content && + isSystem == otherTyped.isSystem && + createdAt == otherTyped.createdAt && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, senderId.hashCode, content.hashCode, isSystem.hashCode, createdAt.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['senderId'] = nativeToJson(senderId); + json['content'] = nativeToJson(content); + if (isSystem != null) { + json['isSystem'] = nativeToJson(isSystem); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['user'] = user.toJson(); + return json; + } + + ListMessagesMessages({ + required this.id, + required this.conversationId, + required this.senderId, + required this.content, + this.isSystem, + this.createdAt, + required this.user, + }); +} + +@immutable +class ListMessagesMessagesUser { + final String? fullName; + ListMessagesMessagesUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListMessagesMessagesUser otherTyped = other as ListMessagesMessagesUser; + return fullName == otherTyped.fullName; + + } + @override + int get hashCode => fullName.hashCode; + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + return json; + } + + ListMessagesMessagesUser({ + this.fullName, + }); +} + +@immutable +class ListMessagesData { + final List messages; + ListMessagesData.fromJson(dynamic json): + + messages = (json['messages'] as List) + .map((e) => ListMessagesMessages.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListMessagesData otherTyped = other as ListMessagesData; + return messages == otherTyped.messages; + + } + @override + int get hashCode => messages.hashCode; + + + Map toJson() { + Map json = {}; + json['messages'] = messages.map((e) => e.toJson()).toList(); + return json; + } + + ListMessagesData({ + required this.messages, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_orders.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_orders.dart new file mode 100644 index 00000000..6c62ce5a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_orders.dart @@ -0,0 +1,404 @@ +part of 'generated.dart'; + +class ListOrdersVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListOrdersVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListOrdersVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListOrdersVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListOrdersData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListOrdersVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListOrdersVariables vars= ListOrdersVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listOrders", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListOrdersOrders { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final String? location; + final EnumValue status; + final Timestamp? date; + final Timestamp? startDate; + final Timestamp? endDate; + final EnumValue? duration; + final int? lunchBreak; + final double? total; + final AnyValue? assignedStaff; + final AnyValue? shifts; + final int? requested; + final String? hub; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? poReference; + final AnyValue? detectedConflicts; + final String? notes; + final Timestamp? createdAt; + final ListOrdersOrdersBusiness business; + final ListOrdersOrdersVendor vendor; + ListOrdersOrders.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startDate = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']), + endDate = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']), + duration = json['duration'] == null ? null : orderDurationDeserializer(json['duration']), + lunchBreak = json['lunchBreak'] == null ? null : nativeFromJson(json['lunchBreak']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + assignedStaff = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']), + shifts = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']), + requested = json['requested'] == null ? null : nativeFromJson(json['requested']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']), + detectedConflicts = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + business = ListOrdersOrdersBusiness.fromJson(json['business']), + vendor = ListOrdersOrdersVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOrdersOrders otherTyped = other as ListOrdersOrders; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + duration == otherTyped.duration && + lunchBreak == otherTyped.lunchBreak && + total == otherTyped.total && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + poReference == otherTyped.poReference && + detectedConflicts == otherTyped.detectedConflicts && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, duration.hashCode, lunchBreak.hashCode, total.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, poReference.hashCode, detectedConflicts.hashCode, notes.hashCode, createdAt.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + if (location != null) { + json['location'] = nativeToJson(location); + } + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (startDate != null) { + json['startDate'] = startDate!.toJson(); + } + if (endDate != null) { + json['endDate'] = endDate!.toJson(); + } + if (duration != null) { + json['duration'] = + orderDurationSerializer(duration!) + ; + } + if (lunchBreak != null) { + json['lunchBreak'] = nativeToJson(lunchBreak); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (assignedStaff != null) { + json['assignedStaff'] = assignedStaff!.toJson(); + } + if (shifts != null) { + json['shifts'] = shifts!.toJson(); + } + if (requested != null) { + json['requested'] = nativeToJson(requested); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + if (detectedConflicts != null) { + json['detectedConflicts'] = detectedConflicts!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListOrdersOrders({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + this.location, + required this.status, + this.date, + this.startDate, + this.endDate, + this.duration, + this.lunchBreak, + this.total, + this.assignedStaff, + this.shifts, + this.requested, + this.hub, + this.recurringDays, + this.permanentDays, + this.poReference, + this.detectedConflicts, + this.notes, + this.createdAt, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListOrdersOrdersBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListOrdersOrdersBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOrdersOrdersBusiness otherTyped = other as ListOrdersOrdersBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListOrdersOrdersBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListOrdersOrdersVendor { + final String id; + final String companyName; + ListOrdersOrdersVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOrdersOrdersVendor otherTyped = other as ListOrdersOrdersVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListOrdersOrdersVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListOrdersData { + final List orders; + ListOrdersData.fromJson(dynamic json): + + orders = (json['orders'] as List) + .map((e) => ListOrdersOrders.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOrdersData otherTyped = other as ListOrdersData; + return orders == otherTyped.orders; + + } + @override + int get hashCode => orders.hashCode; + + + Map toJson() { + Map json = {}; + json['orders'] = orders.map((e) => e.toJson()).toList(); + return json; + } + + ListOrdersData({ + required this.orders, + }); +} + +@immutable +class ListOrdersVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListOrdersVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOrdersVariables otherTyped = other as ListOrdersVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListOrdersVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_overdue_invoices.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_overdue_invoices.dart new file mode 100644 index 00000000..6c439434 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_overdue_invoices.dart @@ -0,0 +1,481 @@ +part of 'generated.dart'; + +class ListOverdueInvoicesVariablesBuilder { + Timestamp now; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListOverdueInvoicesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListOverdueInvoicesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListOverdueInvoicesVariablesBuilder(this._dataConnect, {required this.now,}); + Deserializer dataDeserializer = (dynamic json) => ListOverdueInvoicesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListOverdueInvoicesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListOverdueInvoicesVariables vars= ListOverdueInvoicesVariables(now: now,offset: _offset,limit: _limit,); + return _dataConnect.query("listOverdueInvoices", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListOverdueInvoicesInvoices { + final String id; + final EnumValue status; + final String vendorId; + final String businessId; + final String orderId; + final EnumValue? paymentTerms; + final String invoiceNumber; + final Timestamp issueDate; + final Timestamp dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final AnyValue? disputedItems; + final String? disputeReason; + final String? disputeDetails; + final ListOverdueInvoicesInvoicesVendor vendor; + final ListOverdueInvoicesInvoicesBusiness business; + final ListOverdueInvoicesInvoicesOrder order; + ListOverdueInvoicesInvoices.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = invoiceStatusDeserializer(json['status']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderId = nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsDeserializer(json['paymentTerms']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + disputedItems = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']), + disputeReason = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']), + disputeDetails = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']), + vendor = ListOverdueInvoicesInvoicesVendor.fromJson(json['vendor']), + business = ListOverdueInvoicesInvoicesBusiness.fromJson(json['business']), + order = ListOverdueInvoicesInvoicesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOverdueInvoicesInvoices otherTyped = other as ListOverdueInvoicesInvoices; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + invoiceStatusSerializer(status) + ; + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderId'] = nativeToJson(orderId); + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsSerializer(paymentTerms!) + ; + } + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + json['amount'] = nativeToJson(amount); + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (disputedItems != null) { + json['disputedItems'] = disputedItems!.toJson(); + } + if (disputeReason != null) { + json['disputeReason'] = nativeToJson(disputeReason); + } + if (disputeDetails != null) { + json['disputeDetails'] = nativeToJson(disputeDetails); + } + json['vendor'] = vendor.toJson(); + json['business'] = business.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListOverdueInvoicesInvoices({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + required this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.disputedItems, + this.disputeReason, + this.disputeDetails, + required this.vendor, + required this.business, + required this.order, + }); +} + +@immutable +class ListOverdueInvoicesInvoicesVendor { + final String companyName; + final String? address; + final String? email; + final String? phone; + ListOverdueInvoicesInvoicesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOverdueInvoicesInvoicesVendor otherTyped = other as ListOverdueInvoicesInvoicesVendor; + return companyName == otherTyped.companyName && + address == otherTyped.address && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, address.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListOverdueInvoicesInvoicesVendor({ + required this.companyName, + this.address, + this.email, + this.phone, + }); +} + +@immutable +class ListOverdueInvoicesInvoicesBusiness { + final String businessName; + final String? address; + final String? phone; + final String? email; + ListOverdueInvoicesInvoicesBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOverdueInvoicesInvoicesBusiness otherTyped = other as ListOverdueInvoicesInvoicesBusiness; + return businessName == otherTyped.businessName && + address == otherTyped.address && + phone == otherTyped.phone && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([businessName.hashCode, address.hashCode, phone.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + if (address != null) { + json['address'] = nativeToJson(address); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListOverdueInvoicesInvoicesBusiness({ + required this.businessName, + this.address, + this.phone, + this.email, + }); +} + +@immutable +class ListOverdueInvoicesInvoicesOrder { + final String? eventName; + final String? hub; + final String? deparment; + final String? poReference; + ListOverdueInvoicesInvoicesOrder.fromJson(dynamic json): + + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + deparment = json['deparment'] == null ? null : nativeFromJson(json['deparment']), + poReference = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOverdueInvoicesInvoicesOrder otherTyped = other as ListOverdueInvoicesInvoicesOrder; + return eventName == otherTyped.eventName && + hub == otherTyped.hub && + deparment == otherTyped.deparment && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([eventName.hashCode, hub.hashCode, deparment.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (deparment != null) { + json['deparment'] = nativeToJson(deparment); + } + if (poReference != null) { + json['poReference'] = nativeToJson(poReference); + } + return json; + } + + ListOverdueInvoicesInvoicesOrder({ + this.eventName, + this.hub, + this.deparment, + this.poReference, + }); +} + +@immutable +class ListOverdueInvoicesData { + final List invoices; + ListOverdueInvoicesData.fromJson(dynamic json): + + invoices = (json['invoices'] as List) + .map((e) => ListOverdueInvoicesInvoices.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOverdueInvoicesData otherTyped = other as ListOverdueInvoicesData; + return invoices == otherTyped.invoices; + + } + @override + int get hashCode => invoices.hashCode; + + + Map toJson() { + Map json = {}; + json['invoices'] = invoices.map((e) => e.toJson()).toList(); + return json; + } + + ListOverdueInvoicesData({ + required this.invoices, + }); +} + +@immutable +class ListOverdueInvoicesVariables { + final Timestamp now; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListOverdueInvoicesVariables.fromJson(Map json): + + now = Timestamp.fromJson(json['now']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListOverdueInvoicesVariables otherTyped = other as ListOverdueInvoicesVariables; + return now == otherTyped.now && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([now.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['now'] = now.toJson(); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListOverdueInvoicesVariables({ + required this.now, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments.dart new file mode 100644 index 00000000..511a08c5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments.dart @@ -0,0 +1,608 @@ +part of 'generated.dart'; + +class ListRecentPaymentsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListRecentPaymentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListRecentPaymentsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListRecentPaymentsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRecentPaymentsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRecentPaymentsVariables vars= ListRecentPaymentsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listRecentPayments", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRecentPaymentsRecentPayments { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListRecentPaymentsRecentPaymentsApplication application; + final ListRecentPaymentsRecentPaymentsInvoice invoice; + ListRecentPaymentsRecentPayments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = ListRecentPaymentsRecentPaymentsApplication.fromJson(json['application']), + invoice = ListRecentPaymentsRecentPaymentsInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPayments otherTyped = other as ListRecentPaymentsRecentPayments; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + ListRecentPaymentsRecentPayments({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsApplication { + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final ListRecentPaymentsRecentPaymentsApplicationShiftRole shiftRole; + ListRecentPaymentsRecentPaymentsApplication.fromJson(dynamic json): + + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + shiftRole = ListRecentPaymentsRecentPaymentsApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsApplication otherTyped = other as ListRecentPaymentsRecentPaymentsApplication; + return checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([checkInTime.hashCode, checkOutTime.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListRecentPaymentsRecentPaymentsApplication({ + this.checkInTime, + this.checkOutTime, + required this.shiftRole, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsApplicationShiftRole { + final double? hours; + final double? totalValue; + final Timestamp? startTime; + final Timestamp? endTime; + final ListRecentPaymentsRecentPaymentsApplicationShiftRoleRole role; + final ListRecentPaymentsRecentPaymentsApplicationShiftRoleShift shift; + ListRecentPaymentsRecentPaymentsApplicationShiftRole.fromJson(dynamic json): + + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + role = ListRecentPaymentsRecentPaymentsApplicationShiftRoleRole.fromJson(json['role']), + shift = ListRecentPaymentsRecentPaymentsApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsApplicationShiftRole otherTyped = other as ListRecentPaymentsRecentPaymentsApplicationShiftRole; + return hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([hours.hashCode, totalValue.hashCode, startTime.hashCode, endTime.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListRecentPaymentsRecentPaymentsApplicationShiftRole({ + this.hours, + this.totalValue, + this.startTime, + this.endTime, + required this.role, + required this.shift, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsApplicationShiftRoleRole { + final String name; + final double costPerHour; + ListRecentPaymentsRecentPaymentsApplicationShiftRoleRole.fromJson(dynamic json): + + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsApplicationShiftRoleRole otherTyped = other as ListRecentPaymentsRecentPaymentsApplicationShiftRoleRole; + return name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListRecentPaymentsRecentPaymentsApplicationShiftRoleRole({ + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsApplicationShiftRoleShift { + final String title; + final Timestamp? date; + final String? location; + final String? locationAddress; + final String? description; + ListRecentPaymentsRecentPaymentsApplicationShiftRoleShift.fromJson(dynamic json): + + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsApplicationShiftRoleShift otherTyped = other as ListRecentPaymentsRecentPaymentsApplicationShiftRoleShift; + return title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description; + + } + @override + int get hashCode => Object.hashAll([title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, description.hashCode]); + + + Map toJson() { + Map json = {}; + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + return json; + } + + ListRecentPaymentsRecentPaymentsApplicationShiftRoleShift({ + required this.title, + this.date, + this.location, + this.locationAddress, + this.description, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsInvoice { + final EnumValue status; + final String invoiceNumber; + final Timestamp issueDate; + final ListRecentPaymentsRecentPaymentsInvoiceBusiness business; + final ListRecentPaymentsRecentPaymentsInvoiceVendor vendor; + final ListRecentPaymentsRecentPaymentsInvoiceOrder order; + ListRecentPaymentsRecentPaymentsInvoice.fromJson(dynamic json): + + status = invoiceStatusDeserializer(json['status']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + issueDate = Timestamp.fromJson(json['issueDate']), + business = ListRecentPaymentsRecentPaymentsInvoiceBusiness.fromJson(json['business']), + vendor = ListRecentPaymentsRecentPaymentsInvoiceVendor.fromJson(json['vendor']), + order = ListRecentPaymentsRecentPaymentsInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsInvoice otherTyped = other as ListRecentPaymentsRecentPaymentsInvoice; + return status == otherTyped.status && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, invoiceNumber.hashCode, issueDate.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + invoiceStatusSerializer(status) + ; + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['issueDate'] = issueDate.toJson(); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListRecentPaymentsRecentPaymentsInvoice({ + required this.status, + required this.invoiceNumber, + required this.issueDate, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsInvoiceBusiness { + final String id; + final String businessName; + ListRecentPaymentsRecentPaymentsInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsInvoiceBusiness otherTyped = other as ListRecentPaymentsRecentPaymentsInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListRecentPaymentsRecentPaymentsInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsInvoiceVendor { + final String id; + final String companyName; + ListRecentPaymentsRecentPaymentsInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsInvoiceVendor otherTyped = other as ListRecentPaymentsRecentPaymentsInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListRecentPaymentsRecentPaymentsInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListRecentPaymentsRecentPaymentsInvoiceOrder { + final String id; + final String? eventName; + ListRecentPaymentsRecentPaymentsInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsRecentPaymentsInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + return json; + } + + ListRecentPaymentsRecentPaymentsInvoiceOrder({ + required this.id, + this.eventName, + }); +} + +@immutable +class ListRecentPaymentsData { + final List recentPayments; + ListRecentPaymentsData.fromJson(dynamic json): + + recentPayments = (json['recentPayments'] as List) + .map((e) => ListRecentPaymentsRecentPayments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsData otherTyped = other as ListRecentPaymentsData; + return recentPayments == otherTyped.recentPayments; + + } + @override + int get hashCode => recentPayments.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayments'] = recentPayments.map((e) => e.toJson()).toList(); + return json; + } + + ListRecentPaymentsData({ + required this.recentPayments, + }); +} + +@immutable +class ListRecentPaymentsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRecentPaymentsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsVariables otherTyped = other as ListRecentPaymentsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListRecentPaymentsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_application_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_application_id.dart new file mode 100644 index 00000000..da902a94 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_application_id.dart @@ -0,0 +1,607 @@ +part of 'generated.dart'; + +class ListRecentPaymentsByApplicationIdVariablesBuilder { + String applicationId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListRecentPaymentsByApplicationIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByApplicationIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListRecentPaymentsByApplicationIdVariablesBuilder(this._dataConnect, {required this.applicationId,}); + Deserializer dataDeserializer = (dynamic json) => ListRecentPaymentsByApplicationIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRecentPaymentsByApplicationIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRecentPaymentsByApplicationIdVariables vars= ListRecentPaymentsByApplicationIdVariables(applicationId: applicationId,offset: _offset,limit: _limit,); + return _dataConnect.query("listRecentPaymentsByApplicationId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPayments { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListRecentPaymentsByApplicationIdRecentPaymentsApplication application; + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoice invoice; + ListRecentPaymentsByApplicationIdRecentPayments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = ListRecentPaymentsByApplicationIdRecentPaymentsApplication.fromJson(json['application']), + invoice = ListRecentPaymentsByApplicationIdRecentPaymentsInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPayments otherTyped = other as ListRecentPaymentsByApplicationIdRecentPayments; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + ListRecentPaymentsByApplicationIdRecentPayments({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsApplication { + final String id; + final EnumValue status; + final ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRole shiftRole; + ListRecentPaymentsByApplicationIdRecentPaymentsApplication.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = applicationStatusDeserializer(json['status']), + shiftRole = ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsApplication otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsApplication; + return id == otherTyped.id && + status == otherTyped.status && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + applicationStatusSerializer(status) + ; + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsApplication({ + required this.id, + required this.status, + required this.shiftRole, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRole { + final double? hours; + final double? totalValue; + final ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleRole role; + final ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleShift shift; + ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRole.fromJson(dynamic json): + + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleRole.fromJson(json['role']), + shift = ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRole otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRole; + return hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRole({ + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleRole otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? locationAddress; + ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleShift otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + locationAddress == otherTyped.locationAddress; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, locationAddress.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsApplicationShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.locationAddress, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsInvoice { + final String id; + final String invoiceNumber; + final EnumValue status; + final double amount; + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceBusiness business; + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor vendor; + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder order; + ListRecentPaymentsByApplicationIdRecentPaymentsInvoice.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + status = invoiceStatusDeserializer(json['status']), + amount = nativeFromJson(json['amount']), + business = ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceBusiness.fromJson(json['business']), + vendor = ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor.fromJson(json['vendor']), + order = ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoice otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoice; + return id == otherTyped.id && + invoiceNumber == otherTyped.invoiceNumber && + status == otherTyped.status && + amount == otherTyped.amount && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, invoiceNumber.hashCode, status.hashCode, amount.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['status'] = + invoiceStatusSerializer(status) + ; + json['amount'] = nativeToJson(amount); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsInvoice({ + required this.id, + required this.invoiceNumber, + required this.status, + required this.amount, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceBusiness { + final String id; + final String businessName; + ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceBusiness otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor { + final String id; + final String companyName; + ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder { + final String id; + final String? eventName; + final String? location; + ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + return json; + } + + ListRecentPaymentsByApplicationIdRecentPaymentsInvoiceOrder({ + required this.id, + this.eventName, + this.location, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdData { + final List recentPayments; + ListRecentPaymentsByApplicationIdData.fromJson(dynamic json): + + recentPayments = (json['recentPayments'] as List) + .map((e) => ListRecentPaymentsByApplicationIdRecentPayments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdData otherTyped = other as ListRecentPaymentsByApplicationIdData; + return recentPayments == otherTyped.recentPayments; + + } + @override + int get hashCode => recentPayments.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayments'] = recentPayments.map((e) => e.toJson()).toList(); + return json; + } + + ListRecentPaymentsByApplicationIdData({ + required this.recentPayments, + }); +} + +@immutable +class ListRecentPaymentsByApplicationIdVariables { + final String applicationId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRecentPaymentsByApplicationIdVariables.fromJson(Map json): + + applicationId = nativeFromJson(json['applicationId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByApplicationIdVariables otherTyped = other as ListRecentPaymentsByApplicationIdVariables; + return applicationId == otherTyped.applicationId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([applicationId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['applicationId'] = nativeToJson(applicationId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListRecentPaymentsByApplicationIdVariables({ + required this.applicationId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_business_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_business_id.dart new file mode 100644 index 00000000..bbe69db2 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_business_id.dart @@ -0,0 +1,657 @@ +part of 'generated.dart'; + +class ListRecentPaymentsByBusinessIdVariablesBuilder { + String businessId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListRecentPaymentsByBusinessIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByBusinessIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListRecentPaymentsByBusinessIdVariablesBuilder(this._dataConnect, {required this.businessId,}); + Deserializer dataDeserializer = (dynamic json) => ListRecentPaymentsByBusinessIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRecentPaymentsByBusinessIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRecentPaymentsByBusinessIdVariables vars= ListRecentPaymentsByBusinessIdVariables(businessId: businessId,offset: _offset,limit: _limit,); + return _dataConnect.query("listRecentPaymentsByBusinessId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPayments { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListRecentPaymentsByBusinessIdRecentPaymentsApplication application; + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoice invoice; + ListRecentPaymentsByBusinessIdRecentPayments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = ListRecentPaymentsByBusinessIdRecentPaymentsApplication.fromJson(json['application']), + invoice = ListRecentPaymentsByBusinessIdRecentPaymentsInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPayments otherTyped = other as ListRecentPaymentsByBusinessIdRecentPayments; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + ListRecentPaymentsByBusinessIdRecentPayments({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsApplication { + final String id; + final String staffId; + final Timestamp? checkInTime; + final Timestamp? checkOutTime; + final ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRole shiftRole; + ListRecentPaymentsByBusinessIdRecentPaymentsApplication.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']), + checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']), + shiftRole = ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsApplication otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsApplication; + return id == otherTyped.id && + staffId == otherTyped.staffId && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, checkInTime.hashCode, checkOutTime.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + if (checkInTime != null) { + json['checkInTime'] = checkInTime!.toJson(); + } + if (checkOutTime != null) { + json['checkOutTime'] = checkOutTime!.toJson(); + } + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsApplication({ + required this.id, + required this.staffId, + this.checkInTime, + this.checkOutTime, + required this.shiftRole, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRole { + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleRole role; + final ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleShift shift; + ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRole.fromJson(dynamic json): + + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleRole.fromJson(json['role']), + shift = ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRole otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRole; + return startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRole({ + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleRole otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? location; + final String? locationAddress; + final String? description; + ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleShift otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, description.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsApplicationShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.location, + this.locationAddress, + this.description, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsInvoice { + final String id; + final String invoiceNumber; + final EnumValue status; + final Timestamp issueDate; + final Timestamp dueDate; + final double amount; + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceBusiness business; + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor vendor; + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder order; + ListRecentPaymentsByBusinessIdRecentPaymentsInvoice.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + status = invoiceStatusDeserializer(json['status']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + amount = nativeFromJson(json['amount']), + business = ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceBusiness.fromJson(json['business']), + vendor = ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor.fromJson(json['vendor']), + order = ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoice otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoice; + return id == otherTyped.id && + invoiceNumber == otherTyped.invoiceNumber && + status == otherTyped.status && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + amount == otherTyped.amount && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, invoiceNumber.hashCode, status.hashCode, issueDate.hashCode, dueDate.hashCode, amount.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['status'] = + invoiceStatusSerializer(status) + ; + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + json['amount'] = nativeToJson(amount); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsInvoice({ + required this.id, + required this.invoiceNumber, + required this.status, + required this.issueDate, + required this.dueDate, + required this.amount, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceBusiness { + final String id; + final String businessName; + ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceBusiness otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor { + final String id; + final String companyName; + ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder { + final String id; + final String? eventName; + final String? location; + ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + return json; + } + + ListRecentPaymentsByBusinessIdRecentPaymentsInvoiceOrder({ + required this.id, + this.eventName, + this.location, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdData { + final List recentPayments; + ListRecentPaymentsByBusinessIdData.fromJson(dynamic json): + + recentPayments = (json['recentPayments'] as List) + .map((e) => ListRecentPaymentsByBusinessIdRecentPayments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdData otherTyped = other as ListRecentPaymentsByBusinessIdData; + return recentPayments == otherTyped.recentPayments; + + } + @override + int get hashCode => recentPayments.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayments'] = recentPayments.map((e) => e.toJson()).toList(); + return json; + } + + ListRecentPaymentsByBusinessIdData({ + required this.recentPayments, + }); +} + +@immutable +class ListRecentPaymentsByBusinessIdVariables { + final String businessId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRecentPaymentsByBusinessIdVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByBusinessIdVariables otherTyped = other as ListRecentPaymentsByBusinessIdVariables; + return businessId == otherTyped.businessId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListRecentPaymentsByBusinessIdVariables({ + required this.businessId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_invoice_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_invoice_id.dart new file mode 100644 index 00000000..2989392a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_invoice_id.dart @@ -0,0 +1,605 @@ +part of 'generated.dart'; + +class ListRecentPaymentsByInvoiceIdVariablesBuilder { + String invoiceId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListRecentPaymentsByInvoiceIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByInvoiceIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListRecentPaymentsByInvoiceIdVariablesBuilder(this._dataConnect, {required this.invoiceId,}); + Deserializer dataDeserializer = (dynamic json) => ListRecentPaymentsByInvoiceIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRecentPaymentsByInvoiceIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRecentPaymentsByInvoiceIdVariables vars= ListRecentPaymentsByInvoiceIdVariables(invoiceId: invoiceId,offset: _offset,limit: _limit,); + return _dataConnect.query("listRecentPaymentsByInvoiceId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPayments { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplication application; + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoice invoice; + ListRecentPaymentsByInvoiceIdRecentPayments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = ListRecentPaymentsByInvoiceIdRecentPaymentsApplication.fromJson(json['application']), + invoice = ListRecentPaymentsByInvoiceIdRecentPaymentsInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPayments otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPayments; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPayments({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsApplication { + final String id; + final String staffId; + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRole shiftRole; + ListRecentPaymentsByInvoiceIdRecentPaymentsApplication.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + shiftRole = ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplication otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsApplication; + return id == otherTyped.id && + staffId == otherTyped.staffId && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsApplication({ + required this.id, + required this.staffId, + required this.shiftRole, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRole { + final double? hours; + final double? totalValue; + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleRole role; + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleShift shift; + ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRole.fromJson(dynamic json): + + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleRole.fromJson(json['role']), + shift = ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRole otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRole; + return hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRole({ + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleRole otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? locationAddress; + ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleShift otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + locationAddress == otherTyped.locationAddress; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, locationAddress.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsApplicationShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.locationAddress, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoice { + final String id; + final String invoiceNumber; + final EnumValue status; + final double amount; + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceBusiness business; + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor vendor; + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder order; + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoice.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + status = invoiceStatusDeserializer(json['status']), + amount = nativeFromJson(json['amount']), + business = ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceBusiness.fromJson(json['business']), + vendor = ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor.fromJson(json['vendor']), + order = ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoice otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoice; + return id == otherTyped.id && + invoiceNumber == otherTyped.invoiceNumber && + status == otherTyped.status && + amount == otherTyped.amount && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, invoiceNumber.hashCode, status.hashCode, amount.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['status'] = + invoiceStatusSerializer(status) + ; + json['amount'] = nativeToJson(amount); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoice({ + required this.id, + required this.invoiceNumber, + required this.status, + required this.amount, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceBusiness { + final String id; + final String businessName; + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceBusiness otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor { + final String id; + final String companyName; + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder { + final String id; + final String? eventName; + final String? location; + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + return json; + } + + ListRecentPaymentsByInvoiceIdRecentPaymentsInvoiceOrder({ + required this.id, + this.eventName, + this.location, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdData { + final List recentPayments; + ListRecentPaymentsByInvoiceIdData.fromJson(dynamic json): + + recentPayments = (json['recentPayments'] as List) + .map((e) => ListRecentPaymentsByInvoiceIdRecentPayments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdData otherTyped = other as ListRecentPaymentsByInvoiceIdData; + return recentPayments == otherTyped.recentPayments; + + } + @override + int get hashCode => recentPayments.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayments'] = recentPayments.map((e) => e.toJson()).toList(); + return json; + } + + ListRecentPaymentsByInvoiceIdData({ + required this.recentPayments, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdVariables { + final String invoiceId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRecentPaymentsByInvoiceIdVariables.fromJson(Map json): + + invoiceId = nativeFromJson(json['invoiceId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdVariables otherTyped = other as ListRecentPaymentsByInvoiceIdVariables; + return invoiceId == otherTyped.invoiceId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([invoiceId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['invoiceId'] = nativeToJson(invoiceId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListRecentPaymentsByInvoiceIdVariables({ + required this.invoiceId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_invoice_ids.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_invoice_ids.dart new file mode 100644 index 00000000..4bb711d1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_invoice_ids.dart @@ -0,0 +1,602 @@ +part of 'generated.dart'; + +class ListRecentPaymentsByInvoiceIdsVariablesBuilder { + List invoiceIds; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListRecentPaymentsByInvoiceIdsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByInvoiceIdsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListRecentPaymentsByInvoiceIdsVariablesBuilder(this._dataConnect, {required this.invoiceIds,}); + Deserializer dataDeserializer = (dynamic json) => ListRecentPaymentsByInvoiceIdsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRecentPaymentsByInvoiceIdsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRecentPaymentsByInvoiceIdsVariables vars= ListRecentPaymentsByInvoiceIdsVariables(invoiceIds: invoiceIds,offset: _offset,limit: _limit,); + return _dataConnect.query("listRecentPaymentsByInvoiceIds", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPayments { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplication application; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoice invoice; + ListRecentPaymentsByInvoiceIdsRecentPayments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = ListRecentPaymentsByInvoiceIdsRecentPaymentsApplication.fromJson(json['application']), + invoice = ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPayments otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPayments; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPayments({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsApplication { + final String id; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRole shiftRole; + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplication.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftRole = ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplication otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsApplication; + return id == otherTyped.id && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplication({ + required this.id, + required this.shiftRole, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRole { + final double? hours; + final double? totalValue; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleRole role; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleShift shift; + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRole.fromJson(dynamic json): + + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleRole.fromJson(json['role']), + shift = ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRole otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRole; + return hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRole({ + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleRole otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? locationAddress; + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleShift otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + locationAddress == otherTyped.locationAddress; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, locationAddress.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsApplicationShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.locationAddress, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoice { + final String id; + final String invoiceNumber; + final EnumValue status; + final double amount; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceBusiness business; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor vendor; + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder order; + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoice.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + status = invoiceStatusDeserializer(json['status']), + amount = nativeFromJson(json['amount']), + business = ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceBusiness.fromJson(json['business']), + vendor = ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor.fromJson(json['vendor']), + order = ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoice otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoice; + return id == otherTyped.id && + invoiceNumber == otherTyped.invoiceNumber && + status == otherTyped.status && + amount == otherTyped.amount && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, invoiceNumber.hashCode, status.hashCode, amount.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['status'] = + invoiceStatusSerializer(status) + ; + json['amount'] = nativeToJson(amount); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoice({ + required this.id, + required this.invoiceNumber, + required this.status, + required this.amount, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceBusiness { + final String id; + final String businessName; + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceBusiness otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor { + final String id; + final String companyName; + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder { + final String id; + final String? eventName; + final String? location; + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + return json; + } + + ListRecentPaymentsByInvoiceIdsRecentPaymentsInvoiceOrder({ + required this.id, + this.eventName, + this.location, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsData { + final List recentPayments; + ListRecentPaymentsByInvoiceIdsData.fromJson(dynamic json): + + recentPayments = (json['recentPayments'] as List) + .map((e) => ListRecentPaymentsByInvoiceIdsRecentPayments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsData otherTyped = other as ListRecentPaymentsByInvoiceIdsData; + return recentPayments == otherTyped.recentPayments; + + } + @override + int get hashCode => recentPayments.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayments'] = recentPayments.map((e) => e.toJson()).toList(); + return json; + } + + ListRecentPaymentsByInvoiceIdsData({ + required this.recentPayments, + }); +} + +@immutable +class ListRecentPaymentsByInvoiceIdsVariables { + final List invoiceIds; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRecentPaymentsByInvoiceIdsVariables.fromJson(Map json): + + invoiceIds = (json['invoiceIds'] as List) + .map((e) => nativeFromJson(e)) + .toList() { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByInvoiceIdsVariables otherTyped = other as ListRecentPaymentsByInvoiceIdsVariables; + return invoiceIds == otherTyped.invoiceIds && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([invoiceIds.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['invoiceIds'] = invoiceIds.map((e) => nativeToJson(e)).toList(); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListRecentPaymentsByInvoiceIdsVariables({ + required this.invoiceIds, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_staff_id.dart new file mode 100644 index 00000000..de171230 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_staff_id.dart @@ -0,0 +1,631 @@ +part of 'generated.dart'; + +class ListRecentPaymentsByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListRecentPaymentsByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListRecentPaymentsByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListRecentPaymentsByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRecentPaymentsByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRecentPaymentsByStaffIdVariables vars= ListRecentPaymentsByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("listRecentPaymentsByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPayments { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListRecentPaymentsByStaffIdRecentPaymentsApplication application; + final ListRecentPaymentsByStaffIdRecentPaymentsInvoice invoice; + ListRecentPaymentsByStaffIdRecentPayments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = ListRecentPaymentsByStaffIdRecentPaymentsApplication.fromJson(json['application']), + invoice = ListRecentPaymentsByStaffIdRecentPaymentsInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPayments otherTyped = other as ListRecentPaymentsByStaffIdRecentPayments; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + ListRecentPaymentsByStaffIdRecentPayments({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsApplication { + final String id; + final EnumValue status; + final ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRole shiftRole; + ListRecentPaymentsByStaffIdRecentPaymentsApplication.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + status = applicationStatusDeserializer(json['status']), + shiftRole = ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsApplication otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsApplication; + return id == otherTyped.id && + status == otherTyped.status && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['status'] = + applicationStatusSerializer(status) + ; + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsApplication({ + required this.id, + required this.status, + required this.shiftRole, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRole { + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? totalValue; + final ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleRole role; + final ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleShift shift; + ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRole.fromJson(dynamic json): + + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleRole.fromJson(json['role']), + shift = ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRole otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRole; + return startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRole({ + this.startTime, + this.endTime, + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleRole otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? locationAddress; + ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleShift otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + locationAddress == otherTyped.locationAddress; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, locationAddress.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsApplicationShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.locationAddress, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsInvoice { + final String id; + final String invoiceNumber; + final EnumValue status; + final Timestamp issueDate; + final Timestamp dueDate; + final double amount; + final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceBusiness business; + final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor vendor; + final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder order; + ListRecentPaymentsByStaffIdRecentPaymentsInvoice.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + status = invoiceStatusDeserializer(json['status']), + issueDate = Timestamp.fromJson(json['issueDate']), + dueDate = Timestamp.fromJson(json['dueDate']), + amount = nativeFromJson(json['amount']), + business = ListRecentPaymentsByStaffIdRecentPaymentsInvoiceBusiness.fromJson(json['business']), + vendor = ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor.fromJson(json['vendor']), + order = ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsInvoice otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoice; + return id == otherTyped.id && + invoiceNumber == otherTyped.invoiceNumber && + status == otherTyped.status && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + amount == otherTyped.amount && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, invoiceNumber.hashCode, status.hashCode, issueDate.hashCode, dueDate.hashCode, amount.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['status'] = + invoiceStatusSerializer(status) + ; + json['issueDate'] = issueDate.toJson(); + json['dueDate'] = dueDate.toJson(); + json['amount'] = nativeToJson(amount); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsInvoice({ + required this.id, + required this.invoiceNumber, + required this.status, + required this.issueDate, + required this.dueDate, + required this.amount, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceBusiness { + final String id; + final String businessName; + ListRecentPaymentsByStaffIdRecentPaymentsInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceBusiness otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor { + final String id; + final String companyName; + ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder { + final String id; + final String? eventName; + final String? location; + ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + return json; + } + + ListRecentPaymentsByStaffIdRecentPaymentsInvoiceOrder({ + required this.id, + this.eventName, + this.location, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdData { + final List recentPayments; + ListRecentPaymentsByStaffIdData.fromJson(dynamic json): + + recentPayments = (json['recentPayments'] as List) + .map((e) => ListRecentPaymentsByStaffIdRecentPayments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdData otherTyped = other as ListRecentPaymentsByStaffIdData; + return recentPayments == otherTyped.recentPayments; + + } + @override + int get hashCode => recentPayments.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayments'] = recentPayments.map((e) => e.toJson()).toList(); + return json; + } + + ListRecentPaymentsByStaffIdData({ + required this.recentPayments, + }); +} + +@immutable +class ListRecentPaymentsByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRecentPaymentsByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStaffIdVariables otherTyped = other as ListRecentPaymentsByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListRecentPaymentsByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_status.dart new file mode 100644 index 00000000..716e335e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_recent_payments_by_status.dart @@ -0,0 +1,602 @@ +part of 'generated.dart'; + +class ListRecentPaymentsByStatusVariablesBuilder { + RecentPaymentStatus status; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListRecentPaymentsByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListRecentPaymentsByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListRecentPaymentsByStatusVariablesBuilder(this._dataConnect, {required this.status,}); + Deserializer dataDeserializer = (dynamic json) => ListRecentPaymentsByStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRecentPaymentsByStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRecentPaymentsByStatusVariables vars= ListRecentPaymentsByStatusVariables(status: status,offset: _offset,limit: _limit,); + return _dataConnect.query("listRecentPaymentsByStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRecentPaymentsByStatusRecentPayments { + final String id; + final String? workedTime; + final EnumValue? status; + final String staffId; + final String applicationId; + final String invoiceId; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListRecentPaymentsByStatusRecentPaymentsApplication application; + final ListRecentPaymentsByStatusRecentPaymentsInvoice invoice; + ListRecentPaymentsByStatusRecentPayments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workedTime = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']), + status = json['status'] == null ? null : recentPaymentStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + applicationId = nativeFromJson(json['applicationId']), + invoiceId = nativeFromJson(json['invoiceId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + application = ListRecentPaymentsByStatusRecentPaymentsApplication.fromJson(json['application']), + invoice = ListRecentPaymentsByStatusRecentPaymentsInvoice.fromJson(json['invoice']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPayments otherTyped = other as ListRecentPaymentsByStatusRecentPayments; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + application == otherTyped.application && + invoice == otherTyped.invoice; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, application.hashCode, invoice.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workedTime != null) { + json['workedTime'] = nativeToJson(workedTime); + } + if (status != null) { + json['status'] = + recentPaymentStatusSerializer(status!) + ; + } + json['staffId'] = nativeToJson(staffId); + json['applicationId'] = nativeToJson(applicationId); + json['invoiceId'] = nativeToJson(invoiceId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['application'] = application.toJson(); + json['invoice'] = invoice.toJson(); + return json; + } + + ListRecentPaymentsByStatusRecentPayments({ + required this.id, + this.workedTime, + this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.application, + required this.invoice, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsApplication { + final String id; + final ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRole shiftRole; + ListRecentPaymentsByStatusRecentPaymentsApplication.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftRole = ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRole.fromJson(json['shiftRole']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsApplication otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsApplication; + return id == otherTyped.id && + shiftRole == otherTyped.shiftRole; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftRole.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftRole'] = shiftRole.toJson(); + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsApplication({ + required this.id, + required this.shiftRole, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRole { + final double? hours; + final double? totalValue; + final ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleRole role; + final ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleShift shift; + ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRole.fromJson(dynamic json): + + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + role = ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleRole.fromJson(json['role']), + shift = ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRole otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRole; + return hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([hours.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRole({ + this.hours, + this.totalValue, + required this.role, + required this.shift, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleRole { + final String id; + final String name; + final double costPerHour; + ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleRole otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleShift { + final String id; + final String title; + final Timestamp? date; + final String? locationAddress; + ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleShift otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + locationAddress == otherTyped.locationAddress; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, locationAddress.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsApplicationShiftRoleShift({ + required this.id, + required this.title, + this.date, + this.locationAddress, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsInvoice { + final String id; + final String invoiceNumber; + final EnumValue status; + final double amount; + final ListRecentPaymentsByStatusRecentPaymentsInvoiceBusiness business; + final ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor vendor; + final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder order; + ListRecentPaymentsByStatusRecentPaymentsInvoice.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + invoiceNumber = nativeFromJson(json['invoiceNumber']), + status = invoiceStatusDeserializer(json['status']), + amount = nativeFromJson(json['amount']), + business = ListRecentPaymentsByStatusRecentPaymentsInvoiceBusiness.fromJson(json['business']), + vendor = ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor.fromJson(json['vendor']), + order = ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsInvoice otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoice; + return id == otherTyped.id && + invoiceNumber == otherTyped.invoiceNumber && + status == otherTyped.status && + amount == otherTyped.amount && + business == otherTyped.business && + vendor == otherTyped.vendor && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, invoiceNumber.hashCode, status.hashCode, amount.hashCode, business.hashCode, vendor.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['invoiceNumber'] = nativeToJson(invoiceNumber); + json['status'] = + invoiceStatusSerializer(status) + ; + json['amount'] = nativeToJson(amount); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + json['order'] = order.toJson(); + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsInvoice({ + required this.id, + required this.invoiceNumber, + required this.status, + required this.amount, + required this.business, + required this.vendor, + required this.order, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsInvoiceBusiness { + final String id; + final String businessName; + ListRecentPaymentsByStatusRecentPaymentsInvoiceBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsInvoiceBusiness otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoiceBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsInvoiceBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor { + final String id; + final String companyName; + ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsInvoiceVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder { + final String id; + final String? eventName; + final String? location; + ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + location = json['location'] == null ? null : nativeFromJson(json['location']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder otherTyped = other as ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + location == otherTyped.location; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, location.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + return json; + } + + ListRecentPaymentsByStatusRecentPaymentsInvoiceOrder({ + required this.id, + this.eventName, + this.location, + }); +} + +@immutable +class ListRecentPaymentsByStatusData { + final List recentPayments; + ListRecentPaymentsByStatusData.fromJson(dynamic json): + + recentPayments = (json['recentPayments'] as List) + .map((e) => ListRecentPaymentsByStatusRecentPayments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusData otherTyped = other as ListRecentPaymentsByStatusData; + return recentPayments == otherTyped.recentPayments; + + } + @override + int get hashCode => recentPayments.hashCode; + + + Map toJson() { + Map json = {}; + json['recentPayments'] = recentPayments.map((e) => e.toJson()).toList(); + return json; + } + + ListRecentPaymentsByStatusData({ + required this.recentPayments, + }); +} + +@immutable +class ListRecentPaymentsByStatusVariables { + final RecentPaymentStatus status; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRecentPaymentsByStatusVariables.fromJson(Map json): + + status = RecentPaymentStatus.values.byName(json['status']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRecentPaymentsByStatusVariables otherTyped = other as ListRecentPaymentsByStatusVariables; + return status == otherTyped.status && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + status.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListRecentPaymentsByStatusVariables({ + required this.status, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_role_categories.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_role_categories.dart new file mode 100644 index 00000000..2f24fe12 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_role_categories.dart @@ -0,0 +1,114 @@ +part of 'generated.dart'; + +class ListRoleCategoriesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListRoleCategoriesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListRoleCategoriesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listRoleCategories", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListRoleCategoriesRoleCategories { + final String id; + final String roleName; + final EnumValue category; + final Timestamp? createdAt; + final Timestamp? updatedAt; + ListRoleCategoriesRoleCategories.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + roleName = nativeFromJson(json['roleName']), + category = roleCategoryTypeDeserializer(json['category']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRoleCategoriesRoleCategories otherTyped = other as ListRoleCategoriesRoleCategories; + return id == otherTyped.id && + roleName == otherTyped.roleName && + category == otherTyped.category && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleName.hashCode, category.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['roleName'] = nativeToJson(roleName); + json['category'] = + roleCategoryTypeSerializer(category) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + ListRoleCategoriesRoleCategories({ + required this.id, + required this.roleName, + required this.category, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class ListRoleCategoriesData { + final List roleCategories; + ListRoleCategoriesData.fromJson(dynamic json): + + roleCategories = (json['roleCategories'] as List) + .map((e) => ListRoleCategoriesRoleCategories.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRoleCategoriesData otherTyped = other as ListRoleCategoriesData; + return roleCategories == otherTyped.roleCategories; + + } + @override + int get hashCode => roleCategories.hashCode; + + + Map toJson() { + Map json = {}; + json['roleCategories'] = roleCategories.map((e) => e.toJson()).toList(); + return json; + } + + ListRoleCategoriesData({ + required this.roleCategories, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles.dart new file mode 100644 index 00000000..7a3f4f6e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles.dart @@ -0,0 +1,115 @@ +part of 'generated.dart'; + +class ListRolesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListRolesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListRolesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listRoles", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListRolesRoles { + final String id; + final String name; + final double costPerHour; + final String vendorId; + final String roleCategoryId; + final Timestamp? createdAt; + ListRolesRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']), + vendorId = nativeFromJson(json['vendorId']), + roleCategoryId = nativeFromJson(json['roleCategoryId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesRoles otherTyped = other as ListRolesRoles; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour && + vendorId == otherTyped.vendorId && + roleCategoryId == otherTyped.roleCategoryId && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode, vendorId.hashCode, roleCategoryId.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + json['vendorId'] = nativeToJson(vendorId); + json['roleCategoryId'] = nativeToJson(roleCategoryId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListRolesRoles({ + required this.id, + required this.name, + required this.costPerHour, + required this.vendorId, + required this.roleCategoryId, + this.createdAt, + }); +} + +@immutable +class ListRolesData { + final List roles; + ListRolesData.fromJson(dynamic json): + + roles = (json['roles'] as List) + .map((e) => ListRolesRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesData otherTyped = other as ListRolesData; + return roles == otherTyped.roles; + + } + @override + int get hashCode => roles.hashCode; + + + Map toJson() { + Map json = {}; + json['roles'] = roles.map((e) => e.toJson()).toList(); + return json; + } + + ListRolesData({ + required this.roles, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles_by_vendor_id.dart new file mode 100644 index 00000000..cc651fa5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles_by_vendor_id.dart @@ -0,0 +1,151 @@ +part of 'generated.dart'; + +class ListRolesByVendorIdVariablesBuilder { + String vendorId; + + final FirebaseDataConnect _dataConnect; + ListRolesByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListRolesByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRolesByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRolesByVendorIdVariables vars= ListRolesByVendorIdVariables(vendorId: vendorId,); + return _dataConnect.query("listRolesByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRolesByVendorIdRoles { + final String id; + final String name; + final double costPerHour; + final String vendorId; + final String roleCategoryId; + final Timestamp? createdAt; + ListRolesByVendorIdRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']), + vendorId = nativeFromJson(json['vendorId']), + roleCategoryId = nativeFromJson(json['roleCategoryId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesByVendorIdRoles otherTyped = other as ListRolesByVendorIdRoles; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour && + vendorId == otherTyped.vendorId && + roleCategoryId == otherTyped.roleCategoryId && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode, vendorId.hashCode, roleCategoryId.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + json['vendorId'] = nativeToJson(vendorId); + json['roleCategoryId'] = nativeToJson(roleCategoryId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListRolesByVendorIdRoles({ + required this.id, + required this.name, + required this.costPerHour, + required this.vendorId, + required this.roleCategoryId, + this.createdAt, + }); +} + +@immutable +class ListRolesByVendorIdData { + final List roles; + ListRolesByVendorIdData.fromJson(dynamic json): + + roles = (json['roles'] as List) + .map((e) => ListRolesByVendorIdRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesByVendorIdData otherTyped = other as ListRolesByVendorIdData; + return roles == otherTyped.roles; + + } + @override + int get hashCode => roles.hashCode; + + + Map toJson() { + Map json = {}; + json['roles'] = roles.map((e) => e.toJson()).toList(); + return json; + } + + ListRolesByVendorIdData({ + required this.roles, + }); +} + +@immutable +class ListRolesByVendorIdVariables { + final String vendorId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRolesByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesByVendorIdVariables otherTyped = other as ListRolesByVendorIdVariables; + return vendorId == otherTyped.vendorId; + + } + @override + int get hashCode => vendorId.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + return json; + } + + ListRolesByVendorIdVariables({ + required this.vendorId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles_byrole_category_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles_byrole_category_id.dart new file mode 100644 index 00000000..518fec18 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_roles_byrole_category_id.dart @@ -0,0 +1,151 @@ +part of 'generated.dart'; + +class ListRolesByroleCategoryIdVariablesBuilder { + String roleCategoryId; + + final FirebaseDataConnect _dataConnect; + ListRolesByroleCategoryIdVariablesBuilder(this._dataConnect, {required this.roleCategoryId,}); + Deserializer dataDeserializer = (dynamic json) => ListRolesByroleCategoryIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListRolesByroleCategoryIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListRolesByroleCategoryIdVariables vars= ListRolesByroleCategoryIdVariables(roleCategoryId: roleCategoryId,); + return _dataConnect.query("listRolesByroleCategoryId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListRolesByroleCategoryIdRoles { + final String id; + final String name; + final double costPerHour; + final String vendorId; + final String roleCategoryId; + final Timestamp? createdAt; + ListRolesByroleCategoryIdRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']), + vendorId = nativeFromJson(json['vendorId']), + roleCategoryId = nativeFromJson(json['roleCategoryId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesByroleCategoryIdRoles otherTyped = other as ListRolesByroleCategoryIdRoles; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour && + vendorId == otherTyped.vendorId && + roleCategoryId == otherTyped.roleCategoryId && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode, vendorId.hashCode, roleCategoryId.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + json['vendorId'] = nativeToJson(vendorId); + json['roleCategoryId'] = nativeToJson(roleCategoryId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListRolesByroleCategoryIdRoles({ + required this.id, + required this.name, + required this.costPerHour, + required this.vendorId, + required this.roleCategoryId, + this.createdAt, + }); +} + +@immutable +class ListRolesByroleCategoryIdData { + final List roles; + ListRolesByroleCategoryIdData.fromJson(dynamic json): + + roles = (json['roles'] as List) + .map((e) => ListRolesByroleCategoryIdRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesByroleCategoryIdData otherTyped = other as ListRolesByroleCategoryIdData; + return roles == otherTyped.roles; + + } + @override + int get hashCode => roles.hashCode; + + + Map toJson() { + Map json = {}; + json['roles'] = roles.map((e) => e.toJson()).toList(); + return json; + } + + ListRolesByroleCategoryIdData({ + required this.roles, + }); +} + +@immutable +class ListRolesByroleCategoryIdVariables { + final String roleCategoryId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListRolesByroleCategoryIdVariables.fromJson(Map json): + + roleCategoryId = nativeFromJson(json['roleCategoryId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListRolesByroleCategoryIdVariables otherTyped = other as ListRolesByroleCategoryIdVariables; + return roleCategoryId == otherTyped.roleCategoryId; + + } + @override + int get hashCode => roleCategoryId.hashCode; + + + Map toJson() { + Map json = {}; + json['roleCategoryId'] = nativeToJson(roleCategoryId); + return json; + } + + ListRolesByroleCategoryIdVariables({ + required this.roleCategoryId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_role_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_role_id.dart new file mode 100644 index 00000000..e7a321ec --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_role_id.dart @@ -0,0 +1,489 @@ +part of 'generated.dart'; + +class ListShiftRolesByRoleIdVariablesBuilder { + String roleId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListShiftRolesByRoleIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByRoleIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListShiftRolesByRoleIdVariablesBuilder(this._dataConnect, {required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftRolesByRoleIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftRolesByRoleIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftRolesByRoleIdVariables vars= ListShiftRolesByRoleIdVariables(roleId: roleId,offset: _offset,limit: _limit,); + return _dataConnect.query("listShiftRolesByRoleId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftRolesByRoleIdShiftRoles { + final String id; + final String shiftId; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final String? department; + final String? uniform; + final EnumValue? breakType; + final double? totalValue; + final Timestamp? createdAt; + final ListShiftRolesByRoleIdShiftRolesRole role; + final ListShiftRolesByRoleIdShiftRolesShift shift; + ListShiftRolesByRoleIdShiftRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + uniform = json['uniform'] == null ? null : nativeFromJson(json['uniform']), + breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + role = ListShiftRolesByRoleIdShiftRolesRole.fromJson(json['role']), + shift = ListShiftRolesByRoleIdShiftRolesShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdShiftRoles otherTyped = other as ListShiftRolesByRoleIdShiftRoles; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + department == otherTyped.department && + uniform == otherTyped.uniform && + breakType == otherTyped.breakType && + totalValue == otherTyped.totalValue && + createdAt == otherTyped.createdAt && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, department.hashCode, uniform.hashCode, breakType.hashCode, totalValue.hashCode, createdAt.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (uniform != null) { + json['uniform'] = nativeToJson(uniform); + } + if (breakType != null) { + json['breakType'] = + breakDurationSerializer(breakType!) + ; + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListShiftRolesByRoleIdShiftRoles({ + required this.id, + required this.shiftId, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.department, + this.uniform, + this.breakType, + this.totalValue, + this.createdAt, + required this.role, + required this.shift, + }); +} + +@immutable +class ListShiftRolesByRoleIdShiftRolesRole { + final String id; + final String name; + final double costPerHour; + ListShiftRolesByRoleIdShiftRolesRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdShiftRolesRole otherTyped = other as ListShiftRolesByRoleIdShiftRolesRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListShiftRolesByRoleIdShiftRolesRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListShiftRolesByRoleIdShiftRolesShift { + final String? location; + final String? locationAddress; + final String? description; + final String orderId; + final ListShiftRolesByRoleIdShiftRolesShiftOrder order; + ListShiftRolesByRoleIdShiftRolesShift.fromJson(dynamic json): + + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + orderId = nativeFromJson(json['orderId']), + order = ListShiftRolesByRoleIdShiftRolesShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdShiftRolesShift otherTyped = other as ListShiftRolesByRoleIdShiftRolesShift; + return location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description && + orderId == otherTyped.orderId && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([location.hashCode, locationAddress.hashCode, description.hashCode, orderId.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['orderId'] = nativeToJson(orderId); + json['order'] = order.toJson(); + return json; + } + + ListShiftRolesByRoleIdShiftRolesShift({ + this.location, + this.locationAddress, + this.description, + required this.orderId, + required this.order, + }); +} + +@immutable +class ListShiftRolesByRoleIdShiftRolesShiftOrder { + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? notes; + final ListShiftRolesByRoleIdShiftRolesShiftOrderBusiness business; + final ListShiftRolesByRoleIdShiftRolesShiftOrderVendor vendor; + ListShiftRolesByRoleIdShiftRolesShiftOrder.fromJson(dynamic json): + + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + business = ListShiftRolesByRoleIdShiftRolesShiftOrderBusiness.fromJson(json['business']), + vendor = ListShiftRolesByRoleIdShiftRolesShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdShiftRolesShiftOrder otherTyped = other as ListShiftRolesByRoleIdShiftRolesShiftOrder; + return recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + notes == otherTyped.notes && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListShiftRolesByRoleIdShiftRolesShiftOrder({ + this.recurringDays, + this.permanentDays, + this.notes, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListShiftRolesByRoleIdShiftRolesShiftOrderBusiness { + final String id; + final String businessName; + ListShiftRolesByRoleIdShiftRolesShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdShiftRolesShiftOrderBusiness otherTyped = other as ListShiftRolesByRoleIdShiftRolesShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListShiftRolesByRoleIdShiftRolesShiftOrderBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListShiftRolesByRoleIdShiftRolesShiftOrderVendor { + final String id; + final String companyName; + ListShiftRolesByRoleIdShiftRolesShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdShiftRolesShiftOrderVendor otherTyped = other as ListShiftRolesByRoleIdShiftRolesShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListShiftRolesByRoleIdShiftRolesShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListShiftRolesByRoleIdData { + final List shiftRoles; + ListShiftRolesByRoleIdData.fromJson(dynamic json): + + shiftRoles = (json['shiftRoles'] as List) + .map((e) => ListShiftRolesByRoleIdShiftRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdData otherTyped = other as ListShiftRolesByRoleIdData; + return shiftRoles == otherTyped.shiftRoles; + + } + @override + int get hashCode => shiftRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftRolesByRoleIdData({ + required this.shiftRoles, + }); +} + +@immutable +class ListShiftRolesByRoleIdVariables { + final String roleId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftRolesByRoleIdVariables.fromJson(Map json): + + roleId = nativeFromJson(json['roleId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByRoleIdVariables otherTyped = other as ListShiftRolesByRoleIdVariables; + return roleId == otherTyped.roleId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([roleId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['roleId'] = nativeToJson(roleId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListShiftRolesByRoleIdVariables({ + required this.roleId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_shift_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_shift_id.dart new file mode 100644 index 00000000..302cb25c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_shift_id.dart @@ -0,0 +1,489 @@ +part of 'generated.dart'; + +class ListShiftRolesByShiftIdVariablesBuilder { + String shiftId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListShiftRolesByShiftIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByShiftIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListShiftRolesByShiftIdVariablesBuilder(this._dataConnect, {required this.shiftId,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftRolesByShiftIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftRolesByShiftIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftRolesByShiftIdVariables vars= ListShiftRolesByShiftIdVariables(shiftId: shiftId,offset: _offset,limit: _limit,); + return _dataConnect.query("listShiftRolesByShiftId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftRolesByShiftIdShiftRoles { + final String id; + final String shiftId; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final String? department; + final String? uniform; + final EnumValue? breakType; + final double? totalValue; + final Timestamp? createdAt; + final ListShiftRolesByShiftIdShiftRolesRole role; + final ListShiftRolesByShiftIdShiftRolesShift shift; + ListShiftRolesByShiftIdShiftRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + uniform = json['uniform'] == null ? null : nativeFromJson(json['uniform']), + breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + role = ListShiftRolesByShiftIdShiftRolesRole.fromJson(json['role']), + shift = ListShiftRolesByShiftIdShiftRolesShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdShiftRoles otherTyped = other as ListShiftRolesByShiftIdShiftRoles; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + department == otherTyped.department && + uniform == otherTyped.uniform && + breakType == otherTyped.breakType && + totalValue == otherTyped.totalValue && + createdAt == otherTyped.createdAt && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, department.hashCode, uniform.hashCode, breakType.hashCode, totalValue.hashCode, createdAt.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (uniform != null) { + json['uniform'] = nativeToJson(uniform); + } + if (breakType != null) { + json['breakType'] = + breakDurationSerializer(breakType!) + ; + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListShiftRolesByShiftIdShiftRoles({ + required this.id, + required this.shiftId, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.department, + this.uniform, + this.breakType, + this.totalValue, + this.createdAt, + required this.role, + required this.shift, + }); +} + +@immutable +class ListShiftRolesByShiftIdShiftRolesRole { + final String id; + final String name; + final double costPerHour; + ListShiftRolesByShiftIdShiftRolesRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdShiftRolesRole otherTyped = other as ListShiftRolesByShiftIdShiftRolesRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListShiftRolesByShiftIdShiftRolesRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListShiftRolesByShiftIdShiftRolesShift { + final String? location; + final String? locationAddress; + final String? description; + final String orderId; + final ListShiftRolesByShiftIdShiftRolesShiftOrder order; + ListShiftRolesByShiftIdShiftRolesShift.fromJson(dynamic json): + + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + orderId = nativeFromJson(json['orderId']), + order = ListShiftRolesByShiftIdShiftRolesShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdShiftRolesShift otherTyped = other as ListShiftRolesByShiftIdShiftRolesShift; + return location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description && + orderId == otherTyped.orderId && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([location.hashCode, locationAddress.hashCode, description.hashCode, orderId.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['orderId'] = nativeToJson(orderId); + json['order'] = order.toJson(); + return json; + } + + ListShiftRolesByShiftIdShiftRolesShift({ + this.location, + this.locationAddress, + this.description, + required this.orderId, + required this.order, + }); +} + +@immutable +class ListShiftRolesByShiftIdShiftRolesShiftOrder { + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? notes; + final ListShiftRolesByShiftIdShiftRolesShiftOrderBusiness business; + final ListShiftRolesByShiftIdShiftRolesShiftOrderVendor vendor; + ListShiftRolesByShiftIdShiftRolesShiftOrder.fromJson(dynamic json): + + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + business = ListShiftRolesByShiftIdShiftRolesShiftOrderBusiness.fromJson(json['business']), + vendor = ListShiftRolesByShiftIdShiftRolesShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdShiftRolesShiftOrder otherTyped = other as ListShiftRolesByShiftIdShiftRolesShiftOrder; + return recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + notes == otherTyped.notes && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListShiftRolesByShiftIdShiftRolesShiftOrder({ + this.recurringDays, + this.permanentDays, + this.notes, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListShiftRolesByShiftIdShiftRolesShiftOrderBusiness { + final String id; + final String businessName; + ListShiftRolesByShiftIdShiftRolesShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdShiftRolesShiftOrderBusiness otherTyped = other as ListShiftRolesByShiftIdShiftRolesShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListShiftRolesByShiftIdShiftRolesShiftOrderBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListShiftRolesByShiftIdShiftRolesShiftOrderVendor { + final String id; + final String companyName; + ListShiftRolesByShiftIdShiftRolesShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdShiftRolesShiftOrderVendor otherTyped = other as ListShiftRolesByShiftIdShiftRolesShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListShiftRolesByShiftIdShiftRolesShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListShiftRolesByShiftIdData { + final List shiftRoles; + ListShiftRolesByShiftIdData.fromJson(dynamic json): + + shiftRoles = (json['shiftRoles'] as List) + .map((e) => ListShiftRolesByShiftIdShiftRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdData otherTyped = other as ListShiftRolesByShiftIdData; + return shiftRoles == otherTyped.shiftRoles; + + } + @override + int get hashCode => shiftRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftRolesByShiftIdData({ + required this.shiftRoles, + }); +} + +@immutable +class ListShiftRolesByShiftIdVariables { + final String shiftId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftRolesByShiftIdVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdVariables otherTyped = other as ListShiftRolesByShiftIdVariables; + return shiftId == otherTyped.shiftId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListShiftRolesByShiftIdVariables({ + required this.shiftId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_shift_id_and_time_range.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_shift_id_and_time_range.dart new file mode 100644 index 00000000..2c608522 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_shift_id_and_time_range.dart @@ -0,0 +1,503 @@ +part of 'generated.dart'; + +class ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder { + String shiftId; + Timestamp start; + Timestamp end; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListShiftRolesByShiftIdAndTimeRangeVariablesBuilder(this._dataConnect, {required this.shiftId,required this.start,required this.end,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftRolesByShiftIdAndTimeRangeData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftRolesByShiftIdAndTimeRangeVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftRolesByShiftIdAndTimeRangeVariables vars= ListShiftRolesByShiftIdAndTimeRangeVariables(shiftId: shiftId,start: start,end: end,offset: _offset,limit: _limit,); + return _dataConnect.query("listShiftRolesByShiftIdAndTimeRange", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeShiftRoles { + final String id; + final String shiftId; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final String? department; + final String? uniform; + final EnumValue? breakType; + final double? totalValue; + final Timestamp? createdAt; + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesRole role; + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShift shift; + ListShiftRolesByShiftIdAndTimeRangeShiftRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + uniform = json['uniform'] == null ? null : nativeFromJson(json['uniform']), + breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + role = ListShiftRolesByShiftIdAndTimeRangeShiftRolesRole.fromJson(json['role']), + shift = ListShiftRolesByShiftIdAndTimeRangeShiftRolesShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeShiftRoles otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeShiftRoles; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + department == otherTyped.department && + uniform == otherTyped.uniform && + breakType == otherTyped.breakType && + totalValue == otherTyped.totalValue && + createdAt == otherTyped.createdAt && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, department.hashCode, uniform.hashCode, breakType.hashCode, totalValue.hashCode, createdAt.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (uniform != null) { + json['uniform'] = nativeToJson(uniform); + } + if (breakType != null) { + json['breakType'] = + breakDurationSerializer(breakType!) + ; + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeShiftRoles({ + required this.id, + required this.shiftId, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.department, + this.uniform, + this.breakType, + this.totalValue, + this.createdAt, + required this.role, + required this.shift, + }); +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeShiftRolesRole { + final String id; + final String name; + final double costPerHour; + ListShiftRolesByShiftIdAndTimeRangeShiftRolesRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesRole otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeShiftRolesRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeShiftRolesRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeShiftRolesShift { + final String? location; + final String? locationAddress; + final String? description; + final String orderId; + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrder order; + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShift.fromJson(dynamic json): + + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + orderId = nativeFromJson(json['orderId']), + order = ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShift otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeShiftRolesShift; + return location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description && + orderId == otherTyped.orderId && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([location.hashCode, locationAddress.hashCode, description.hashCode, orderId.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['orderId'] = nativeToJson(orderId); + json['order'] = order.toJson(); + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShift({ + this.location, + this.locationAddress, + this.description, + required this.orderId, + required this.order, + }); +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrder { + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? notes; + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderBusiness business; + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderVendor vendor; + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrder.fromJson(dynamic json): + + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + business = ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderBusiness.fromJson(json['business']), + vendor = ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrder otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrder; + return recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + notes == otherTyped.notes && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrder({ + this.recurringDays, + this.permanentDays, + this.notes, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderBusiness { + final String id; + final String businessName; + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderBusiness otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderVendor { + final String id; + final String companyName; + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderVendor otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeShiftRolesShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeData { + final List shiftRoles; + ListShiftRolesByShiftIdAndTimeRangeData.fromJson(dynamic json): + + shiftRoles = (json['shiftRoles'] as List) + .map((e) => ListShiftRolesByShiftIdAndTimeRangeShiftRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeData otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeData; + return shiftRoles == otherTyped.shiftRoles; + + } + @override + int get hashCode => shiftRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeData({ + required this.shiftRoles, + }); +} + +@immutable +class ListShiftRolesByShiftIdAndTimeRangeVariables { + final String shiftId; + final Timestamp start; + final Timestamp end; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftRolesByShiftIdAndTimeRangeVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + start = Timestamp.fromJson(json['start']), + end = Timestamp.fromJson(json['end']) { + + + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByShiftIdAndTimeRangeVariables otherTyped = other as ListShiftRolesByShiftIdAndTimeRangeVariables; + return shiftId == otherTyped.shiftId && + start == otherTyped.start && + end == otherTyped.end && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, start.hashCode, end.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['start'] = start.toJson(); + json['end'] = end.toJson(); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListShiftRolesByShiftIdAndTimeRangeVariables({ + required this.shiftId, + required this.start, + required this.end, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_vendor_id.dart new file mode 100644 index 00000000..0aa1e141 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shift_roles_by_vendor_id.dart @@ -0,0 +1,549 @@ +part of 'generated.dart'; + +class ListShiftRolesByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListShiftRolesByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftRolesByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListShiftRolesByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftRolesByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftRolesByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftRolesByVendorIdVariables vars= ListShiftRolesByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listShiftRolesByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftRolesByVendorIdShiftRoles { + final String id; + final String shiftId; + final String roleId; + final int count; + final int? assigned; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final String? department; + final String? uniform; + final EnumValue? breakType; + final double? totalValue; + final Timestamp? createdAt; + final ListShiftRolesByVendorIdShiftRolesRole role; + final ListShiftRolesByVendorIdShiftRolesShift shift; + ListShiftRolesByVendorIdShiftRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']), + count = nativeFromJson(json['count']), + assigned = json['assigned'] == null ? null : nativeFromJson(json['assigned']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + uniform = json['uniform'] == null ? null : nativeFromJson(json['uniform']), + breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + role = ListShiftRolesByVendorIdShiftRolesRole.fromJson(json['role']), + shift = ListShiftRolesByVendorIdShiftRolesShift.fromJson(json['shift']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdShiftRoles otherTyped = other as ListShiftRolesByVendorIdShiftRoles; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + department == otherTyped.department && + uniform == otherTyped.uniform && + breakType == otherTyped.breakType && + totalValue == otherTyped.totalValue && + createdAt == otherTyped.createdAt && + role == otherTyped.role && + shift == otherTyped.shift; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, department.hashCode, uniform.hashCode, breakType.hashCode, totalValue.hashCode, createdAt.hashCode, role.hashCode, shift.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + json['count'] = nativeToJson(count); + if (assigned != null) { + json['assigned'] = nativeToJson(assigned); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (uniform != null) { + json['uniform'] = nativeToJson(uniform); + } + if (breakType != null) { + json['breakType'] = + breakDurationSerializer(breakType!) + ; + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['role'] = role.toJson(); + json['shift'] = shift.toJson(); + return json; + } + + ListShiftRolesByVendorIdShiftRoles({ + required this.id, + required this.shiftId, + required this.roleId, + required this.count, + this.assigned, + this.startTime, + this.endTime, + this.hours, + this.department, + this.uniform, + this.breakType, + this.totalValue, + this.createdAt, + required this.role, + required this.shift, + }); +} + +@immutable +class ListShiftRolesByVendorIdShiftRolesRole { + final String id; + final String name; + final double costPerHour; + ListShiftRolesByVendorIdShiftRolesRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdShiftRolesRole otherTyped = other as ListShiftRolesByVendorIdShiftRolesRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListShiftRolesByVendorIdShiftRolesRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListShiftRolesByVendorIdShiftRolesShift { + final String id; + final String title; + final Timestamp? date; + final String? location; + final String? locationAddress; + final String? description; + final String orderId; + final ListShiftRolesByVendorIdShiftRolesShiftOrder order; + ListShiftRolesByVendorIdShiftRolesShift.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + orderId = nativeFromJson(json['orderId']), + order = ListShiftRolesByVendorIdShiftRolesShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdShiftRolesShift otherTyped = other as ListShiftRolesByVendorIdShiftRolesShift; + return id == otherTyped.id && + title == otherTyped.title && + date == otherTyped.date && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + description == otherTyped.description && + orderId == otherTyped.orderId && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, description.hashCode, orderId.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (date != null) { + json['date'] = date!.toJson(); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['orderId'] = nativeToJson(orderId); + json['order'] = order.toJson(); + return json; + } + + ListShiftRolesByVendorIdShiftRolesShift({ + required this.id, + required this.title, + this.date, + this.location, + this.locationAddress, + this.description, + required this.orderId, + required this.order, + }); +} + +@immutable +class ListShiftRolesByVendorIdShiftRolesShiftOrder { + final String id; + final String? eventName; + final String vendorId; + final String businessId; + final EnumValue orderType; + final EnumValue status; + final Timestamp? date; + final AnyValue? recurringDays; + final AnyValue? permanentDays; + final String? notes; + final ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness business; + final ListShiftRolesByVendorIdShiftRolesShiftOrderVendor vendor; + ListShiftRolesByVendorIdShiftRolesShiftOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + vendorId = nativeFromJson(json['vendorId']), + businessId = nativeFromJson(json['businessId']), + orderType = orderTypeDeserializer(json['orderType']), + status = orderStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + recurringDays = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']), + permanentDays = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + business = ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness.fromJson(json['business']), + vendor = ListShiftRolesByVendorIdShiftRolesShiftOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdShiftRolesShiftOrder otherTyped = other as ListShiftRolesByVendorIdShiftRolesShiftOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderType == otherTyped.orderType && + status == otherTyped.status && + date == otherTyped.date && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + notes == otherTyped.notes && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, vendorId.hashCode, businessId.hashCode, orderType.hashCode, status.hashCode, date.hashCode, recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['vendorId'] = nativeToJson(vendorId); + json['businessId'] = nativeToJson(businessId); + json['orderType'] = + orderTypeSerializer(orderType) + ; + json['status'] = + orderStatusSerializer(status) + ; + if (date != null) { + json['date'] = date!.toJson(); + } + if (recurringDays != null) { + json['recurringDays'] = recurringDays!.toJson(); + } + if (permanentDays != null) { + json['permanentDays'] = permanentDays!.toJson(); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListShiftRolesByVendorIdShiftRolesShiftOrder({ + required this.id, + this.eventName, + required this.vendorId, + required this.businessId, + required this.orderType, + required this.status, + this.date, + this.recurringDays, + this.permanentDays, + this.notes, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness { + final String id; + final String businessName; + ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness otherTyped = other as ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListShiftRolesByVendorIdShiftRolesShiftOrderBusiness({ + required this.id, + required this.businessName, + }); +} + +@immutable +class ListShiftRolesByVendorIdShiftRolesShiftOrderVendor { + final String id; + final String companyName; + ListShiftRolesByVendorIdShiftRolesShiftOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdShiftRolesShiftOrderVendor otherTyped = other as ListShiftRolesByVendorIdShiftRolesShiftOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListShiftRolesByVendorIdShiftRolesShiftOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListShiftRolesByVendorIdData { + final List shiftRoles; + ListShiftRolesByVendorIdData.fromJson(dynamic json): + + shiftRoles = (json['shiftRoles'] as List) + .map((e) => ListShiftRolesByVendorIdShiftRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdData otherTyped = other as ListShiftRolesByVendorIdData; + return shiftRoles == otherTyped.shiftRoles; + + } + @override + int get hashCode => shiftRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftRolesByVendorIdData({ + required this.shiftRoles, + }); +} + +@immutable +class ListShiftRolesByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftRolesByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftRolesByVendorIdVariables otherTyped = other as ListShiftRolesByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListShiftRolesByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts.dart new file mode 100644 index 00000000..492816eb --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts.dart @@ -0,0 +1,469 @@ +part of 'generated.dart'; + +class ListShiftsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListShiftsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListShiftsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListShiftsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListShiftsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsVariables vars= ListShiftsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listShifts", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsShifts { + final String id; + final String title; + final String orderId; + final Timestamp? date; + final Timestamp? startTime; + final Timestamp? endTime; + final double? hours; + final double? cost; + final String? location; + final String? locationAddress; + final double? latitude; + final double? longitude; + final String? description; + final EnumValue? status; + final int? workersNeeded; + final int? filled; + final Timestamp? filledAt; + final List? managers; + final int? durationDays; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListShiftsShiftsOrder order; + ListShiftsShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + orderId = nativeFromJson(json['orderId']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + cost = json['cost'] == null ? null : nativeFromJson(json['cost']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + locationAddress = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']), + latitude = json['latitude'] == null ? null : nativeFromJson(json['latitude']), + longitude = json['longitude'] == null ? null : nativeFromJson(json['longitude']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + filledAt = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']), + managers = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(), + durationDays = json['durationDays'] == null ? null : nativeFromJson(json['durationDays']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + order = ListShiftsShiftsOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsShifts otherTyped = other as ListShiftsShifts; + return id == otherTyped.id && + title == otherTyped.title && + orderId == otherTyped.orderId && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + cost == otherTyped.cost && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + description == otherTyped.description && + status == otherTyped.status && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + filledAt == otherTyped.filledAt && + managers == otherTyped.managers && + durationDays == otherTyped.durationDays && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + json['orderId'] = nativeToJson(orderId); + if (date != null) { + json['date'] = date!.toJson(); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (cost != null) { + json['cost'] = nativeToJson(cost); + } + if (location != null) { + json['location'] = nativeToJson(location); + } + if (locationAddress != null) { + json['locationAddress'] = nativeToJson(locationAddress); + } + if (latitude != null) { + json['latitude'] = nativeToJson(latitude); + } + if (longitude != null) { + json['longitude'] = nativeToJson(longitude); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (filledAt != null) { + json['filledAt'] = filledAt!.toJson(); + } + if (managers != null) { + json['managers'] = managers?.map((e) => e!.toJson()).toList(); + } + if (durationDays != null) { + json['durationDays'] = nativeToJson(durationDays); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['order'] = order.toJson(); + return json; + } + + ListShiftsShifts({ + required this.id, + required this.title, + required this.orderId, + this.date, + this.startTime, + this.endTime, + this.hours, + this.cost, + this.location, + this.locationAddress, + this.latitude, + this.longitude, + this.description, + this.status, + this.workersNeeded, + this.filled, + this.filledAt, + this.managers, + this.durationDays, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.order, + }); +} + +@immutable +class ListShiftsShiftsOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + final String businessId; + final String vendorId; + final ListShiftsShiftsOrderBusiness business; + final ListShiftsShiftsOrderVendor vendor; + ListShiftsShiftsOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']), + businessId = nativeFromJson(json['businessId']), + vendorId = nativeFromJson(json['vendorId']), + business = ListShiftsShiftsOrderBusiness.fromJson(json['business']), + vendor = ListShiftsShiftsOrderVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsShiftsOrder otherTyped = other as ListShiftsShiftsOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + business == otherTyped.business && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode, businessId.hashCode, vendorId.hashCode, business.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + json['businessId'] = nativeToJson(businessId); + json['vendorId'] = nativeToJson(vendorId); + json['business'] = business.toJson(); + json['vendor'] = vendor.toJson(); + return json; + } + + ListShiftsShiftsOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + required this.businessId, + required this.vendorId, + required this.business, + required this.vendor, + }); +} + +@immutable +class ListShiftsShiftsOrderBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + ListShiftsShiftsOrderBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsShiftsOrderBusiness otherTyped = other as ListShiftsShiftsOrderBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + ListShiftsShiftsOrderBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class ListShiftsShiftsOrderVendor { + final String id; + final String companyName; + ListShiftsShiftsOrderVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsShiftsOrderVendor otherTyped = other as ListShiftsShiftsOrderVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListShiftsShiftsOrderVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListShiftsData { + final List shifts; + ListShiftsData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsData otherTyped = other as ListShiftsData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsVariables otherTyped = other as ListShiftsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListShiftsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_coverage.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_coverage.dart new file mode 100644 index 00000000..d5339823 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_coverage.dart @@ -0,0 +1,166 @@ +part of 'generated.dart'; + +class ListShiftsForCoverageVariablesBuilder { + String businessId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListShiftsForCoverageVariablesBuilder(this._dataConnect, {required this.businessId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForCoverageData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForCoverageVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForCoverageVariables vars= ListShiftsForCoverageVariables(businessId: businessId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listShiftsForCoverage", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForCoverageShifts { + final String id; + final Timestamp? date; + final int? workersNeeded; + final int? filled; + final EnumValue? status; + ListShiftsForCoverageShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForCoverageShifts otherTyped = other as ListShiftsForCoverageShifts; + return id == otherTyped.id && + date == otherTyped.date && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, date.hashCode, workersNeeded.hashCode, filled.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (date != null) { + json['date'] = date!.toJson(); + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + return json; + } + + ListShiftsForCoverageShifts({ + required this.id, + this.date, + this.workersNeeded, + this.filled, + this.status, + }); +} + +@immutable +class ListShiftsForCoverageData { + final List shifts; + ListShiftsForCoverageData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForCoverageShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForCoverageData otherTyped = other as ListShiftsForCoverageData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForCoverageData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForCoverageVariables { + final String businessId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForCoverageVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForCoverageVariables otherTyped = other as ListShiftsForCoverageVariables; + return businessId == otherTyped.businessId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListShiftsForCoverageVariables({ + required this.businessId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_daily_ops_by_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_daily_ops_by_business.dart new file mode 100644 index 00000000..dd65a054 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_daily_ops_by_business.dart @@ -0,0 +1,179 @@ +part of 'generated.dart'; + +class ListShiftsForDailyOpsByBusinessVariablesBuilder { + String businessId; + Timestamp date; + + final FirebaseDataConnect _dataConnect; + ListShiftsForDailyOpsByBusinessVariablesBuilder(this._dataConnect, {required this.businessId,required this.date,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForDailyOpsByBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForDailyOpsByBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForDailyOpsByBusinessVariables vars= ListShiftsForDailyOpsByBusinessVariables(businessId: businessId,date: date,); + return _dataConnect.query("listShiftsForDailyOpsByBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForDailyOpsByBusinessShifts { + final String id; + final String title; + final String? location; + final Timestamp? startTime; + final Timestamp? endTime; + final int? workersNeeded; + final int? filled; + final EnumValue? status; + ListShiftsForDailyOpsByBusinessShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForDailyOpsByBusinessShifts otherTyped = other as ListShiftsForDailyOpsByBusinessShifts; + return id == otherTyped.id && + title == otherTyped.title && + location == otherTyped.location && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, location.hashCode, startTime.hashCode, endTime.hashCode, workersNeeded.hashCode, filled.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (location != null) { + json['location'] = nativeToJson(location); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + return json; + } + + ListShiftsForDailyOpsByBusinessShifts({ + required this.id, + required this.title, + this.location, + this.startTime, + this.endTime, + this.workersNeeded, + this.filled, + this.status, + }); +} + +@immutable +class ListShiftsForDailyOpsByBusinessData { + final List shifts; + ListShiftsForDailyOpsByBusinessData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForDailyOpsByBusinessShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForDailyOpsByBusinessData otherTyped = other as ListShiftsForDailyOpsByBusinessData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForDailyOpsByBusinessData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForDailyOpsByBusinessVariables { + final String businessId; + final Timestamp date; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForDailyOpsByBusinessVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + date = Timestamp.fromJson(json['date']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForDailyOpsByBusinessVariables otherTyped = other as ListShiftsForDailyOpsByBusinessVariables; + return businessId == otherTyped.businessId && + date == otherTyped.date; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, date.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['date'] = date.toJson(); + return json; + } + + ListShiftsForDailyOpsByBusinessVariables({ + required this.businessId, + required this.date, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_daily_ops_by_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_daily_ops_by_vendor.dart new file mode 100644 index 00000000..6bd940e5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_daily_ops_by_vendor.dart @@ -0,0 +1,179 @@ +part of 'generated.dart'; + +class ListShiftsForDailyOpsByVendorVariablesBuilder { + String vendorId; + Timestamp date; + + final FirebaseDataConnect _dataConnect; + ListShiftsForDailyOpsByVendorVariablesBuilder(this._dataConnect, {required this.vendorId,required this.date,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForDailyOpsByVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForDailyOpsByVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForDailyOpsByVendorVariables vars= ListShiftsForDailyOpsByVendorVariables(vendorId: vendorId,date: date,); + return _dataConnect.query("listShiftsForDailyOpsByVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForDailyOpsByVendorShifts { + final String id; + final String title; + final String? location; + final Timestamp? startTime; + final Timestamp? endTime; + final int? workersNeeded; + final int? filled; + final EnumValue? status; + ListShiftsForDailyOpsByVendorShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + title = nativeFromJson(json['title']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']), + endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForDailyOpsByVendorShifts otherTyped = other as ListShiftsForDailyOpsByVendorShifts; + return id == otherTyped.id && + title == otherTyped.title && + location == otherTyped.location && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, location.hashCode, startTime.hashCode, endTime.hashCode, workersNeeded.hashCode, filled.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['title'] = nativeToJson(title); + if (location != null) { + json['location'] = nativeToJson(location); + } + if (startTime != null) { + json['startTime'] = startTime!.toJson(); + } + if (endTime != null) { + json['endTime'] = endTime!.toJson(); + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + return json; + } + + ListShiftsForDailyOpsByVendorShifts({ + required this.id, + required this.title, + this.location, + this.startTime, + this.endTime, + this.workersNeeded, + this.filled, + this.status, + }); +} + +@immutable +class ListShiftsForDailyOpsByVendorData { + final List shifts; + ListShiftsForDailyOpsByVendorData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForDailyOpsByVendorShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForDailyOpsByVendorData otherTyped = other as ListShiftsForDailyOpsByVendorData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForDailyOpsByVendorData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForDailyOpsByVendorVariables { + final String vendorId; + final Timestamp date; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForDailyOpsByVendorVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + date = Timestamp.fromJson(json['date']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForDailyOpsByVendorVariables otherTyped = other as ListShiftsForDailyOpsByVendorVariables; + return vendorId == otherTyped.vendorId && + date == otherTyped.date; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, date.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['date'] = date.toJson(); + return json; + } + + ListShiftsForDailyOpsByVendorVariables({ + required this.vendorId, + required this.date, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_forecast_by_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_forecast_by_business.dart new file mode 100644 index 00000000..c6cd9b72 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_forecast_by_business.dart @@ -0,0 +1,173 @@ +part of 'generated.dart'; + +class ListShiftsForForecastByBusinessVariablesBuilder { + String businessId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListShiftsForForecastByBusinessVariablesBuilder(this._dataConnect, {required this.businessId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForForecastByBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForForecastByBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForForecastByBusinessVariables vars= ListShiftsForForecastByBusinessVariables(businessId: businessId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listShiftsForForecastByBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForForecastByBusinessShifts { + final String id; + final Timestamp? date; + final int? workersNeeded; + final double? hours; + final double? cost; + final EnumValue? status; + ListShiftsForForecastByBusinessShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + cost = json['cost'] == null ? null : nativeFromJson(json['cost']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForForecastByBusinessShifts otherTyped = other as ListShiftsForForecastByBusinessShifts; + return id == otherTyped.id && + date == otherTyped.date && + workersNeeded == otherTyped.workersNeeded && + hours == otherTyped.hours && + cost == otherTyped.cost && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, date.hashCode, workersNeeded.hashCode, hours.hashCode, cost.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (date != null) { + json['date'] = date!.toJson(); + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (cost != null) { + json['cost'] = nativeToJson(cost); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + return json; + } + + ListShiftsForForecastByBusinessShifts({ + required this.id, + this.date, + this.workersNeeded, + this.hours, + this.cost, + this.status, + }); +} + +@immutable +class ListShiftsForForecastByBusinessData { + final List shifts; + ListShiftsForForecastByBusinessData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForForecastByBusinessShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForForecastByBusinessData otherTyped = other as ListShiftsForForecastByBusinessData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForForecastByBusinessData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForForecastByBusinessVariables { + final String businessId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForForecastByBusinessVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForForecastByBusinessVariables otherTyped = other as ListShiftsForForecastByBusinessVariables; + return businessId == otherTyped.businessId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListShiftsForForecastByBusinessVariables({ + required this.businessId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_forecast_by_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_forecast_by_vendor.dart new file mode 100644 index 00000000..b4a435b7 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_forecast_by_vendor.dart @@ -0,0 +1,173 @@ +part of 'generated.dart'; + +class ListShiftsForForecastByVendorVariablesBuilder { + String vendorId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListShiftsForForecastByVendorVariablesBuilder(this._dataConnect, {required this.vendorId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForForecastByVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForForecastByVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForForecastByVendorVariables vars= ListShiftsForForecastByVendorVariables(vendorId: vendorId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listShiftsForForecastByVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForForecastByVendorShifts { + final String id; + final Timestamp? date; + final int? workersNeeded; + final double? hours; + final double? cost; + final EnumValue? status; + ListShiftsForForecastByVendorShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + cost = json['cost'] == null ? null : nativeFromJson(json['cost']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForForecastByVendorShifts otherTyped = other as ListShiftsForForecastByVendorShifts; + return id == otherTyped.id && + date == otherTyped.date && + workersNeeded == otherTyped.workersNeeded && + hours == otherTyped.hours && + cost == otherTyped.cost && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, date.hashCode, workersNeeded.hashCode, hours.hashCode, cost.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (date != null) { + json['date'] = date!.toJson(); + } + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (cost != null) { + json['cost'] = nativeToJson(cost); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + return json; + } + + ListShiftsForForecastByVendorShifts({ + required this.id, + this.date, + this.workersNeeded, + this.hours, + this.cost, + this.status, + }); +} + +@immutable +class ListShiftsForForecastByVendorData { + final List shifts; + ListShiftsForForecastByVendorData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForForecastByVendorShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForForecastByVendorData otherTyped = other as ListShiftsForForecastByVendorData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForForecastByVendorData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForForecastByVendorVariables { + final String vendorId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForForecastByVendorVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForForecastByVendorVariables otherTyped = other as ListShiftsForForecastByVendorVariables; + return vendorId == otherTyped.vendorId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListShiftsForForecastByVendorVariables({ + required this.vendorId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_no_show_range_by_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_no_show_range_by_business.dart new file mode 100644 index 00000000..7d4856b1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_no_show_range_by_business.dart @@ -0,0 +1,143 @@ +part of 'generated.dart'; + +class ListShiftsForNoShowRangeByBusinessVariablesBuilder { + String businessId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListShiftsForNoShowRangeByBusinessVariablesBuilder(this._dataConnect, {required this.businessId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForNoShowRangeByBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForNoShowRangeByBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForNoShowRangeByBusinessVariables vars= ListShiftsForNoShowRangeByBusinessVariables(businessId: businessId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listShiftsForNoShowRangeByBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForNoShowRangeByBusinessShifts { + final String id; + final Timestamp? date; + ListShiftsForNoShowRangeByBusinessShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForNoShowRangeByBusinessShifts otherTyped = other as ListShiftsForNoShowRangeByBusinessShifts; + return id == otherTyped.id && + date == otherTyped.date; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, date.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (date != null) { + json['date'] = date!.toJson(); + } + return json; + } + + ListShiftsForNoShowRangeByBusinessShifts({ + required this.id, + this.date, + }); +} + +@immutable +class ListShiftsForNoShowRangeByBusinessData { + final List shifts; + ListShiftsForNoShowRangeByBusinessData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForNoShowRangeByBusinessShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForNoShowRangeByBusinessData otherTyped = other as ListShiftsForNoShowRangeByBusinessData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForNoShowRangeByBusinessData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForNoShowRangeByBusinessVariables { + final String businessId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForNoShowRangeByBusinessVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForNoShowRangeByBusinessVariables otherTyped = other as ListShiftsForNoShowRangeByBusinessVariables; + return businessId == otherTyped.businessId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListShiftsForNoShowRangeByBusinessVariables({ + required this.businessId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_no_show_range_by_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_no_show_range_by_vendor.dart new file mode 100644 index 00000000..24d37aae --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_no_show_range_by_vendor.dart @@ -0,0 +1,143 @@ +part of 'generated.dart'; + +class ListShiftsForNoShowRangeByVendorVariablesBuilder { + String vendorId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListShiftsForNoShowRangeByVendorVariablesBuilder(this._dataConnect, {required this.vendorId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForNoShowRangeByVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForNoShowRangeByVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForNoShowRangeByVendorVariables vars= ListShiftsForNoShowRangeByVendorVariables(vendorId: vendorId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listShiftsForNoShowRangeByVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForNoShowRangeByVendorShifts { + final String id; + final Timestamp? date; + ListShiftsForNoShowRangeByVendorShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForNoShowRangeByVendorShifts otherTyped = other as ListShiftsForNoShowRangeByVendorShifts; + return id == otherTyped.id && + date == otherTyped.date; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, date.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (date != null) { + json['date'] = date!.toJson(); + } + return json; + } + + ListShiftsForNoShowRangeByVendorShifts({ + required this.id, + this.date, + }); +} + +@immutable +class ListShiftsForNoShowRangeByVendorData { + final List shifts; + ListShiftsForNoShowRangeByVendorData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForNoShowRangeByVendorShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForNoShowRangeByVendorData otherTyped = other as ListShiftsForNoShowRangeByVendorData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForNoShowRangeByVendorData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForNoShowRangeByVendorVariables { + final String vendorId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForNoShowRangeByVendorVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForNoShowRangeByVendorVariables otherTyped = other as ListShiftsForNoShowRangeByVendorVariables; + return vendorId == otherTyped.vendorId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListShiftsForNoShowRangeByVendorVariables({ + required this.vendorId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_performance_by_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_performance_by_business.dart new file mode 100644 index 00000000..8b6ac2ae --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_performance_by_business.dart @@ -0,0 +1,173 @@ +part of 'generated.dart'; + +class ListShiftsForPerformanceByBusinessVariablesBuilder { + String businessId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListShiftsForPerformanceByBusinessVariablesBuilder(this._dataConnect, {required this.businessId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForPerformanceByBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForPerformanceByBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForPerformanceByBusinessVariables vars= ListShiftsForPerformanceByBusinessVariables(businessId: businessId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listShiftsForPerformanceByBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForPerformanceByBusinessShifts { + final String id; + final int? workersNeeded; + final int? filled; + final EnumValue? status; + final Timestamp? createdAt; + final Timestamp? filledAt; + ListShiftsForPerformanceByBusinessShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + filledAt = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForPerformanceByBusinessShifts otherTyped = other as ListShiftsForPerformanceByBusinessShifts; + return id == otherTyped.id && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + filledAt == otherTyped.filledAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workersNeeded.hashCode, filled.hashCode, status.hashCode, createdAt.hashCode, filledAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (filledAt != null) { + json['filledAt'] = filledAt!.toJson(); + } + return json; + } + + ListShiftsForPerformanceByBusinessShifts({ + required this.id, + this.workersNeeded, + this.filled, + this.status, + this.createdAt, + this.filledAt, + }); +} + +@immutable +class ListShiftsForPerformanceByBusinessData { + final List shifts; + ListShiftsForPerformanceByBusinessData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForPerformanceByBusinessShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForPerformanceByBusinessData otherTyped = other as ListShiftsForPerformanceByBusinessData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForPerformanceByBusinessData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForPerformanceByBusinessVariables { + final String businessId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForPerformanceByBusinessVariables.fromJson(Map json): + + businessId = nativeFromJson(json['businessId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForPerformanceByBusinessVariables otherTyped = other as ListShiftsForPerformanceByBusinessVariables; + return businessId == otherTyped.businessId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([businessId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['businessId'] = nativeToJson(businessId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListShiftsForPerformanceByBusinessVariables({ + required this.businessId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_performance_by_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_performance_by_vendor.dart new file mode 100644 index 00000000..12364962 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_shifts_for_performance_by_vendor.dart @@ -0,0 +1,173 @@ +part of 'generated.dart'; + +class ListShiftsForPerformanceByVendorVariablesBuilder { + String vendorId; + Timestamp startDate; + Timestamp endDate; + + final FirebaseDataConnect _dataConnect; + ListShiftsForPerformanceByVendorVariablesBuilder(this._dataConnect, {required this.vendorId,required this.startDate,required this.endDate,}); + Deserializer dataDeserializer = (dynamic json) => ListShiftsForPerformanceByVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListShiftsForPerformanceByVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListShiftsForPerformanceByVendorVariables vars= ListShiftsForPerformanceByVendorVariables(vendorId: vendorId,startDate: startDate,endDate: endDate,); + return _dataConnect.query("listShiftsForPerformanceByVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListShiftsForPerformanceByVendorShifts { + final String id; + final int? workersNeeded; + final int? filled; + final EnumValue? status; + final Timestamp? createdAt; + final Timestamp? filledAt; + ListShiftsForPerformanceByVendorShifts.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + workersNeeded = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']), + filled = json['filled'] == null ? null : nativeFromJson(json['filled']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + filledAt = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForPerformanceByVendorShifts otherTyped = other as ListShiftsForPerformanceByVendorShifts; + return id == otherTyped.id && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + filledAt == otherTyped.filledAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workersNeeded.hashCode, filled.hashCode, status.hashCode, createdAt.hashCode, filledAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (workersNeeded != null) { + json['workersNeeded'] = nativeToJson(workersNeeded); + } + if (filled != null) { + json['filled'] = nativeToJson(filled); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (filledAt != null) { + json['filledAt'] = filledAt!.toJson(); + } + return json; + } + + ListShiftsForPerformanceByVendorShifts({ + required this.id, + this.workersNeeded, + this.filled, + this.status, + this.createdAt, + this.filledAt, + }); +} + +@immutable +class ListShiftsForPerformanceByVendorData { + final List shifts; + ListShiftsForPerformanceByVendorData.fromJson(dynamic json): + + shifts = (json['shifts'] as List) + .map((e) => ListShiftsForPerformanceByVendorShifts.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForPerformanceByVendorData otherTyped = other as ListShiftsForPerformanceByVendorData; + return shifts == otherTyped.shifts; + + } + @override + int get hashCode => shifts.hashCode; + + + Map toJson() { + Map json = {}; + json['shifts'] = shifts.map((e) => e.toJson()).toList(); + return json; + } + + ListShiftsForPerformanceByVendorData({ + required this.shifts, + }); +} + +@immutable +class ListShiftsForPerformanceByVendorVariables { + final String vendorId; + final Timestamp startDate; + final Timestamp endDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListShiftsForPerformanceByVendorVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']), + startDate = Timestamp.fromJson(json['startDate']), + endDate = Timestamp.fromJson(json['endDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListShiftsForPerformanceByVendorVariables otherTyped = other as ListShiftsForPerformanceByVendorVariables; + return vendorId == otherTyped.vendorId && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, startDate.hashCode, endDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + json['startDate'] = startDate.toJson(); + json['endDate'] = endDate.toJson(); + return json; + } + + ListShiftsForPerformanceByVendorVariables({ + required this.vendorId, + required this.startDate, + required this.endDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff.dart new file mode 100644 index 00000000..4a2c16f7 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff.dart @@ -0,0 +1,330 @@ +part of 'generated.dart'; + +class ListStaffVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListStaffVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListStaffData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listStaff", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListStaffStaffs { + final String id; + final String userId; + final String fullName; + final String? level; + final String? role; + final String? phone; + final String? email; + final String? photoUrl; + final int? totalShifts; + final double? averageRating; + final int? onTimeRate; + final int? noShowCount; + final int? cancellationCount; + final int? reliabilityScore; + final int? xp; + final AnyValue? badges; + final bool? isRecommended; + final String? bio; + final AnyValue? industries; + final AnyValue? preferredLocations; + final int? maxDistanceMiles; + final AnyValue? languages; + final AnyValue? itemsAttire; + final String? ownerId; + final Timestamp? createdAt; + final EnumValue? department; + final String? hubId; + final String? manager; + final EnumValue? english; + final EnumValue? backgroundCheckStatus; + final EnumValue? employmentType; + final String? initial; + final bool? englishRequired; + final String? city; + final String? addres; + ListStaffStaffs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + fullName = nativeFromJson(json['fullName']), + level = json['level'] == null ? null : nativeFromJson(json['level']), + role = json['role'] == null ? null : nativeFromJson(json['role']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + totalShifts = json['totalShifts'] == null ? null : nativeFromJson(json['totalShifts']), + averageRating = json['averageRating'] == null ? null : nativeFromJson(json['averageRating']), + onTimeRate = json['onTimeRate'] == null ? null : nativeFromJson(json['onTimeRate']), + noShowCount = json['noShowCount'] == null ? null : nativeFromJson(json['noShowCount']), + cancellationCount = json['cancellationCount'] == null ? null : nativeFromJson(json['cancellationCount']), + reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']), + xp = json['xp'] == null ? null : nativeFromJson(json['xp']), + badges = json['badges'] == null ? null : AnyValue.fromJson(json['badges']), + isRecommended = json['isRecommended'] == null ? null : nativeFromJson(json['isRecommended']), + bio = json['bio'] == null ? null : nativeFromJson(json['bio']), + industries = json['industries'] == null ? null : AnyValue.fromJson(json['industries']), + preferredLocations = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']), + maxDistanceMiles = json['maxDistanceMiles'] == null ? null : nativeFromJson(json['maxDistanceMiles']), + languages = json['languages'] == null ? null : AnyValue.fromJson(json['languages']), + itemsAttire = json['itemsAttire'] == null ? null : AnyValue.fromJson(json['itemsAttire']), + ownerId = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + department = json['department'] == null ? null : departmentTypeDeserializer(json['department']), + hubId = json['hubId'] == null ? null : nativeFromJson(json['hubId']), + manager = json['manager'] == null ? null : nativeFromJson(json['manager']), + english = json['english'] == null ? null : englishProficiencyDeserializer(json['english']), + backgroundCheckStatus = json['backgroundCheckStatus'] == null ? null : backgroundCheckStatusDeserializer(json['backgroundCheckStatus']), + employmentType = json['employmentType'] == null ? null : employmentTypeDeserializer(json['employmentType']), + initial = json['initial'] == null ? null : nativeFromJson(json['initial']), + englishRequired = json['englishRequired'] == null ? null : nativeFromJson(json['englishRequired']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + addres = json['addres'] == null ? null : nativeFromJson(json['addres']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffStaffs otherTyped = other as ListStaffStaffs; + return id == otherTyped.id && + userId == otherTyped.userId && + fullName == otherTyped.fullName && + level == otherTyped.level && + role == otherTyped.role && + phone == otherTyped.phone && + email == otherTyped.email && + photoUrl == otherTyped.photoUrl && + totalShifts == otherTyped.totalShifts && + averageRating == otherTyped.averageRating && + onTimeRate == otherTyped.onTimeRate && + noShowCount == otherTyped.noShowCount && + cancellationCount == otherTyped.cancellationCount && + reliabilityScore == otherTyped.reliabilityScore && + xp == otherTyped.xp && + badges == otherTyped.badges && + isRecommended == otherTyped.isRecommended && + bio == otherTyped.bio && + industries == otherTyped.industries && + preferredLocations == otherTyped.preferredLocations && + maxDistanceMiles == otherTyped.maxDistanceMiles && + languages == otherTyped.languages && + itemsAttire == otherTyped.itemsAttire && + ownerId == otherTyped.ownerId && + createdAt == otherTyped.createdAt && + department == otherTyped.department && + hubId == otherTyped.hubId && + manager == otherTyped.manager && + english == otherTyped.english && + backgroundCheckStatus == otherTyped.backgroundCheckStatus && + employmentType == otherTyped.employmentType && + initial == otherTyped.initial && + englishRequired == otherTyped.englishRequired && + city == otherTyped.city && + addres == otherTyped.addres; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['fullName'] = nativeToJson(fullName); + if (level != null) { + json['level'] = nativeToJson(level); + } + if (role != null) { + json['role'] = nativeToJson(role); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (totalShifts != null) { + json['totalShifts'] = nativeToJson(totalShifts); + } + if (averageRating != null) { + json['averageRating'] = nativeToJson(averageRating); + } + if (onTimeRate != null) { + json['onTimeRate'] = nativeToJson(onTimeRate); + } + if (noShowCount != null) { + json['noShowCount'] = nativeToJson(noShowCount); + } + if (cancellationCount != null) { + json['cancellationCount'] = nativeToJson(cancellationCount); + } + if (reliabilityScore != null) { + json['reliabilityScore'] = nativeToJson(reliabilityScore); + } + if (xp != null) { + json['xp'] = nativeToJson(xp); + } + if (badges != null) { + json['badges'] = badges!.toJson(); + } + if (isRecommended != null) { + json['isRecommended'] = nativeToJson(isRecommended); + } + if (bio != null) { + json['bio'] = nativeToJson(bio); + } + if (industries != null) { + json['industries'] = industries!.toJson(); + } + if (preferredLocations != null) { + json['preferredLocations'] = preferredLocations!.toJson(); + } + if (maxDistanceMiles != null) { + json['maxDistanceMiles'] = nativeToJson(maxDistanceMiles); + } + if (languages != null) { + json['languages'] = languages!.toJson(); + } + if (itemsAttire != null) { + json['itemsAttire'] = itemsAttire!.toJson(); + } + if (ownerId != null) { + json['ownerId'] = nativeToJson(ownerId); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (department != null) { + json['department'] = + departmentTypeSerializer(department!) + ; + } + if (hubId != null) { + json['hubId'] = nativeToJson(hubId); + } + if (manager != null) { + json['manager'] = nativeToJson(manager); + } + if (english != null) { + json['english'] = + englishProficiencySerializer(english!) + ; + } + if (backgroundCheckStatus != null) { + json['backgroundCheckStatus'] = + backgroundCheckStatusSerializer(backgroundCheckStatus!) + ; + } + if (employmentType != null) { + json['employmentType'] = + employmentTypeSerializer(employmentType!) + ; + } + if (initial != null) { + json['initial'] = nativeToJson(initial); + } + if (englishRequired != null) { + json['englishRequired'] = nativeToJson(englishRequired); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (addres != null) { + json['addres'] = nativeToJson(addres); + } + return json; + } + + ListStaffStaffs({ + required this.id, + required this.userId, + required this.fullName, + this.level, + this.role, + this.phone, + this.email, + this.photoUrl, + this.totalShifts, + this.averageRating, + this.onTimeRate, + this.noShowCount, + this.cancellationCount, + this.reliabilityScore, + this.xp, + this.badges, + this.isRecommended, + this.bio, + this.industries, + this.preferredLocations, + this.maxDistanceMiles, + this.languages, + this.itemsAttire, + this.ownerId, + this.createdAt, + this.department, + this.hubId, + this.manager, + this.english, + this.backgroundCheckStatus, + this.employmentType, + this.initial, + this.englishRequired, + this.city, + this.addres, + }); +} + +@immutable +class ListStaffData { + final List staffs; + ListStaffData.fromJson(dynamic json): + + staffs = (json['staffs'] as List) + .map((e) => ListStaffStaffs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffData otherTyped = other as ListStaffData; + return staffs == otherTyped.staffs; + + } + @override + int get hashCode => staffs.hashCode; + + + Map toJson() { + Map json = {}; + json['staffs'] = staffs.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffData({ + required this.staffs, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities.dart new file mode 100644 index 00000000..e0a252e6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities.dart @@ -0,0 +1,248 @@ +part of 'generated.dart'; + +class ListStaffAvailabilitiesVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListStaffAvailabilitiesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilitiesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffAvailabilitiesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListStaffAvailabilitiesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffAvailabilitiesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffAvailabilitiesVariables vars= ListStaffAvailabilitiesVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffAvailabilities", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffAvailabilitiesStaffAvailabilities { + final String id; + final String staffId; + final EnumValue day; + final EnumValue slot; + final EnumValue status; + final String? notes; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListStaffAvailabilitiesStaffAvailabilitiesStaff staff; + ListStaffAvailabilitiesStaffAvailabilities.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + day = dayOfWeekDeserializer(json['day']), + slot = availabilitySlotDeserializer(json['slot']), + status = availabilityStatusDeserializer(json['status']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + staff = ListStaffAvailabilitiesStaffAvailabilitiesStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesStaffAvailabilities otherTyped = other as ListStaffAvailabilitiesStaffAvailabilities; + return id == otherTyped.id && + staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot && + status == otherTyped.status && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, day.hashCode, slot.hashCode, status.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['day'] = + dayOfWeekSerializer(day) + ; + json['slot'] = + availabilitySlotSerializer(slot) + ; + json['status'] = + availabilityStatusSerializer(status) + ; + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['staff'] = staff.toJson(); + return json; + } + + ListStaffAvailabilitiesStaffAvailabilities({ + required this.id, + required this.staffId, + required this.day, + required this.slot, + required this.status, + this.notes, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.staff, + }); +} + +@immutable +class ListStaffAvailabilitiesStaffAvailabilitiesStaff { + final String id; + final String fullName; + ListStaffAvailabilitiesStaffAvailabilitiesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesStaffAvailabilitiesStaff otherTyped = other as ListStaffAvailabilitiesStaffAvailabilitiesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListStaffAvailabilitiesStaffAvailabilitiesStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListStaffAvailabilitiesData { + final List staffAvailabilities; + ListStaffAvailabilitiesData.fromJson(dynamic json): + + staffAvailabilities = (json['staffAvailabilities'] as List) + .map((e) => ListStaffAvailabilitiesStaffAvailabilities.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesData otherTyped = other as ListStaffAvailabilitiesData; + return staffAvailabilities == otherTyped.staffAvailabilities; + + } + @override + int get hashCode => staffAvailabilities.hashCode; + + + Map toJson() { + Map json = {}; + json['staffAvailabilities'] = staffAvailabilities.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffAvailabilitiesData({ + required this.staffAvailabilities, + }); +} + +@immutable +class ListStaffAvailabilitiesVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffAvailabilitiesVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesVariables otherTyped = other as ListStaffAvailabilitiesVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffAvailabilitiesVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities_by_day.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities_by_day.dart new file mode 100644 index 00000000..a387b3a9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities_by_day.dart @@ -0,0 +1,257 @@ +part of 'generated.dart'; + +class ListStaffAvailabilitiesByDayVariablesBuilder { + DayOfWeek day; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffAvailabilitiesByDayVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilitiesByDayVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffAvailabilitiesByDayVariablesBuilder(this._dataConnect, {required this.day,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffAvailabilitiesByDayData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffAvailabilitiesByDayVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffAvailabilitiesByDayVariables vars= ListStaffAvailabilitiesByDayVariables(day: day,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffAvailabilitiesByDay", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffAvailabilitiesByDayStaffAvailabilities { + final String id; + final String staffId; + final EnumValue day; + final EnumValue slot; + final EnumValue status; + final String? notes; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListStaffAvailabilitiesByDayStaffAvailabilitiesStaff staff; + ListStaffAvailabilitiesByDayStaffAvailabilities.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + day = dayOfWeekDeserializer(json['day']), + slot = availabilitySlotDeserializer(json['slot']), + status = availabilityStatusDeserializer(json['status']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + staff = ListStaffAvailabilitiesByDayStaffAvailabilitiesStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByDayStaffAvailabilities otherTyped = other as ListStaffAvailabilitiesByDayStaffAvailabilities; + return id == otherTyped.id && + staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot && + status == otherTyped.status && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, day.hashCode, slot.hashCode, status.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['day'] = + dayOfWeekSerializer(day) + ; + json['slot'] = + availabilitySlotSerializer(slot) + ; + json['status'] = + availabilityStatusSerializer(status) + ; + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['staff'] = staff.toJson(); + return json; + } + + ListStaffAvailabilitiesByDayStaffAvailabilities({ + required this.id, + required this.staffId, + required this.day, + required this.slot, + required this.status, + this.notes, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.staff, + }); +} + +@immutable +class ListStaffAvailabilitiesByDayStaffAvailabilitiesStaff { + final String id; + final String fullName; + ListStaffAvailabilitiesByDayStaffAvailabilitiesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByDayStaffAvailabilitiesStaff otherTyped = other as ListStaffAvailabilitiesByDayStaffAvailabilitiesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListStaffAvailabilitiesByDayStaffAvailabilitiesStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListStaffAvailabilitiesByDayData { + final List staffAvailabilities; + ListStaffAvailabilitiesByDayData.fromJson(dynamic json): + + staffAvailabilities = (json['staffAvailabilities'] as List) + .map((e) => ListStaffAvailabilitiesByDayStaffAvailabilities.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByDayData otherTyped = other as ListStaffAvailabilitiesByDayData; + return staffAvailabilities == otherTyped.staffAvailabilities; + + } + @override + int get hashCode => staffAvailabilities.hashCode; + + + Map toJson() { + Map json = {}; + json['staffAvailabilities'] = staffAvailabilities.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffAvailabilitiesByDayData({ + required this.staffAvailabilities, + }); +} + +@immutable +class ListStaffAvailabilitiesByDayVariables { + final DayOfWeek day; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffAvailabilitiesByDayVariables.fromJson(Map json): + + day = DayOfWeek.values.byName(json['day']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByDayVariables otherTyped = other as ListStaffAvailabilitiesByDayVariables; + return day == otherTyped.day && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([day.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['day'] = + day.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffAvailabilitiesByDayVariables({ + required this.day, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities_by_staff_id.dart new file mode 100644 index 00000000..b945f777 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availabilities_by_staff_id.dart @@ -0,0 +1,255 @@ +part of 'generated.dart'; + +class ListStaffAvailabilitiesByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffAvailabilitiesByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilitiesByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffAvailabilitiesByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffAvailabilitiesByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffAvailabilitiesByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffAvailabilitiesByStaffIdVariables vars= ListStaffAvailabilitiesByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffAvailabilitiesByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffAvailabilitiesByStaffIdStaffAvailabilities { + final String id; + final String staffId; + final EnumValue day; + final EnumValue slot; + final EnumValue status; + final String? notes; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListStaffAvailabilitiesByStaffIdStaffAvailabilitiesStaff staff; + ListStaffAvailabilitiesByStaffIdStaffAvailabilities.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + day = dayOfWeekDeserializer(json['day']), + slot = availabilitySlotDeserializer(json['slot']), + status = availabilityStatusDeserializer(json['status']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + staff = ListStaffAvailabilitiesByStaffIdStaffAvailabilitiesStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByStaffIdStaffAvailabilities otherTyped = other as ListStaffAvailabilitiesByStaffIdStaffAvailabilities; + return id == otherTyped.id && + staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot && + status == otherTyped.status && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, day.hashCode, slot.hashCode, status.hashCode, notes.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['day'] = + dayOfWeekSerializer(day) + ; + json['slot'] = + availabilitySlotSerializer(slot) + ; + json['status'] = + availabilityStatusSerializer(status) + ; + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['staff'] = staff.toJson(); + return json; + } + + ListStaffAvailabilitiesByStaffIdStaffAvailabilities({ + required this.id, + required this.staffId, + required this.day, + required this.slot, + required this.status, + this.notes, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.staff, + }); +} + +@immutable +class ListStaffAvailabilitiesByStaffIdStaffAvailabilitiesStaff { + final String id; + final String fullName; + ListStaffAvailabilitiesByStaffIdStaffAvailabilitiesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByStaffIdStaffAvailabilitiesStaff otherTyped = other as ListStaffAvailabilitiesByStaffIdStaffAvailabilitiesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListStaffAvailabilitiesByStaffIdStaffAvailabilitiesStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListStaffAvailabilitiesByStaffIdData { + final List staffAvailabilities; + ListStaffAvailabilitiesByStaffIdData.fromJson(dynamic json): + + staffAvailabilities = (json['staffAvailabilities'] as List) + .map((e) => ListStaffAvailabilitiesByStaffIdStaffAvailabilities.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByStaffIdData otherTyped = other as ListStaffAvailabilitiesByStaffIdData; + return staffAvailabilities == otherTyped.staffAvailabilities; + + } + @override + int get hashCode => staffAvailabilities.hashCode; + + + Map toJson() { + Map json = {}; + json['staffAvailabilities'] = staffAvailabilities.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffAvailabilitiesByStaffIdData({ + required this.staffAvailabilities, + }); +} + +@immutable +class ListStaffAvailabilitiesByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffAvailabilitiesByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilitiesByStaffIdVariables otherTyped = other as ListStaffAvailabilitiesByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffAvailabilitiesByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availability_stats.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availability_stats.dart new file mode 100644 index 00000000..0dd30a2b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_availability_stats.dart @@ -0,0 +1,269 @@ +part of 'generated.dart'; + +class ListStaffAvailabilityStatsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListStaffAvailabilityStatsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffAvailabilityStatsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffAvailabilityStatsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListStaffAvailabilityStatsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffAvailabilityStatsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffAvailabilityStatsVariables vars= ListStaffAvailabilityStatsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffAvailabilityStats", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffAvailabilityStatsStaffAvailabilityStatss { + final String id; + final String staffId; + final int? needWorkIndex; + final int? utilizationPercentage; + final int? predictedAvailabilityScore; + final int? scheduledHoursThisPeriod; + final int? desiredHoursThisPeriod; + final Timestamp? lastShiftDate; + final int? acceptanceRate; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListStaffAvailabilityStatsStaffAvailabilityStatssStaff staff; + ListStaffAvailabilityStatsStaffAvailabilityStatss.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + needWorkIndex = json['needWorkIndex'] == null ? null : nativeFromJson(json['needWorkIndex']), + utilizationPercentage = json['utilizationPercentage'] == null ? null : nativeFromJson(json['utilizationPercentage']), + predictedAvailabilityScore = json['predictedAvailabilityScore'] == null ? null : nativeFromJson(json['predictedAvailabilityScore']), + scheduledHoursThisPeriod = json['scheduledHoursThisPeriod'] == null ? null : nativeFromJson(json['scheduledHoursThisPeriod']), + desiredHoursThisPeriod = json['desiredHoursThisPeriod'] == null ? null : nativeFromJson(json['desiredHoursThisPeriod']), + lastShiftDate = json['lastShiftDate'] == null ? null : Timestamp.fromJson(json['lastShiftDate']), + acceptanceRate = json['acceptanceRate'] == null ? null : nativeFromJson(json['acceptanceRate']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + staff = ListStaffAvailabilityStatsStaffAvailabilityStatssStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilityStatsStaffAvailabilityStatss otherTyped = other as ListStaffAvailabilityStatsStaffAvailabilityStatss; + return id == otherTyped.id && + staffId == otherTyped.staffId && + needWorkIndex == otherTyped.needWorkIndex && + utilizationPercentage == otherTyped.utilizationPercentage && + predictedAvailabilityScore == otherTyped.predictedAvailabilityScore && + scheduledHoursThisPeriod == otherTyped.scheduledHoursThisPeriod && + desiredHoursThisPeriod == otherTyped.desiredHoursThisPeriod && + lastShiftDate == otherTyped.lastShiftDate && + acceptanceRate == otherTyped.acceptanceRate && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, needWorkIndex.hashCode, utilizationPercentage.hashCode, predictedAvailabilityScore.hashCode, scheduledHoursThisPeriod.hashCode, desiredHoursThisPeriod.hashCode, lastShiftDate.hashCode, acceptanceRate.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + if (needWorkIndex != null) { + json['needWorkIndex'] = nativeToJson(needWorkIndex); + } + if (utilizationPercentage != null) { + json['utilizationPercentage'] = nativeToJson(utilizationPercentage); + } + if (predictedAvailabilityScore != null) { + json['predictedAvailabilityScore'] = nativeToJson(predictedAvailabilityScore); + } + if (scheduledHoursThisPeriod != null) { + json['scheduledHoursThisPeriod'] = nativeToJson(scheduledHoursThisPeriod); + } + if (desiredHoursThisPeriod != null) { + json['desiredHoursThisPeriod'] = nativeToJson(desiredHoursThisPeriod); + } + if (lastShiftDate != null) { + json['lastShiftDate'] = lastShiftDate!.toJson(); + } + if (acceptanceRate != null) { + json['acceptanceRate'] = nativeToJson(acceptanceRate); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['staff'] = staff.toJson(); + return json; + } + + ListStaffAvailabilityStatsStaffAvailabilityStatss({ + required this.id, + required this.staffId, + this.needWorkIndex, + this.utilizationPercentage, + this.predictedAvailabilityScore, + this.scheduledHoursThisPeriod, + this.desiredHoursThisPeriod, + this.lastShiftDate, + this.acceptanceRate, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.staff, + }); +} + +@immutable +class ListStaffAvailabilityStatsStaffAvailabilityStatssStaff { + final String id; + final String fullName; + ListStaffAvailabilityStatsStaffAvailabilityStatssStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilityStatsStaffAvailabilityStatssStaff otherTyped = other as ListStaffAvailabilityStatsStaffAvailabilityStatssStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListStaffAvailabilityStatsStaffAvailabilityStatssStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListStaffAvailabilityStatsData { + final List staffAvailabilityStatss; + ListStaffAvailabilityStatsData.fromJson(dynamic json): + + staffAvailabilityStatss = (json['staffAvailabilityStatss'] as List) + .map((e) => ListStaffAvailabilityStatsStaffAvailabilityStatss.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilityStatsData otherTyped = other as ListStaffAvailabilityStatsData; + return staffAvailabilityStatss == otherTyped.staffAvailabilityStatss; + + } + @override + int get hashCode => staffAvailabilityStatss.hashCode; + + + Map toJson() { + Map json = {}; + json['staffAvailabilityStatss'] = staffAvailabilityStatss.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffAvailabilityStatsData({ + required this.staffAvailabilityStatss, + }); +} + +@immutable +class ListStaffAvailabilityStatsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffAvailabilityStatsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffAvailabilityStatsVariables otherTyped = other as ListStaffAvailabilityStatsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffAvailabilityStatsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_courses_by_course_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_courses_by_course_id.dart new file mode 100644 index 00000000..700007e5 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_courses_by_course_id.dart @@ -0,0 +1,216 @@ +part of 'generated.dart'; + +class ListStaffCoursesByCourseIdVariablesBuilder { + String courseId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffCoursesByCourseIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffCoursesByCourseIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffCoursesByCourseIdVariablesBuilder(this._dataConnect, {required this.courseId,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffCoursesByCourseIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffCoursesByCourseIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffCoursesByCourseIdVariables vars= ListStaffCoursesByCourseIdVariables(courseId: courseId,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffCoursesByCourseId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffCoursesByCourseIdStaffCourses { + final String id; + final String staffId; + final String courseId; + final int? progressPercent; + final bool? completed; + final Timestamp? completedAt; + final Timestamp? startedAt; + final Timestamp? lastAccessedAt; + final Timestamp? createdAt; + final Timestamp? updatedAt; + ListStaffCoursesByCourseIdStaffCourses.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + courseId = nativeFromJson(json['courseId']), + progressPercent = json['progressPercent'] == null ? null : nativeFromJson(json['progressPercent']), + completed = json['completed'] == null ? null : nativeFromJson(json['completed']), + completedAt = json['completedAt'] == null ? null : Timestamp.fromJson(json['completedAt']), + startedAt = json['startedAt'] == null ? null : Timestamp.fromJson(json['startedAt']), + lastAccessedAt = json['lastAccessedAt'] == null ? null : Timestamp.fromJson(json['lastAccessedAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffCoursesByCourseIdStaffCourses otherTyped = other as ListStaffCoursesByCourseIdStaffCourses; + return id == otherTyped.id && + staffId == otherTyped.staffId && + courseId == otherTyped.courseId && + progressPercent == otherTyped.progressPercent && + completed == otherTyped.completed && + completedAt == otherTyped.completedAt && + startedAt == otherTyped.startedAt && + lastAccessedAt == otherTyped.lastAccessedAt && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, courseId.hashCode, progressPercent.hashCode, completed.hashCode, completedAt.hashCode, startedAt.hashCode, lastAccessedAt.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['courseId'] = nativeToJson(courseId); + if (progressPercent != null) { + json['progressPercent'] = nativeToJson(progressPercent); + } + if (completed != null) { + json['completed'] = nativeToJson(completed); + } + if (completedAt != null) { + json['completedAt'] = completedAt!.toJson(); + } + if (startedAt != null) { + json['startedAt'] = startedAt!.toJson(); + } + if (lastAccessedAt != null) { + json['lastAccessedAt'] = lastAccessedAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + ListStaffCoursesByCourseIdStaffCourses({ + required this.id, + required this.staffId, + required this.courseId, + this.progressPercent, + this.completed, + this.completedAt, + this.startedAt, + this.lastAccessedAt, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class ListStaffCoursesByCourseIdData { + final List staffCourses; + ListStaffCoursesByCourseIdData.fromJson(dynamic json): + + staffCourses = (json['staffCourses'] as List) + .map((e) => ListStaffCoursesByCourseIdStaffCourses.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffCoursesByCourseIdData otherTyped = other as ListStaffCoursesByCourseIdData; + return staffCourses == otherTyped.staffCourses; + + } + @override + int get hashCode => staffCourses.hashCode; + + + Map toJson() { + Map json = {}; + json['staffCourses'] = staffCourses.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffCoursesByCourseIdData({ + required this.staffCourses, + }); +} + +@immutable +class ListStaffCoursesByCourseIdVariables { + final String courseId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffCoursesByCourseIdVariables.fromJson(Map json): + + courseId = nativeFromJson(json['courseId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffCoursesByCourseIdVariables otherTyped = other as ListStaffCoursesByCourseIdVariables; + return courseId == otherTyped.courseId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([courseId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['courseId'] = nativeToJson(courseId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffCoursesByCourseIdVariables({ + required this.courseId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_courses_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_courses_by_staff_id.dart new file mode 100644 index 00000000..e2663e4a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_courses_by_staff_id.dart @@ -0,0 +1,216 @@ +part of 'generated.dart'; + +class ListStaffCoursesByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffCoursesByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffCoursesByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffCoursesByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffCoursesByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffCoursesByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffCoursesByStaffIdVariables vars= ListStaffCoursesByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffCoursesByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffCoursesByStaffIdStaffCourses { + final String id; + final String staffId; + final String courseId; + final int? progressPercent; + final bool? completed; + final Timestamp? completedAt; + final Timestamp? startedAt; + final Timestamp? lastAccessedAt; + final Timestamp? createdAt; + final Timestamp? updatedAt; + ListStaffCoursesByStaffIdStaffCourses.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + courseId = nativeFromJson(json['courseId']), + progressPercent = json['progressPercent'] == null ? null : nativeFromJson(json['progressPercent']), + completed = json['completed'] == null ? null : nativeFromJson(json['completed']), + completedAt = json['completedAt'] == null ? null : Timestamp.fromJson(json['completedAt']), + startedAt = json['startedAt'] == null ? null : Timestamp.fromJson(json['startedAt']), + lastAccessedAt = json['lastAccessedAt'] == null ? null : Timestamp.fromJson(json['lastAccessedAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffCoursesByStaffIdStaffCourses otherTyped = other as ListStaffCoursesByStaffIdStaffCourses; + return id == otherTyped.id && + staffId == otherTyped.staffId && + courseId == otherTyped.courseId && + progressPercent == otherTyped.progressPercent && + completed == otherTyped.completed && + completedAt == otherTyped.completedAt && + startedAt == otherTyped.startedAt && + lastAccessedAt == otherTyped.lastAccessedAt && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, courseId.hashCode, progressPercent.hashCode, completed.hashCode, completedAt.hashCode, startedAt.hashCode, lastAccessedAt.hashCode, createdAt.hashCode, updatedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['courseId'] = nativeToJson(courseId); + if (progressPercent != null) { + json['progressPercent'] = nativeToJson(progressPercent); + } + if (completed != null) { + json['completed'] = nativeToJson(completed); + } + if (completedAt != null) { + json['completedAt'] = completedAt!.toJson(); + } + if (startedAt != null) { + json['startedAt'] = startedAt!.toJson(); + } + if (lastAccessedAt != null) { + json['lastAccessedAt'] = lastAccessedAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + return json; + } + + ListStaffCoursesByStaffIdStaffCourses({ + required this.id, + required this.staffId, + required this.courseId, + this.progressPercent, + this.completed, + this.completedAt, + this.startedAt, + this.lastAccessedAt, + this.createdAt, + this.updatedAt, + }); +} + +@immutable +class ListStaffCoursesByStaffIdData { + final List staffCourses; + ListStaffCoursesByStaffIdData.fromJson(dynamic json): + + staffCourses = (json['staffCourses'] as List) + .map((e) => ListStaffCoursesByStaffIdStaffCourses.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffCoursesByStaffIdData otherTyped = other as ListStaffCoursesByStaffIdData; + return staffCourses == otherTyped.staffCourses; + + } + @override + int get hashCode => staffCourses.hashCode; + + + Map toJson() { + Map json = {}; + json['staffCourses'] = staffCourses.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffCoursesByStaffIdData({ + required this.staffCourses, + }); +} + +@immutable +class ListStaffCoursesByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffCoursesByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffCoursesByStaffIdVariables otherTyped = other as ListStaffCoursesByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffCoursesByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_document_type.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_document_type.dart new file mode 100644 index 00000000..8f47e917 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_document_type.dart @@ -0,0 +1,246 @@ +part of 'generated.dart'; + +class ListStaffDocumentsByDocumentTypeVariablesBuilder { + DocumentType documentType; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffDocumentsByDocumentTypeVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffDocumentsByDocumentTypeVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffDocumentsByDocumentTypeVariablesBuilder(this._dataConnect, {required this.documentType,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffDocumentsByDocumentTypeData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffDocumentsByDocumentTypeVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffDocumentsByDocumentTypeVariables vars= ListStaffDocumentsByDocumentTypeVariables(documentType: documentType,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffDocumentsByDocumentType", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffDocumentsByDocumentTypeStaffDocuments { + final String id; + final String staffId; + final String staffName; + final String documentId; + final EnumValue status; + final String? documentUrl; + final Timestamp? expiryDate; + final ListStaffDocumentsByDocumentTypeStaffDocumentsDocument document; + ListStaffDocumentsByDocumentTypeStaffDocuments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + staffName = nativeFromJson(json['staffName']), + documentId = nativeFromJson(json['documentId']), + status = documentStatusDeserializer(json['status']), + documentUrl = json['documentUrl'] == null ? null : nativeFromJson(json['documentUrl']), + expiryDate = json['expiryDate'] == null ? null : Timestamp.fromJson(json['expiryDate']), + document = ListStaffDocumentsByDocumentTypeStaffDocumentsDocument.fromJson(json['document']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByDocumentTypeStaffDocuments otherTyped = other as ListStaffDocumentsByDocumentTypeStaffDocuments; + return id == otherTyped.id && + staffId == otherTyped.staffId && + staffName == otherTyped.staffName && + documentId == otherTyped.documentId && + status == otherTyped.status && + documentUrl == otherTyped.documentUrl && + expiryDate == otherTyped.expiryDate && + document == otherTyped.document; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, staffName.hashCode, documentId.hashCode, status.hashCode, documentUrl.hashCode, expiryDate.hashCode, document.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['staffName'] = nativeToJson(staffName); + json['documentId'] = nativeToJson(documentId); + json['status'] = + documentStatusSerializer(status) + ; + if (documentUrl != null) { + json['documentUrl'] = nativeToJson(documentUrl); + } + if (expiryDate != null) { + json['expiryDate'] = expiryDate!.toJson(); + } + json['document'] = document.toJson(); + return json; + } + + ListStaffDocumentsByDocumentTypeStaffDocuments({ + required this.id, + required this.staffId, + required this.staffName, + required this.documentId, + required this.status, + this.documentUrl, + this.expiryDate, + required this.document, + }); +} + +@immutable +class ListStaffDocumentsByDocumentTypeStaffDocumentsDocument { + final String id; + final String name; + final EnumValue documentType; + ListStaffDocumentsByDocumentTypeStaffDocumentsDocument.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + documentType = documentTypeDeserializer(json['documentType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByDocumentTypeStaffDocumentsDocument otherTyped = other as ListStaffDocumentsByDocumentTypeStaffDocumentsDocument; + return id == otherTyped.id && + name == otherTyped.name && + documentType == otherTyped.documentType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, documentType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['documentType'] = + documentTypeSerializer(documentType) + ; + return json; + } + + ListStaffDocumentsByDocumentTypeStaffDocumentsDocument({ + required this.id, + required this.name, + required this.documentType, + }); +} + +@immutable +class ListStaffDocumentsByDocumentTypeData { + final List staffDocuments; + ListStaffDocumentsByDocumentTypeData.fromJson(dynamic json): + + staffDocuments = (json['staffDocuments'] as List) + .map((e) => ListStaffDocumentsByDocumentTypeStaffDocuments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByDocumentTypeData otherTyped = other as ListStaffDocumentsByDocumentTypeData; + return staffDocuments == otherTyped.staffDocuments; + + } + @override + int get hashCode => staffDocuments.hashCode; + + + Map toJson() { + Map json = {}; + json['staffDocuments'] = staffDocuments.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffDocumentsByDocumentTypeData({ + required this.staffDocuments, + }); +} + +@immutable +class ListStaffDocumentsByDocumentTypeVariables { + final DocumentType documentType; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffDocumentsByDocumentTypeVariables.fromJson(Map json): + + documentType = DocumentType.values.byName(json['documentType']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByDocumentTypeVariables otherTyped = other as ListStaffDocumentsByDocumentTypeVariables; + return documentType == otherTyped.documentType && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([documentType.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['documentType'] = + documentType.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffDocumentsByDocumentTypeVariables({ + required this.documentType, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_staff_id.dart new file mode 100644 index 00000000..2d5d2155 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_staff_id.dart @@ -0,0 +1,258 @@ +part of 'generated.dart'; + +class ListStaffDocumentsByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffDocumentsByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffDocumentsByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffDocumentsByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffDocumentsByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffDocumentsByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffDocumentsByStaffIdVariables vars= ListStaffDocumentsByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffDocumentsByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffDocumentsByStaffIdStaffDocuments { + final String id; + final String staffId; + final String staffName; + final String documentId; + final EnumValue status; + final String? documentUrl; + final Timestamp? expiryDate; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final ListStaffDocumentsByStaffIdStaffDocumentsDocument document; + ListStaffDocumentsByStaffIdStaffDocuments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + staffName = nativeFromJson(json['staffName']), + documentId = nativeFromJson(json['documentId']), + status = documentStatusDeserializer(json['status']), + documentUrl = json['documentUrl'] == null ? null : nativeFromJson(json['documentUrl']), + expiryDate = json['expiryDate'] == null ? null : Timestamp.fromJson(json['expiryDate']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + document = ListStaffDocumentsByStaffIdStaffDocumentsDocument.fromJson(json['document']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStaffIdStaffDocuments otherTyped = other as ListStaffDocumentsByStaffIdStaffDocuments; + return id == otherTyped.id && + staffId == otherTyped.staffId && + staffName == otherTyped.staffName && + documentId == otherTyped.documentId && + status == otherTyped.status && + documentUrl == otherTyped.documentUrl && + expiryDate == otherTyped.expiryDate && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + document == otherTyped.document; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, staffName.hashCode, documentId.hashCode, status.hashCode, documentUrl.hashCode, expiryDate.hashCode, createdAt.hashCode, updatedAt.hashCode, document.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['staffName'] = nativeToJson(staffName); + json['documentId'] = nativeToJson(documentId); + json['status'] = + documentStatusSerializer(status) + ; + if (documentUrl != null) { + json['documentUrl'] = nativeToJson(documentUrl); + } + if (expiryDate != null) { + json['expiryDate'] = expiryDate!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + json['document'] = document.toJson(); + return json; + } + + ListStaffDocumentsByStaffIdStaffDocuments({ + required this.id, + required this.staffId, + required this.staffName, + required this.documentId, + required this.status, + this.documentUrl, + this.expiryDate, + this.createdAt, + this.updatedAt, + required this.document, + }); +} + +@immutable +class ListStaffDocumentsByStaffIdStaffDocumentsDocument { + final String id; + final String name; + final EnumValue documentType; + ListStaffDocumentsByStaffIdStaffDocumentsDocument.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + documentType = documentTypeDeserializer(json['documentType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStaffIdStaffDocumentsDocument otherTyped = other as ListStaffDocumentsByStaffIdStaffDocumentsDocument; + return id == otherTyped.id && + name == otherTyped.name && + documentType == otherTyped.documentType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, documentType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['documentType'] = + documentTypeSerializer(documentType) + ; + return json; + } + + ListStaffDocumentsByStaffIdStaffDocumentsDocument({ + required this.id, + required this.name, + required this.documentType, + }); +} + +@immutable +class ListStaffDocumentsByStaffIdData { + final List staffDocuments; + ListStaffDocumentsByStaffIdData.fromJson(dynamic json): + + staffDocuments = (json['staffDocuments'] as List) + .map((e) => ListStaffDocumentsByStaffIdStaffDocuments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStaffIdData otherTyped = other as ListStaffDocumentsByStaffIdData; + return staffDocuments == otherTyped.staffDocuments; + + } + @override + int get hashCode => staffDocuments.hashCode; + + + Map toJson() { + Map json = {}; + json['staffDocuments'] = staffDocuments.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffDocumentsByStaffIdData({ + required this.staffDocuments, + }); +} + +@immutable +class ListStaffDocumentsByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffDocumentsByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStaffIdVariables otherTyped = other as ListStaffDocumentsByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffDocumentsByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_status.dart new file mode 100644 index 00000000..1bb9e23f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_documents_by_status.dart @@ -0,0 +1,246 @@ +part of 'generated.dart'; + +class ListStaffDocumentsByStatusVariablesBuilder { + DocumentStatus status; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffDocumentsByStatusVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffDocumentsByStatusVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffDocumentsByStatusVariablesBuilder(this._dataConnect, {required this.status,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffDocumentsByStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffDocumentsByStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffDocumentsByStatusVariables vars= ListStaffDocumentsByStatusVariables(status: status,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffDocumentsByStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffDocumentsByStatusStaffDocuments { + final String id; + final String staffId; + final String staffName; + final String documentId; + final EnumValue status; + final String? documentUrl; + final Timestamp? expiryDate; + final ListStaffDocumentsByStatusStaffDocumentsDocument document; + ListStaffDocumentsByStatusStaffDocuments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + staffName = nativeFromJson(json['staffName']), + documentId = nativeFromJson(json['documentId']), + status = documentStatusDeserializer(json['status']), + documentUrl = json['documentUrl'] == null ? null : nativeFromJson(json['documentUrl']), + expiryDate = json['expiryDate'] == null ? null : Timestamp.fromJson(json['expiryDate']), + document = ListStaffDocumentsByStatusStaffDocumentsDocument.fromJson(json['document']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStatusStaffDocuments otherTyped = other as ListStaffDocumentsByStatusStaffDocuments; + return id == otherTyped.id && + staffId == otherTyped.staffId && + staffName == otherTyped.staffName && + documentId == otherTyped.documentId && + status == otherTyped.status && + documentUrl == otherTyped.documentUrl && + expiryDate == otherTyped.expiryDate && + document == otherTyped.document; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, staffName.hashCode, documentId.hashCode, status.hashCode, documentUrl.hashCode, expiryDate.hashCode, document.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['staffName'] = nativeToJson(staffName); + json['documentId'] = nativeToJson(documentId); + json['status'] = + documentStatusSerializer(status) + ; + if (documentUrl != null) { + json['documentUrl'] = nativeToJson(documentUrl); + } + if (expiryDate != null) { + json['expiryDate'] = expiryDate!.toJson(); + } + json['document'] = document.toJson(); + return json; + } + + ListStaffDocumentsByStatusStaffDocuments({ + required this.id, + required this.staffId, + required this.staffName, + required this.documentId, + required this.status, + this.documentUrl, + this.expiryDate, + required this.document, + }); +} + +@immutable +class ListStaffDocumentsByStatusStaffDocumentsDocument { + final String id; + final String name; + final EnumValue documentType; + ListStaffDocumentsByStatusStaffDocumentsDocument.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + documentType = documentTypeDeserializer(json['documentType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStatusStaffDocumentsDocument otherTyped = other as ListStaffDocumentsByStatusStaffDocumentsDocument; + return id == otherTyped.id && + name == otherTyped.name && + documentType == otherTyped.documentType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, documentType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['documentType'] = + documentTypeSerializer(documentType) + ; + return json; + } + + ListStaffDocumentsByStatusStaffDocumentsDocument({ + required this.id, + required this.name, + required this.documentType, + }); +} + +@immutable +class ListStaffDocumentsByStatusData { + final List staffDocuments; + ListStaffDocumentsByStatusData.fromJson(dynamic json): + + staffDocuments = (json['staffDocuments'] as List) + .map((e) => ListStaffDocumentsByStatusStaffDocuments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStatusData otherTyped = other as ListStaffDocumentsByStatusData; + return staffDocuments == otherTyped.staffDocuments; + + } + @override + int get hashCode => staffDocuments.hashCode; + + + Map toJson() { + Map json = {}; + json['staffDocuments'] = staffDocuments.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffDocumentsByStatusData({ + required this.staffDocuments, + }); +} + +@immutable +class ListStaffDocumentsByStatusVariables { + final DocumentStatus status; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffDocumentsByStatusVariables.fromJson(Map json): + + status = DocumentStatus.values.byName(json['status']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffDocumentsByStatusVariables otherTyped = other as ListStaffDocumentsByStatusVariables; + return status == otherTyped.status && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([status.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['status'] = + status.name + ; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffDocumentsByStatusVariables({ + required this.status, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_for_no_show_report.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_for_no_show_report.dart new file mode 100644 index 00000000..e111c216 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_for_no_show_report.dart @@ -0,0 +1,145 @@ +part of 'generated.dart'; + +class ListStaffForNoShowReportVariablesBuilder { + List staffIds; + + final FirebaseDataConnect _dataConnect; + ListStaffForNoShowReportVariablesBuilder(this._dataConnect, {required this.staffIds,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffForNoShowReportData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffForNoShowReportVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffForNoShowReportVariables vars= ListStaffForNoShowReportVariables(staffIds: staffIds,); + return _dataConnect.query("listStaffForNoShowReport", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffForNoShowReportStaffs { + final String id; + final String fullName; + final int? noShowCount; + final int? reliabilityScore; + ListStaffForNoShowReportStaffs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']), + noShowCount = json['noShowCount'] == null ? null : nativeFromJson(json['noShowCount']), + reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffForNoShowReportStaffs otherTyped = other as ListStaffForNoShowReportStaffs; + return id == otherTyped.id && + fullName == otherTyped.fullName && + noShowCount == otherTyped.noShowCount && + reliabilityScore == otherTyped.reliabilityScore; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, noShowCount.hashCode, reliabilityScore.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + if (noShowCount != null) { + json['noShowCount'] = nativeToJson(noShowCount); + } + if (reliabilityScore != null) { + json['reliabilityScore'] = nativeToJson(reliabilityScore); + } + return json; + } + + ListStaffForNoShowReportStaffs({ + required this.id, + required this.fullName, + this.noShowCount, + this.reliabilityScore, + }); +} + +@immutable +class ListStaffForNoShowReportData { + final List staffs; + ListStaffForNoShowReportData.fromJson(dynamic json): + + staffs = (json['staffs'] as List) + .map((e) => ListStaffForNoShowReportStaffs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffForNoShowReportData otherTyped = other as ListStaffForNoShowReportData; + return staffs == otherTyped.staffs; + + } + @override + int get hashCode => staffs.hashCode; + + + Map toJson() { + Map json = {}; + json['staffs'] = staffs.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffForNoShowReportData({ + required this.staffs, + }); +} + +@immutable +class ListStaffForNoShowReportVariables { + final List staffIds; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffForNoShowReportVariables.fromJson(Map json): + + staffIds = (json['staffIds'] as List) + .map((e) => nativeFromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffForNoShowReportVariables otherTyped = other as ListStaffForNoShowReportVariables; + return staffIds == otherTyped.staffIds; + + } + @override + int get hashCode => staffIds.hashCode; + + + Map toJson() { + Map json = {}; + json['staffIds'] = staffIds.map((e) => nativeToJson(e)).toList(); + return json; + } + + ListStaffForNoShowReportVariables({ + required this.staffIds, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_for_performance.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_for_performance.dart new file mode 100644 index 00000000..65ed71a9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_for_performance.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class ListStaffForPerformanceVariablesBuilder { + List staffIds; + + final FirebaseDataConnect _dataConnect; + ListStaffForPerformanceVariablesBuilder(this._dataConnect, {required this.staffIds,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffForPerformanceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffForPerformanceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffForPerformanceVariables vars= ListStaffForPerformanceVariables(staffIds: staffIds,); + return _dataConnect.query("listStaffForPerformance", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffForPerformanceStaffs { + final String id; + final double? averageRating; + final int? onTimeRate; + final int? noShowCount; + final int? reliabilityScore; + ListStaffForPerformanceStaffs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + averageRating = json['averageRating'] == null ? null : nativeFromJson(json['averageRating']), + onTimeRate = json['onTimeRate'] == null ? null : nativeFromJson(json['onTimeRate']), + noShowCount = json['noShowCount'] == null ? null : nativeFromJson(json['noShowCount']), + reliabilityScore = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffForPerformanceStaffs otherTyped = other as ListStaffForPerformanceStaffs; + return id == otherTyped.id && + averageRating == otherTyped.averageRating && + onTimeRate == otherTyped.onTimeRate && + noShowCount == otherTyped.noShowCount && + reliabilityScore == otherTyped.reliabilityScore; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, reliabilityScore.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (averageRating != null) { + json['averageRating'] = nativeToJson(averageRating); + } + if (onTimeRate != null) { + json['onTimeRate'] = nativeToJson(onTimeRate); + } + if (noShowCount != null) { + json['noShowCount'] = nativeToJson(noShowCount); + } + if (reliabilityScore != null) { + json['reliabilityScore'] = nativeToJson(reliabilityScore); + } + return json; + } + + ListStaffForPerformanceStaffs({ + required this.id, + this.averageRating, + this.onTimeRate, + this.noShowCount, + this.reliabilityScore, + }); +} + +@immutable +class ListStaffForPerformanceData { + final List staffs; + ListStaffForPerformanceData.fromJson(dynamic json): + + staffs = (json['staffs'] as List) + .map((e) => ListStaffForPerformanceStaffs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffForPerformanceData otherTyped = other as ListStaffForPerformanceData; + return staffs == otherTyped.staffs; + + } + @override + int get hashCode => staffs.hashCode; + + + Map toJson() { + Map json = {}; + json['staffs'] = staffs.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffForPerformanceData({ + required this.staffs, + }); +} + +@immutable +class ListStaffForPerformanceVariables { + final List staffIds; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffForPerformanceVariables.fromJson(Map json): + + staffIds = (json['staffIds'] as List) + .map((e) => nativeFromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffForPerformanceVariables otherTyped = other as ListStaffForPerformanceVariables; + return staffIds == otherTyped.staffIds; + + } + @override + int get hashCode => staffIds.hashCode; + + + Map toJson() { + Map json = {}; + json['staffIds'] = staffIds.map((e) => nativeToJson(e)).toList(); + return json; + } + + ListStaffForPerformanceVariables({ + required this.staffIds, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles.dart new file mode 100644 index 00000000..d8c9f919 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles.dart @@ -0,0 +1,288 @@ +part of 'generated.dart'; + +class ListStaffRolesVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListStaffRolesVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffRolesVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffRolesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListStaffRolesData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffRolesVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffRolesVariables vars= ListStaffRolesVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffRoles", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffRolesStaffRoles { + final String id; + final String staffId; + final String roleId; + final Timestamp? createdAt; + final EnumValue? roleType; + final ListStaffRolesStaffRolesStaff staff; + final ListStaffRolesStaffRolesRole role; + ListStaffRolesStaffRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + roleType = json['roleType'] == null ? null : roleTypeDeserializer(json['roleType']), + staff = ListStaffRolesStaffRolesStaff.fromJson(json['staff']), + role = ListStaffRolesStaffRolesRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesStaffRoles otherTyped = other as ListStaffRolesStaffRoles; + return id == otherTyped.id && + staffId == otherTyped.staffId && + roleId == otherTyped.roleId && + createdAt == otherTyped.createdAt && + roleType == otherTyped.roleType && + staff == otherTyped.staff && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, roleId.hashCode, createdAt.hashCode, roleType.hashCode, staff.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (roleType != null) { + json['roleType'] = + roleTypeSerializer(roleType!) + ; + } + json['staff'] = staff.toJson(); + json['role'] = role.toJson(); + return json; + } + + ListStaffRolesStaffRoles({ + required this.id, + required this.staffId, + required this.roleId, + this.createdAt, + this.roleType, + required this.staff, + required this.role, + }); +} + +@immutable +class ListStaffRolesStaffRolesStaff { + final String id; + final String fullName; + final String userId; + final String? email; + final String? phone; + ListStaffRolesStaffRolesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']), + userId = nativeFromJson(json['userId']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesStaffRolesStaff otherTyped = other as ListStaffRolesStaffRolesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName && + userId == otherTyped.userId && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, userId.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + json['userId'] = nativeToJson(userId); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListStaffRolesStaffRolesStaff({ + required this.id, + required this.fullName, + required this.userId, + this.email, + this.phone, + }); +} + +@immutable +class ListStaffRolesStaffRolesRole { + final String id; + final String name; + final double costPerHour; + ListStaffRolesStaffRolesRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesStaffRolesRole otherTyped = other as ListStaffRolesStaffRolesRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListStaffRolesStaffRolesRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListStaffRolesData { + final List staffRoles; + ListStaffRolesData.fromJson(dynamic json): + + staffRoles = (json['staffRoles'] as List) + .map((e) => ListStaffRolesStaffRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesData otherTyped = other as ListStaffRolesData; + return staffRoles == otherTyped.staffRoles; + + } + @override + int get hashCode => staffRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['staffRoles'] = staffRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffRolesData({ + required this.staffRoles, + }); +} + +@immutable +class ListStaffRolesVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffRolesVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesVariables otherTyped = other as ListStaffRolesVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffRolesVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles_by_role_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles_by_role_id.dart new file mode 100644 index 00000000..2796711c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles_by_role_id.dart @@ -0,0 +1,246 @@ +part of 'generated.dart'; + +class ListStaffRolesByRoleIdVariablesBuilder { + String roleId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffRolesByRoleIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffRolesByRoleIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffRolesByRoleIdVariablesBuilder(this._dataConnect, {required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffRolesByRoleIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffRolesByRoleIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffRolesByRoleIdVariables vars= ListStaffRolesByRoleIdVariables(roleId: roleId,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffRolesByRoleId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffRolesByRoleIdStaffRoles { + final String id; + final String staffId; + final String roleId; + final Timestamp? createdAt; + final EnumValue? roleType; + final ListStaffRolesByRoleIdStaffRolesStaff staff; + ListStaffRolesByRoleIdStaffRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + roleType = json['roleType'] == null ? null : roleTypeDeserializer(json['roleType']), + staff = ListStaffRolesByRoleIdStaffRolesStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByRoleIdStaffRoles otherTyped = other as ListStaffRolesByRoleIdStaffRoles; + return id == otherTyped.id && + staffId == otherTyped.staffId && + roleId == otherTyped.roleId && + createdAt == otherTyped.createdAt && + roleType == otherTyped.roleType && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, roleId.hashCode, createdAt.hashCode, roleType.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (roleType != null) { + json['roleType'] = + roleTypeSerializer(roleType!) + ; + } + json['staff'] = staff.toJson(); + return json; + } + + ListStaffRolesByRoleIdStaffRoles({ + required this.id, + required this.staffId, + required this.roleId, + this.createdAt, + this.roleType, + required this.staff, + }); +} + +@immutable +class ListStaffRolesByRoleIdStaffRolesStaff { + final String id; + final String fullName; + final String userId; + final String? email; + final String? phone; + ListStaffRolesByRoleIdStaffRolesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']), + userId = nativeFromJson(json['userId']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByRoleIdStaffRolesStaff otherTyped = other as ListStaffRolesByRoleIdStaffRolesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName && + userId == otherTyped.userId && + email == otherTyped.email && + phone == otherTyped.phone; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, userId.hashCode, email.hashCode, phone.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + json['userId'] = nativeToJson(userId); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + return json; + } + + ListStaffRolesByRoleIdStaffRolesStaff({ + required this.id, + required this.fullName, + required this.userId, + this.email, + this.phone, + }); +} + +@immutable +class ListStaffRolesByRoleIdData { + final List staffRoles; + ListStaffRolesByRoleIdData.fromJson(dynamic json): + + staffRoles = (json['staffRoles'] as List) + .map((e) => ListStaffRolesByRoleIdStaffRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByRoleIdData otherTyped = other as ListStaffRolesByRoleIdData; + return staffRoles == otherTyped.staffRoles; + + } + @override + int get hashCode => staffRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['staffRoles'] = staffRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffRolesByRoleIdData({ + required this.staffRoles, + }); +} + +@immutable +class ListStaffRolesByRoleIdVariables { + final String roleId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffRolesByRoleIdVariables.fromJson(Map json): + + roleId = nativeFromJson(json['roleId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByRoleIdVariables otherTyped = other as ListStaffRolesByRoleIdVariables; + return roleId == otherTyped.roleId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([roleId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['roleId'] = nativeToJson(roleId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffRolesByRoleIdVariables({ + required this.roleId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles_by_staff_id.dart new file mode 100644 index 00000000..39248b02 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_staff_roles_by_staff_id.dart @@ -0,0 +1,232 @@ +part of 'generated.dart'; + +class ListStaffRolesByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListStaffRolesByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListStaffRolesByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListStaffRolesByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListStaffRolesByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListStaffRolesByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListStaffRolesByStaffIdVariables vars= ListStaffRolesByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("listStaffRolesByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListStaffRolesByStaffIdStaffRoles { + final String id; + final String staffId; + final String roleId; + final Timestamp? createdAt; + final EnumValue? roleType; + final ListStaffRolesByStaffIdStaffRolesRole role; + ListStaffRolesByStaffIdStaffRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + roleId = nativeFromJson(json['roleId']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + roleType = json['roleType'] == null ? null : roleTypeDeserializer(json['roleType']), + role = ListStaffRolesByStaffIdStaffRolesRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByStaffIdStaffRoles otherTyped = other as ListStaffRolesByStaffIdStaffRoles; + return id == otherTyped.id && + staffId == otherTyped.staffId && + roleId == otherTyped.roleId && + createdAt == otherTyped.createdAt && + roleType == otherTyped.roleType && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, roleId.hashCode, createdAt.hashCode, roleType.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['roleId'] = nativeToJson(roleId); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (roleType != null) { + json['roleType'] = + roleTypeSerializer(roleType!) + ; + } + json['role'] = role.toJson(); + return json; + } + + ListStaffRolesByStaffIdStaffRoles({ + required this.id, + required this.staffId, + required this.roleId, + this.createdAt, + this.roleType, + required this.role, + }); +} + +@immutable +class ListStaffRolesByStaffIdStaffRolesRole { + final String id; + final String name; + final double costPerHour; + ListStaffRolesByStaffIdStaffRolesRole.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByStaffIdStaffRolesRole otherTyped = other as ListStaffRolesByStaffIdStaffRolesRole; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListStaffRolesByStaffIdStaffRolesRole({ + required this.id, + required this.name, + required this.costPerHour, + }); +} + +@immutable +class ListStaffRolesByStaffIdData { + final List staffRoles; + ListStaffRolesByStaffIdData.fromJson(dynamic json): + + staffRoles = (json['staffRoles'] as List) + .map((e) => ListStaffRolesByStaffIdStaffRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByStaffIdData otherTyped = other as ListStaffRolesByStaffIdData; + return staffRoles == otherTyped.staffRoles; + + } + @override + int get hashCode => staffRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['staffRoles'] = staffRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListStaffRolesByStaffIdData({ + required this.staffRoles, + }); +} + +@immutable +class ListStaffRolesByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListStaffRolesByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListStaffRolesByStaffIdVariables otherTyped = other as ListStaffRolesByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListStaffRolesByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_task_comments.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_task_comments.dart new file mode 100644 index 00000000..acf74e6b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_task_comments.dart @@ -0,0 +1,197 @@ +part of 'generated.dart'; + +class ListTaskCommentsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListTaskCommentsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListTaskCommentsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listTaskComments", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListTaskCommentsTaskComments { + final String id; + final String taskId; + final String teamMemberId; + final String comment; + final bool isSystem; + final Timestamp? createdAt; + final ListTaskCommentsTaskCommentsTeamMember teamMember; + ListTaskCommentsTaskComments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskId = nativeFromJson(json['taskId']), + teamMemberId = nativeFromJson(json['teamMemberId']), + comment = nativeFromJson(json['comment']), + isSystem = nativeFromJson(json['isSystem']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + teamMember = ListTaskCommentsTaskCommentsTeamMember.fromJson(json['teamMember']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTaskCommentsTaskComments otherTyped = other as ListTaskCommentsTaskComments; + return id == otherTyped.id && + taskId == otherTyped.taskId && + teamMemberId == otherTyped.teamMemberId && + comment == otherTyped.comment && + isSystem == otherTyped.isSystem && + createdAt == otherTyped.createdAt && + teamMember == otherTyped.teamMember; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskId.hashCode, teamMemberId.hashCode, comment.hashCode, isSystem.hashCode, createdAt.hashCode, teamMember.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskId'] = nativeToJson(taskId); + json['teamMemberId'] = nativeToJson(teamMemberId); + json['comment'] = nativeToJson(comment); + json['isSystem'] = nativeToJson(isSystem); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['teamMember'] = teamMember.toJson(); + return json; + } + + ListTaskCommentsTaskComments({ + required this.id, + required this.taskId, + required this.teamMemberId, + required this.comment, + required this.isSystem, + this.createdAt, + required this.teamMember, + }); +} + +@immutable +class ListTaskCommentsTaskCommentsTeamMember { + final ListTaskCommentsTaskCommentsTeamMemberUser user; + ListTaskCommentsTaskCommentsTeamMember.fromJson(dynamic json): + + user = ListTaskCommentsTaskCommentsTeamMemberUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTaskCommentsTaskCommentsTeamMember otherTyped = other as ListTaskCommentsTaskCommentsTeamMember; + return user == otherTyped.user; + + } + @override + int get hashCode => user.hashCode; + + + Map toJson() { + Map json = {}; + json['user'] = user.toJson(); + return json; + } + + ListTaskCommentsTaskCommentsTeamMember({ + required this.user, + }); +} + +@immutable +class ListTaskCommentsTaskCommentsTeamMemberUser { + final String? fullName; + final String? email; + ListTaskCommentsTaskCommentsTeamMemberUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTaskCommentsTaskCommentsTeamMemberUser otherTyped = other as ListTaskCommentsTaskCommentsTeamMemberUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListTaskCommentsTaskCommentsTeamMemberUser({ + this.fullName, + this.email, + }); +} + +@immutable +class ListTaskCommentsData { + final List taskComments; + ListTaskCommentsData.fromJson(dynamic json): + + taskComments = (json['taskComments'] as List) + .map((e) => ListTaskCommentsTaskComments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTaskCommentsData otherTyped = other as ListTaskCommentsData; + return taskComments == otherTyped.taskComments; + + } + @override + int get hashCode => taskComments.hashCode; + + + Map toJson() { + Map json = {}; + json['taskComments'] = taskComments.map((e) => e.toJson()).toList(); + return json; + } + + ListTaskCommentsData({ + required this.taskComments, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_tasks.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_tasks.dart new file mode 100644 index 00000000..26fd9f29 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_tasks.dart @@ -0,0 +1,177 @@ +part of 'generated.dart'; + +class ListTasksVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListTasksVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListTasksData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listTasks", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListTasksTasks { + final String id; + final String taskName; + final String? description; + final EnumValue priority; + final EnumValue status; + final Timestamp? dueDate; + final int? progress; + final int? orderIndex; + final int? commentCount; + final int? attachmentCount; + final AnyValue? files; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListTasksTasks.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + taskName = nativeFromJson(json['taskName']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + priority = taskPriorityDeserializer(json['priority']), + status = taskStatusDeserializer(json['status']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + progress = json['progress'] == null ? null : nativeFromJson(json['progress']), + orderIndex = json['orderIndex'] == null ? null : nativeFromJson(json['orderIndex']), + commentCount = json['commentCount'] == null ? null : nativeFromJson(json['commentCount']), + attachmentCount = json['attachmentCount'] == null ? null : nativeFromJson(json['attachmentCount']), + files = json['files'] == null ? null : AnyValue.fromJson(json['files']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTasksTasks otherTyped = other as ListTasksTasks; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + priority == otherTyped.priority && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + orderIndex == otherTyped.orderIndex && + commentCount == otherTyped.commentCount && + attachmentCount == otherTyped.attachmentCount && + files == otherTyped.files && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, priority.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, orderIndex.hashCode, commentCount.hashCode, attachmentCount.hashCode, files.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['taskName'] = nativeToJson(taskName); + if (description != null) { + json['description'] = nativeToJson(description); + } + json['priority'] = + taskPrioritySerializer(priority) + ; + json['status'] = + taskStatusSerializer(status) + ; + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (progress != null) { + json['progress'] = nativeToJson(progress); + } + if (orderIndex != null) { + json['orderIndex'] = nativeToJson(orderIndex); + } + if (commentCount != null) { + json['commentCount'] = nativeToJson(commentCount); + } + if (attachmentCount != null) { + json['attachmentCount'] = nativeToJson(attachmentCount); + } + if (files != null) { + json['files'] = files!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListTasksTasks({ + required this.id, + required this.taskName, + this.description, + required this.priority, + required this.status, + this.dueDate, + this.progress, + this.orderIndex, + this.commentCount, + this.attachmentCount, + this.files, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListTasksData { + final List tasks; + ListTasksData.fromJson(dynamic json): + + tasks = (json['tasks'] as List) + .map((e) => ListTasksTasks.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTasksData otherTyped = other as ListTasksData; + return tasks == otherTyped.tasks; + + } + @override + int get hashCode => tasks.hashCode; + + + Map toJson() { + Map json = {}; + json['tasks'] = tasks.map((e) => e.toJson()).toList(); + return json; + } + + ListTasksData({ + required this.tasks, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_tax_forms.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_tax_forms.dart new file mode 100644 index 00000000..3884f7cd --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_tax_forms.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class ListTaxFormsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListTaxFormsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListTaxFormsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listTaxForms", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListTaxFormsTaxForms { + final String id; + final EnumValue formType; + final String title; + final String? subtitle; + final String? description; + final EnumValue status; + final String staffId; + final AnyValue? formData; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListTaxFormsTaxForms.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + formType = taxFormTypeDeserializer(json['formType']), + title = nativeFromJson(json['title']), + subtitle = json['subtitle'] == null ? null : nativeFromJson(json['subtitle']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + status = taxFormStatusDeserializer(json['status']), + staffId = nativeFromJson(json['staffId']), + formData = json['formData'] == null ? null : AnyValue.fromJson(json['formData']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTaxFormsTaxForms otherTyped = other as ListTaxFormsTaxForms; + return id == otherTyped.id && + formType == otherTyped.formType && + title == otherTyped.title && + subtitle == otherTyped.subtitle && + description == otherTyped.description && + status == otherTyped.status && + staffId == otherTyped.staffId && + formData == otherTyped.formData && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, formType.hashCode, title.hashCode, subtitle.hashCode, description.hashCode, status.hashCode, staffId.hashCode, formData.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['formType'] = + taxFormTypeSerializer(formType) + ; + json['title'] = nativeToJson(title); + if (subtitle != null) { + json['subtitle'] = nativeToJson(subtitle); + } + if (description != null) { + json['description'] = nativeToJson(description); + } + json['status'] = + taxFormStatusSerializer(status) + ; + json['staffId'] = nativeToJson(staffId); + if (formData != null) { + json['formData'] = formData!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListTaxFormsTaxForms({ + required this.id, + required this.formType, + required this.title, + this.subtitle, + this.description, + required this.status, + required this.staffId, + this.formData, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListTaxFormsData { + final List taxForms; + ListTaxFormsData.fromJson(dynamic json): + + taxForms = (json['taxForms'] as List) + .map((e) => ListTaxFormsTaxForms.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTaxFormsData otherTyped = other as ListTaxFormsData; + return taxForms == otherTyped.taxForms; + + } + @override + int get hashCode => taxForms.hashCode; + + + Map toJson() { + Map json = {}; + json['taxForms'] = taxForms.map((e) => e.toJson()).toList(); + return json; + } + + ListTaxFormsData({ + required this.taxForms, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hubs.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hubs.dart new file mode 100644 index 00000000..c8d085b0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hubs.dart @@ -0,0 +1,156 @@ +part of 'generated.dart'; + +class ListTeamHubsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListTeamHubsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListTeamHubsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listTeamHubs", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListTeamHubsTeamHubs { + final String id; + final String teamId; + final String hubName; + final String address; + final String city; + final String state; + final String zipCode; + final String managerName; + final bool isActive; + final AnyValue? departments; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListTeamHubsTeamHubs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamId = nativeFromJson(json['teamId']), + hubName = nativeFromJson(json['hubName']), + address = nativeFromJson(json['address']), + city = nativeFromJson(json['city']), + state = nativeFromJson(json['state']), + zipCode = nativeFromJson(json['zipCode']), + managerName = nativeFromJson(json['managerName']), + isActive = nativeFromJson(json['isActive']), + departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHubsTeamHubs otherTyped = other as ListTeamHubsTeamHubs; + return id == otherTyped.id && + teamId == otherTyped.teamId && + hubName == otherTyped.hubName && + address == otherTyped.address && + city == otherTyped.city && + state == otherTyped.state && + zipCode == otherTyped.zipCode && + managerName == otherTyped.managerName && + isActive == otherTyped.isActive && + departments == otherTyped.departments && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamId'] = nativeToJson(teamId); + json['hubName'] = nativeToJson(hubName); + json['address'] = nativeToJson(address); + json['city'] = nativeToJson(city); + json['state'] = nativeToJson(state); + json['zipCode'] = nativeToJson(zipCode); + json['managerName'] = nativeToJson(managerName); + json['isActive'] = nativeToJson(isActive); + if (departments != null) { + json['departments'] = departments!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListTeamHubsTeamHubs({ + required this.id, + required this.teamId, + required this.hubName, + required this.address, + required this.city, + required this.state, + required this.zipCode, + required this.managerName, + required this.isActive, + this.departments, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListTeamHubsData { + final List teamHubs; + ListTeamHubsData.fromJson(dynamic json): + + teamHubs = (json['teamHubs'] as List) + .map((e) => ListTeamHubsTeamHubs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHubsData otherTyped = other as ListTeamHubsData; + return teamHubs == otherTyped.teamHubs; + + } + @override + int get hashCode => teamHubs.hashCode; + + + Map toJson() { + Map json = {}; + json['teamHubs'] = teamHubs.map((e) => e.toJson()).toList(); + return json; + } + + ListTeamHubsData({ + required this.teamHubs, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hubs_by_owner_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hubs_by_owner_id.dart new file mode 100644 index 00000000..45a5e563 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hubs_by_owner_id.dart @@ -0,0 +1,178 @@ +part of 'generated.dart'; + +class ListTeamHubsByOwnerIdVariablesBuilder { + String ownerId; + + final FirebaseDataConnect _dataConnect; + ListTeamHubsByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,}); + Deserializer dataDeserializer = (dynamic json) => ListTeamHubsByOwnerIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListTeamHubsByOwnerIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListTeamHubsByOwnerIdVariables vars= ListTeamHubsByOwnerIdVariables(ownerId: ownerId,); + return _dataConnect.query("listTeamHubsByOwnerId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListTeamHubsByOwnerIdTeamHubs { + final String id; + final String teamId; + final String hubName; + final String address; + final String city; + final String state; + final String zipCode; + final String managerName; + final bool isActive; + final AnyValue? departments; + final Timestamp? createdAt; + ListTeamHubsByOwnerIdTeamHubs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamId = nativeFromJson(json['teamId']), + hubName = nativeFromJson(json['hubName']), + address = nativeFromJson(json['address']), + city = nativeFromJson(json['city']), + state = nativeFromJson(json['state']), + zipCode = nativeFromJson(json['zipCode']), + managerName = nativeFromJson(json['managerName']), + isActive = nativeFromJson(json['isActive']), + departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHubsByOwnerIdTeamHubs otherTyped = other as ListTeamHubsByOwnerIdTeamHubs; + return id == otherTyped.id && + teamId == otherTyped.teamId && + hubName == otherTyped.hubName && + address == otherTyped.address && + city == otherTyped.city && + state == otherTyped.state && + zipCode == otherTyped.zipCode && + managerName == otherTyped.managerName && + isActive == otherTyped.isActive && + departments == otherTyped.departments && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamId'] = nativeToJson(teamId); + json['hubName'] = nativeToJson(hubName); + json['address'] = nativeToJson(address); + json['city'] = nativeToJson(city); + json['state'] = nativeToJson(state); + json['zipCode'] = nativeToJson(zipCode); + json['managerName'] = nativeToJson(managerName); + json['isActive'] = nativeToJson(isActive); + if (departments != null) { + json['departments'] = departments!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListTeamHubsByOwnerIdTeamHubs({ + required this.id, + required this.teamId, + required this.hubName, + required this.address, + required this.city, + required this.state, + required this.zipCode, + required this.managerName, + required this.isActive, + this.departments, + this.createdAt, + }); +} + +@immutable +class ListTeamHubsByOwnerIdData { + final List teamHubs; + ListTeamHubsByOwnerIdData.fromJson(dynamic json): + + teamHubs = (json['teamHubs'] as List) + .map((e) => ListTeamHubsByOwnerIdTeamHubs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHubsByOwnerIdData otherTyped = other as ListTeamHubsByOwnerIdData; + return teamHubs == otherTyped.teamHubs; + + } + @override + int get hashCode => teamHubs.hashCode; + + + Map toJson() { + Map json = {}; + json['teamHubs'] = teamHubs.map((e) => e.toJson()).toList(); + return json; + } + + ListTeamHubsByOwnerIdData({ + required this.teamHubs, + }); +} + +@immutable +class ListTeamHubsByOwnerIdVariables { + final String ownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListTeamHubsByOwnerIdVariables.fromJson(Map json): + + ownerId = nativeFromJson(json['ownerId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHubsByOwnerIdVariables otherTyped = other as ListTeamHubsByOwnerIdVariables; + return ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => ownerId.hashCode; + + + Map toJson() { + Map json = {}; + json['ownerId'] = nativeToJson(ownerId); + return json; + } + + ListTeamHubsByOwnerIdVariables({ + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hud_departments.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hud_departments.dart new file mode 100644 index 00000000..66f6cd2b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hud_departments.dart @@ -0,0 +1,218 @@ +part of 'generated.dart'; + +class ListTeamHudDepartmentsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListTeamHudDepartmentsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListTeamHudDepartmentsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListTeamHudDepartmentsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListTeamHudDepartmentsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListTeamHudDepartmentsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListTeamHudDepartmentsVariables vars= ListTeamHudDepartmentsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listTeamHudDepartments", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListTeamHudDepartmentsTeamHudDepartments { + final String id; + final String name; + final String? costCenter; + final String teamHubId; + final ListTeamHudDepartmentsTeamHudDepartmentsTeamHub teamHub; + final Timestamp? createdAt; + ListTeamHudDepartmentsTeamHudDepartments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costCenter = json['costCenter'] == null ? null : nativeFromJson(json['costCenter']), + teamHubId = nativeFromJson(json['teamHubId']), + teamHub = ListTeamHudDepartmentsTeamHudDepartmentsTeamHub.fromJson(json['teamHub']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsTeamHudDepartments otherTyped = other as ListTeamHudDepartmentsTeamHudDepartments; + return id == otherTyped.id && + name == otherTyped.name && + costCenter == otherTyped.costCenter && + teamHubId == otherTyped.teamHubId && + teamHub == otherTyped.teamHub && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costCenter.hashCode, teamHubId.hashCode, teamHub.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (costCenter != null) { + json['costCenter'] = nativeToJson(costCenter); + } + json['teamHubId'] = nativeToJson(teamHubId); + json['teamHub'] = teamHub.toJson(); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListTeamHudDepartmentsTeamHudDepartments({ + required this.id, + required this.name, + this.costCenter, + required this.teamHubId, + required this.teamHub, + this.createdAt, + }); +} + +@immutable +class ListTeamHudDepartmentsTeamHudDepartmentsTeamHub { + final String id; + final String hubName; + ListTeamHudDepartmentsTeamHudDepartmentsTeamHub.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + hubName = nativeFromJson(json['hubName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsTeamHudDepartmentsTeamHub otherTyped = other as ListTeamHudDepartmentsTeamHudDepartmentsTeamHub; + return id == otherTyped.id && + hubName == otherTyped.hubName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, hubName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['hubName'] = nativeToJson(hubName); + return json; + } + + ListTeamHudDepartmentsTeamHudDepartmentsTeamHub({ + required this.id, + required this.hubName, + }); +} + +@immutable +class ListTeamHudDepartmentsData { + final List teamHudDepartments; + ListTeamHudDepartmentsData.fromJson(dynamic json): + + teamHudDepartments = (json['teamHudDepartments'] as List) + .map((e) => ListTeamHudDepartmentsTeamHudDepartments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsData otherTyped = other as ListTeamHudDepartmentsData; + return teamHudDepartments == otherTyped.teamHudDepartments; + + } + @override + int get hashCode => teamHudDepartments.hashCode; + + + Map toJson() { + Map json = {}; + json['teamHudDepartments'] = teamHudDepartments.map((e) => e.toJson()).toList(); + return json; + } + + ListTeamHudDepartmentsData({ + required this.teamHudDepartments, + }); +} + +@immutable +class ListTeamHudDepartmentsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListTeamHudDepartmentsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsVariables otherTyped = other as ListTeamHudDepartmentsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListTeamHudDepartmentsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hud_departments_by_team_hub_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hud_departments_by_team_hub_id.dart new file mode 100644 index 00000000..e9c26d44 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_hud_departments_by_team_hub_id.dart @@ -0,0 +1,225 @@ +part of 'generated.dart'; + +class ListTeamHudDepartmentsByTeamHubIdVariablesBuilder { + String teamHubId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListTeamHudDepartmentsByTeamHubIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListTeamHudDepartmentsByTeamHubIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListTeamHudDepartmentsByTeamHubIdVariablesBuilder(this._dataConnect, {required this.teamHubId,}); + Deserializer dataDeserializer = (dynamic json) => ListTeamHudDepartmentsByTeamHubIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListTeamHudDepartmentsByTeamHubIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListTeamHudDepartmentsByTeamHubIdVariables vars= ListTeamHudDepartmentsByTeamHubIdVariables(teamHubId: teamHubId,offset: _offset,limit: _limit,); + return _dataConnect.query("listTeamHudDepartmentsByTeamHubId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListTeamHudDepartmentsByTeamHubIdTeamHudDepartments { + final String id; + final String name; + final String? costCenter; + final String teamHubId; + final ListTeamHudDepartmentsByTeamHubIdTeamHudDepartmentsTeamHub teamHub; + final Timestamp? createdAt; + ListTeamHudDepartmentsByTeamHubIdTeamHudDepartments.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + costCenter = json['costCenter'] == null ? null : nativeFromJson(json['costCenter']), + teamHubId = nativeFromJson(json['teamHubId']), + teamHub = ListTeamHudDepartmentsByTeamHubIdTeamHudDepartmentsTeamHub.fromJson(json['teamHub']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsByTeamHubIdTeamHudDepartments otherTyped = other as ListTeamHudDepartmentsByTeamHubIdTeamHudDepartments; + return id == otherTyped.id && + name == otherTyped.name && + costCenter == otherTyped.costCenter && + teamHubId == otherTyped.teamHubId && + teamHub == otherTyped.teamHub && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costCenter.hashCode, teamHubId.hashCode, teamHub.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + if (costCenter != null) { + json['costCenter'] = nativeToJson(costCenter); + } + json['teamHubId'] = nativeToJson(teamHubId); + json['teamHub'] = teamHub.toJson(); + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListTeamHudDepartmentsByTeamHubIdTeamHudDepartments({ + required this.id, + required this.name, + this.costCenter, + required this.teamHubId, + required this.teamHub, + this.createdAt, + }); +} + +@immutable +class ListTeamHudDepartmentsByTeamHubIdTeamHudDepartmentsTeamHub { + final String id; + final String hubName; + ListTeamHudDepartmentsByTeamHubIdTeamHudDepartmentsTeamHub.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + hubName = nativeFromJson(json['hubName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsByTeamHubIdTeamHudDepartmentsTeamHub otherTyped = other as ListTeamHudDepartmentsByTeamHubIdTeamHudDepartmentsTeamHub; + return id == otherTyped.id && + hubName == otherTyped.hubName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, hubName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['hubName'] = nativeToJson(hubName); + return json; + } + + ListTeamHudDepartmentsByTeamHubIdTeamHudDepartmentsTeamHub({ + required this.id, + required this.hubName, + }); +} + +@immutable +class ListTeamHudDepartmentsByTeamHubIdData { + final List teamHudDepartments; + ListTeamHudDepartmentsByTeamHubIdData.fromJson(dynamic json): + + teamHudDepartments = (json['teamHudDepartments'] as List) + .map((e) => ListTeamHudDepartmentsByTeamHubIdTeamHudDepartments.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsByTeamHubIdData otherTyped = other as ListTeamHudDepartmentsByTeamHubIdData; + return teamHudDepartments == otherTyped.teamHudDepartments; + + } + @override + int get hashCode => teamHudDepartments.hashCode; + + + Map toJson() { + Map json = {}; + json['teamHudDepartments'] = teamHudDepartments.map((e) => e.toJson()).toList(); + return json; + } + + ListTeamHudDepartmentsByTeamHubIdData({ + required this.teamHudDepartments, + }); +} + +@immutable +class ListTeamHudDepartmentsByTeamHubIdVariables { + final String teamHubId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListTeamHudDepartmentsByTeamHubIdVariables.fromJson(Map json): + + teamHubId = nativeFromJson(json['teamHubId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamHudDepartmentsByTeamHubIdVariables otherTyped = other as ListTeamHudDepartmentsByTeamHubIdVariables; + return teamHubId == otherTyped.teamHubId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([teamHubId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['teamHubId'] = nativeToJson(teamHubId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListTeamHudDepartmentsByTeamHubIdVariables({ + required this.teamHubId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_members.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_members.dart new file mode 100644 index 00000000..f07ca60d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_team_members.dart @@ -0,0 +1,224 @@ +part of 'generated.dart'; + +class ListTeamMembersVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListTeamMembersVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListTeamMembersData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listTeamMembers", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListTeamMembersTeamMembers { + final String id; + final String teamId; + final EnumValue role; + final String? title; + final String? department; + final String? teamHubId; + final bool? isActive; + final Timestamp? createdAt; + final ListTeamMembersTeamMembersUser user; + final ListTeamMembersTeamMembersTeamHub? teamHub; + ListTeamMembersTeamMembers.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamId = nativeFromJson(json['teamId']), + role = teamMemberRoleDeserializer(json['role']), + title = json['title'] == null ? null : nativeFromJson(json['title']), + department = json['department'] == null ? null : nativeFromJson(json['department']), + teamHubId = json['teamHubId'] == null ? null : nativeFromJson(json['teamHubId']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + user = ListTeamMembersTeamMembersUser.fromJson(json['user']), + teamHub = json['teamHub'] == null ? null : ListTeamMembersTeamMembersTeamHub.fromJson(json['teamHub']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamMembersTeamMembers otherTyped = other as ListTeamMembersTeamMembers; + return id == otherTyped.id && + teamId == otherTyped.teamId && + role == otherTyped.role && + title == otherTyped.title && + department == otherTyped.department && + teamHubId == otherTyped.teamHubId && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + user == otherTyped.user && + teamHub == otherTyped.teamHub; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, createdAt.hashCode, user.hashCode, teamHub.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamId'] = nativeToJson(teamId); + json['role'] = + teamMemberRoleSerializer(role) + ; + if (title != null) { + json['title'] = nativeToJson(title); + } + if (department != null) { + json['department'] = nativeToJson(department); + } + if (teamHubId != null) { + json['teamHubId'] = nativeToJson(teamHubId); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['user'] = user.toJson(); + if (teamHub != null) { + json['teamHub'] = teamHub!.toJson(); + } + return json; + } + + ListTeamMembersTeamMembers({ + required this.id, + required this.teamId, + required this.role, + this.title, + this.department, + this.teamHubId, + this.isActive, + this.createdAt, + required this.user, + this.teamHub, + }); +} + +@immutable +class ListTeamMembersTeamMembersUser { + final String? fullName; + final String? email; + ListTeamMembersTeamMembersUser.fromJson(dynamic json): + + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + email = json['email'] == null ? null : nativeFromJson(json['email']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamMembersTeamMembersUser otherTyped = other as ListTeamMembersTeamMembersUser; + return fullName == otherTyped.fullName && + email == otherTyped.email; + + } + @override + int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]); + + + Map toJson() { + Map json = {}; + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (email != null) { + json['email'] = nativeToJson(email); + } + return json; + } + + ListTeamMembersTeamMembersUser({ + this.fullName, + this.email, + }); +} + +@immutable +class ListTeamMembersTeamMembersTeamHub { + final String hubName; + ListTeamMembersTeamMembersTeamHub.fromJson(dynamic json): + + hubName = nativeFromJson(json['hubName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamMembersTeamMembersTeamHub otherTyped = other as ListTeamMembersTeamMembersTeamHub; + return hubName == otherTyped.hubName; + + } + @override + int get hashCode => hubName.hashCode; + + + Map toJson() { + Map json = {}; + json['hubName'] = nativeToJson(hubName); + return json; + } + + ListTeamMembersTeamMembersTeamHub({ + required this.hubName, + }); +} + +@immutable +class ListTeamMembersData { + final List teamMembers; + ListTeamMembersData.fromJson(dynamic json): + + teamMembers = (json['teamMembers'] as List) + .map((e) => ListTeamMembersTeamMembers.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamMembersData otherTyped = other as ListTeamMembersData; + return teamMembers == otherTyped.teamMembers; + + } + @override + int get hashCode => teamMembers.hashCode; + + + Map toJson() { + Map json = {}; + json['teamMembers'] = teamMembers.map((e) => e.toJson()).toList(); + return json; + } + + ListTeamMembersData({ + required this.teamMembers, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_teams.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_teams.dart new file mode 100644 index 00000000..e13a121d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_teams.dart @@ -0,0 +1,199 @@ +part of 'generated.dart'; + +class ListTeamsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListTeamsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListTeamsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listTeams", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListTeamsTeams { + final String id; + final String teamName; + final String ownerId; + final String ownerName; + final String ownerRole; + final String? email; + final String? companyLogo; + final int? totalMembers; + final int? activeMembers; + final int? totalHubs; + final AnyValue? departments; + final int? favoriteStaffCount; + final int? blockedStaffCount; + final AnyValue? favoriteStaff; + final AnyValue? blockedStaff; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListTeamsTeams.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + teamName = nativeFromJson(json['teamName']), + ownerId = nativeFromJson(json['ownerId']), + ownerName = nativeFromJson(json['ownerName']), + ownerRole = nativeFromJson(json['ownerRole']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + companyLogo = json['companyLogo'] == null ? null : nativeFromJson(json['companyLogo']), + totalMembers = json['totalMembers'] == null ? null : nativeFromJson(json['totalMembers']), + activeMembers = json['activeMembers'] == null ? null : nativeFromJson(json['activeMembers']), + totalHubs = json['totalHubs'] == null ? null : nativeFromJson(json['totalHubs']), + departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']), + favoriteStaffCount = json['favoriteStaffCount'] == null ? null : nativeFromJson(json['favoriteStaffCount']), + blockedStaffCount = json['blockedStaffCount'] == null ? null : nativeFromJson(json['blockedStaffCount']), + favoriteStaff = json['favoriteStaff'] == null ? null : AnyValue.fromJson(json['favoriteStaff']), + blockedStaff = json['blockedStaff'] == null ? null : AnyValue.fromJson(json['blockedStaff']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamsTeams otherTyped = other as ListTeamsTeams; + return id == otherTyped.id && + teamName == otherTyped.teamName && + ownerId == otherTyped.ownerId && + ownerName == otherTyped.ownerName && + ownerRole == otherTyped.ownerRole && + email == otherTyped.email && + companyLogo == otherTyped.companyLogo && + totalMembers == otherTyped.totalMembers && + activeMembers == otherTyped.activeMembers && + totalHubs == otherTyped.totalHubs && + departments == otherTyped.departments && + favoriteStaffCount == otherTyped.favoriteStaffCount && + blockedStaffCount == otherTyped.blockedStaffCount && + favoriteStaff == otherTyped.favoriteStaff && + blockedStaff == otherTyped.blockedStaff && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamName.hashCode, ownerId.hashCode, ownerName.hashCode, ownerRole.hashCode, email.hashCode, companyLogo.hashCode, totalMembers.hashCode, activeMembers.hashCode, totalHubs.hashCode, departments.hashCode, favoriteStaffCount.hashCode, blockedStaffCount.hashCode, favoriteStaff.hashCode, blockedStaff.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['teamName'] = nativeToJson(teamName); + json['ownerId'] = nativeToJson(ownerId); + json['ownerName'] = nativeToJson(ownerName); + json['ownerRole'] = nativeToJson(ownerRole); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (companyLogo != null) { + json['companyLogo'] = nativeToJson(companyLogo); + } + if (totalMembers != null) { + json['totalMembers'] = nativeToJson(totalMembers); + } + if (activeMembers != null) { + json['activeMembers'] = nativeToJson(activeMembers); + } + if (totalHubs != null) { + json['totalHubs'] = nativeToJson(totalHubs); + } + if (departments != null) { + json['departments'] = departments!.toJson(); + } + if (favoriteStaffCount != null) { + json['favoriteStaffCount'] = nativeToJson(favoriteStaffCount); + } + if (blockedStaffCount != null) { + json['blockedStaffCount'] = nativeToJson(blockedStaffCount); + } + if (favoriteStaff != null) { + json['favoriteStaff'] = favoriteStaff!.toJson(); + } + if (blockedStaff != null) { + json['blockedStaff'] = blockedStaff!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListTeamsTeams({ + required this.id, + required this.teamName, + required this.ownerId, + required this.ownerName, + required this.ownerRole, + this.email, + this.companyLogo, + this.totalMembers, + this.activeMembers, + this.totalHubs, + this.departments, + this.favoriteStaffCount, + this.blockedStaffCount, + this.favoriteStaff, + this.blockedStaff, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListTeamsData { + final List teams; + ListTeamsData.fromJson(dynamic json): + + teams = (json['teams'] as List) + .map((e) => ListTeamsTeams.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTeamsData otherTyped = other as ListTeamsData; + return teams == otherTyped.teams; + + } + @override + int get hashCode => teams.hashCode; + + + Map toJson() { + Map json = {}; + json['teams'] = teams.map((e) => e.toJson()).toList(); + return json; + } + + ListTeamsData({ + required this.teams, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_timesheets_for_spend.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_timesheets_for_spend.dart new file mode 100644 index 00000000..fd390c76 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_timesheets_for_spend.dart @@ -0,0 +1,318 @@ +part of 'generated.dart'; + +class ListTimesheetsForSpendVariablesBuilder { + Timestamp startTime; + Timestamp endTime; + + final FirebaseDataConnect _dataConnect; + ListTimesheetsForSpendVariablesBuilder(this._dataConnect, {required this.startTime,required this.endTime,}); + Deserializer dataDeserializer = (dynamic json) => ListTimesheetsForSpendData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListTimesheetsForSpendVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListTimesheetsForSpendVariables vars= ListTimesheetsForSpendVariables(startTime: startTime,endTime: endTime,); + return _dataConnect.query("listTimesheetsForSpend", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListTimesheetsForSpendShiftRoles { + final String id; + final double? hours; + final double? totalValue; + final ListTimesheetsForSpendShiftRolesShift shift; + final ListTimesheetsForSpendShiftRolesRole role; + ListTimesheetsForSpendShiftRoles.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + hours = json['hours'] == null ? null : nativeFromJson(json['hours']), + totalValue = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']), + shift = ListTimesheetsForSpendShiftRolesShift.fromJson(json['shift']), + role = ListTimesheetsForSpendShiftRolesRole.fromJson(json['role']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTimesheetsForSpendShiftRoles otherTyped = other as ListTimesheetsForSpendShiftRoles; + return id == otherTyped.id && + hours == otherTyped.hours && + totalValue == otherTyped.totalValue && + shift == otherTyped.shift && + role == otherTyped.role; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, hours.hashCode, totalValue.hashCode, shift.hashCode, role.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (hours != null) { + json['hours'] = nativeToJson(hours); + } + if (totalValue != null) { + json['totalValue'] = nativeToJson(totalValue); + } + json['shift'] = shift.toJson(); + json['role'] = role.toJson(); + return json; + } + + ListTimesheetsForSpendShiftRoles({ + required this.id, + this.hours, + this.totalValue, + required this.shift, + required this.role, + }); +} + +@immutable +class ListTimesheetsForSpendShiftRolesShift { + final String title; + final String? location; + final EnumValue? status; + final Timestamp? date; + final ListTimesheetsForSpendShiftRolesShiftOrder order; + ListTimesheetsForSpendShiftRolesShift.fromJson(dynamic json): + + title = nativeFromJson(json['title']), + location = json['location'] == null ? null : nativeFromJson(json['location']), + status = json['status'] == null ? null : shiftStatusDeserializer(json['status']), + date = json['date'] == null ? null : Timestamp.fromJson(json['date']), + order = ListTimesheetsForSpendShiftRolesShiftOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTimesheetsForSpendShiftRolesShift otherTyped = other as ListTimesheetsForSpendShiftRolesShift; + return title == otherTyped.title && + location == otherTyped.location && + status == otherTyped.status && + date == otherTyped.date && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([title.hashCode, location.hashCode, status.hashCode, date.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['title'] = nativeToJson(title); + if (location != null) { + json['location'] = nativeToJson(location); + } + if (status != null) { + json['status'] = + shiftStatusSerializer(status!) + ; + } + if (date != null) { + json['date'] = date!.toJson(); + } + json['order'] = order.toJson(); + return json; + } + + ListTimesheetsForSpendShiftRolesShift({ + required this.title, + this.location, + this.status, + this.date, + required this.order, + }); +} + +@immutable +class ListTimesheetsForSpendShiftRolesShiftOrder { + final ListTimesheetsForSpendShiftRolesShiftOrderBusiness business; + ListTimesheetsForSpendShiftRolesShiftOrder.fromJson(dynamic json): + + business = ListTimesheetsForSpendShiftRolesShiftOrderBusiness.fromJson(json['business']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTimesheetsForSpendShiftRolesShiftOrder otherTyped = other as ListTimesheetsForSpendShiftRolesShiftOrder; + return business == otherTyped.business; + + } + @override + int get hashCode => business.hashCode; + + + Map toJson() { + Map json = {}; + json['business'] = business.toJson(); + return json; + } + + ListTimesheetsForSpendShiftRolesShiftOrder({ + required this.business, + }); +} + +@immutable +class ListTimesheetsForSpendShiftRolesShiftOrderBusiness { + final String businessName; + ListTimesheetsForSpendShiftRolesShiftOrderBusiness.fromJson(dynamic json): + + businessName = nativeFromJson(json['businessName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTimesheetsForSpendShiftRolesShiftOrderBusiness otherTyped = other as ListTimesheetsForSpendShiftRolesShiftOrderBusiness; + return businessName == otherTyped.businessName; + + } + @override + int get hashCode => businessName.hashCode; + + + Map toJson() { + Map json = {}; + json['businessName'] = nativeToJson(businessName); + return json; + } + + ListTimesheetsForSpendShiftRolesShiftOrderBusiness({ + required this.businessName, + }); +} + +@immutable +class ListTimesheetsForSpendShiftRolesRole { + final double costPerHour; + ListTimesheetsForSpendShiftRolesRole.fromJson(dynamic json): + + costPerHour = nativeFromJson(json['costPerHour']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTimesheetsForSpendShiftRolesRole otherTyped = other as ListTimesheetsForSpendShiftRolesRole; + return costPerHour == otherTyped.costPerHour; + + } + @override + int get hashCode => costPerHour.hashCode; + + + Map toJson() { + Map json = {}; + json['costPerHour'] = nativeToJson(costPerHour); + return json; + } + + ListTimesheetsForSpendShiftRolesRole({ + required this.costPerHour, + }); +} + +@immutable +class ListTimesheetsForSpendData { + final List shiftRoles; + ListTimesheetsForSpendData.fromJson(dynamic json): + + shiftRoles = (json['shiftRoles'] as List) + .map((e) => ListTimesheetsForSpendShiftRoles.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTimesheetsForSpendData otherTyped = other as ListTimesheetsForSpendData; + return shiftRoles == otherTyped.shiftRoles; + + } + @override + int get hashCode => shiftRoles.hashCode; + + + Map toJson() { + Map json = {}; + json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList(); + return json; + } + + ListTimesheetsForSpendData({ + required this.shiftRoles, + }); +} + +@immutable +class ListTimesheetsForSpendVariables { + final Timestamp startTime; + final Timestamp endTime; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListTimesheetsForSpendVariables.fromJson(Map json): + + startTime = Timestamp.fromJson(json['startTime']), + endTime = Timestamp.fromJson(json['endTime']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListTimesheetsForSpendVariables otherTyped = other as ListTimesheetsForSpendVariables; + return startTime == otherTyped.startTime && + endTime == otherTyped.endTime; + + } + @override + int get hashCode => Object.hashAll([startTime.hashCode, endTime.hashCode]); + + + Map toJson() { + Map json = {}; + json['startTime'] = startTime.toJson(); + json['endTime'] = endTime.toJson(); + return json; + } + + ListTimesheetsForSpendVariables({ + required this.startTime, + required this.endTime, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_unread_activity_logs_by_user_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_unread_activity_logs_by_user_id.dart new file mode 100644 index 00000000..2b2dc06e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_unread_activity_logs_by_user_id.dart @@ -0,0 +1,249 @@ +part of 'generated.dart'; + +class ListUnreadActivityLogsByUserIdVariablesBuilder { + String userId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListUnreadActivityLogsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUnreadActivityLogsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListUnreadActivityLogsByUserIdVariablesBuilder(this._dataConnect, {required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => ListUnreadActivityLogsByUserIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListUnreadActivityLogsByUserIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListUnreadActivityLogsByUserIdVariables vars= ListUnreadActivityLogsByUserIdVariables(userId: userId,offset: _offset,limit: _limit,); + return _dataConnect.query("listUnreadActivityLogsByUserId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListUnreadActivityLogsByUserIdActivityLogs { + final String id; + final String userId; + final Timestamp date; + final String? hourStart; + final String? hourEnd; + final String? totalhours; + final EnumValue? iconType; + final String? iconColor; + final String title; + final String description; + final bool? isRead; + final EnumValue activityType; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListUnreadActivityLogsByUserIdActivityLogs.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + date = Timestamp.fromJson(json['date']), + hourStart = json['hourStart'] == null ? null : nativeFromJson(json['hourStart']), + hourEnd = json['hourEnd'] == null ? null : nativeFromJson(json['hourEnd']), + totalhours = json['totalhours'] == null ? null : nativeFromJson(json['totalhours']), + iconType = json['iconType'] == null ? null : activityIconTypeDeserializer(json['iconType']), + iconColor = json['iconColor'] == null ? null : nativeFromJson(json['iconColor']), + title = nativeFromJson(json['title']), + description = nativeFromJson(json['description']), + isRead = json['isRead'] == null ? null : nativeFromJson(json['isRead']), + activityType = activityTypeDeserializer(json['activityType']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUnreadActivityLogsByUserIdActivityLogs otherTyped = other as ListUnreadActivityLogsByUserIdActivityLogs; + return id == otherTyped.id && + userId == otherTyped.userId && + date == otherTyped.date && + hourStart == otherTyped.hourStart && + hourEnd == otherTyped.hourEnd && + totalhours == otherTyped.totalhours && + iconType == otherTyped.iconType && + iconColor == otherTyped.iconColor && + title == otherTyped.title && + description == otherTyped.description && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, date.hashCode, hourStart.hashCode, hourEnd.hashCode, totalhours.hashCode, iconType.hashCode, iconColor.hashCode, title.hashCode, description.hashCode, isRead.hashCode, activityType.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['date'] = date.toJson(); + if (hourStart != null) { + json['hourStart'] = nativeToJson(hourStart); + } + if (hourEnd != null) { + json['hourEnd'] = nativeToJson(hourEnd); + } + if (totalhours != null) { + json['totalhours'] = nativeToJson(totalhours); + } + if (iconType != null) { + json['iconType'] = + activityIconTypeSerializer(iconType!) + ; + } + if (iconColor != null) { + json['iconColor'] = nativeToJson(iconColor); + } + json['title'] = nativeToJson(title); + json['description'] = nativeToJson(description); + if (isRead != null) { + json['isRead'] = nativeToJson(isRead); + } + json['activityType'] = + activityTypeSerializer(activityType) + ; + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListUnreadActivityLogsByUserIdActivityLogs({ + required this.id, + required this.userId, + required this.date, + this.hourStart, + this.hourEnd, + this.totalhours, + this.iconType, + this.iconColor, + required this.title, + required this.description, + this.isRead, + required this.activityType, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListUnreadActivityLogsByUserIdData { + final List activityLogs; + ListUnreadActivityLogsByUserIdData.fromJson(dynamic json): + + activityLogs = (json['activityLogs'] as List) + .map((e) => ListUnreadActivityLogsByUserIdActivityLogs.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUnreadActivityLogsByUserIdData otherTyped = other as ListUnreadActivityLogsByUserIdData; + return activityLogs == otherTyped.activityLogs; + + } + @override + int get hashCode => activityLogs.hashCode; + + + Map toJson() { + Map json = {}; + json['activityLogs'] = activityLogs.map((e) => e.toJson()).toList(); + return json; + } + + ListUnreadActivityLogsByUserIdData({ + required this.activityLogs, + }); +} + +@immutable +class ListUnreadActivityLogsByUserIdVariables { + final String userId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListUnreadActivityLogsByUserIdVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUnreadActivityLogsByUserIdVariables otherTyped = other as ListUnreadActivityLogsByUserIdVariables; + return userId == otherTyped.userId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListUnreadActivityLogsByUserIdVariables({ + required this.userId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_unread_user_conversations_by_user_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_unread_user_conversations_by_user_id.dart new file mode 100644 index 00000000..1b8528a9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_unread_user_conversations_by_user_id.dart @@ -0,0 +1,280 @@ +part of 'generated.dart'; + +class ListUnreadUserConversationsByUserIdVariablesBuilder { + String userId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListUnreadUserConversationsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUnreadUserConversationsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListUnreadUserConversationsByUserIdVariablesBuilder(this._dataConnect, {required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => ListUnreadUserConversationsByUserIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListUnreadUserConversationsByUserIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListUnreadUserConversationsByUserIdVariables vars= ListUnreadUserConversationsByUserIdVariables(userId: userId,offset: _offset,limit: _limit,); + return _dataConnect.query("listUnreadUserConversationsByUserId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListUnreadUserConversationsByUserIdUserConversations { + final String id; + final String conversationId; + final String userId; + final int? unreadCount; + final Timestamp? lastReadAt; + final Timestamp? createdAt; + final ListUnreadUserConversationsByUserIdUserConversationsConversation conversation; + ListUnreadUserConversationsByUserIdUserConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']), + unreadCount = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']), + lastReadAt = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + conversation = ListUnreadUserConversationsByUserIdUserConversationsConversation.fromJson(json['conversation']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUnreadUserConversationsByUserIdUserConversations otherTyped = other as ListUnreadUserConversationsByUserIdUserConversations; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt && + createdAt == otherTyped.createdAt && + conversation == otherTyped.conversation; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode, createdAt.hashCode, conversation.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if (unreadCount != null) { + json['unreadCount'] = nativeToJson(unreadCount); + } + if (lastReadAt != null) { + json['lastReadAt'] = lastReadAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['conversation'] = conversation.toJson(); + return json; + } + + ListUnreadUserConversationsByUserIdUserConversations({ + required this.id, + required this.conversationId, + required this.userId, + this.unreadCount, + this.lastReadAt, + this.createdAt, + required this.conversation, + }); +} + +@immutable +class ListUnreadUserConversationsByUserIdUserConversationsConversation { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + ListUnreadUserConversationsByUserIdUserConversationsConversation.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUnreadUserConversationsByUserIdUserConversationsConversation otherTyped = other as ListUnreadUserConversationsByUserIdUserConversationsConversation; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + return json; + } + + ListUnreadUserConversationsByUserIdUserConversationsConversation({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + }); +} + +@immutable +class ListUnreadUserConversationsByUserIdData { + final List userConversations; + ListUnreadUserConversationsByUserIdData.fromJson(dynamic json): + + userConversations = (json['userConversations'] as List) + .map((e) => ListUnreadUserConversationsByUserIdUserConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUnreadUserConversationsByUserIdData otherTyped = other as ListUnreadUserConversationsByUserIdData; + return userConversations == otherTyped.userConversations; + + } + @override + int get hashCode => userConversations.hashCode; + + + Map toJson() { + Map json = {}; + json['userConversations'] = userConversations.map((e) => e.toJson()).toList(); + return json; + } + + ListUnreadUserConversationsByUserIdData({ + required this.userConversations, + }); +} + +@immutable +class ListUnreadUserConversationsByUserIdVariables { + final String userId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListUnreadUserConversationsByUserIdVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUnreadUserConversationsByUserIdVariables otherTyped = other as ListUnreadUserConversationsByUserIdVariables; + return userId == otherTyped.userId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListUnreadUserConversationsByUserIdVariables({ + required this.userId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations.dart new file mode 100644 index 00000000..e7aafd8d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations.dart @@ -0,0 +1,333 @@ +part of 'generated.dart'; + +class ListUserConversationsVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListUserConversationsVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUserConversationsVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListUserConversationsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListUserConversationsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListUserConversationsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListUserConversationsVariables vars= ListUserConversationsVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listUserConversations", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListUserConversationsUserConversations { + final String id; + final String conversationId; + final String userId; + final int? unreadCount; + final Timestamp? lastReadAt; + final Timestamp? createdAt; + final ListUserConversationsUserConversationsConversation conversation; + final ListUserConversationsUserConversationsUser user; + ListUserConversationsUserConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']), + unreadCount = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']), + lastReadAt = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + conversation = ListUserConversationsUserConversationsConversation.fromJson(json['conversation']), + user = ListUserConversationsUserConversationsUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsUserConversations otherTyped = other as ListUserConversationsUserConversations; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt && + createdAt == otherTyped.createdAt && + conversation == otherTyped.conversation && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode, createdAt.hashCode, conversation.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if (unreadCount != null) { + json['unreadCount'] = nativeToJson(unreadCount); + } + if (lastReadAt != null) { + json['lastReadAt'] = lastReadAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['conversation'] = conversation.toJson(); + json['user'] = user.toJson(); + return json; + } + + ListUserConversationsUserConversations({ + required this.id, + required this.conversationId, + required this.userId, + this.unreadCount, + this.lastReadAt, + this.createdAt, + required this.conversation, + required this.user, + }); +} + +@immutable +class ListUserConversationsUserConversationsConversation { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + ListUserConversationsUserConversationsConversation.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsUserConversationsConversation otherTyped = other as ListUserConversationsUserConversationsConversation; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListUserConversationsUserConversationsConversation({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class ListUserConversationsUserConversationsUser { + final String id; + final String? fullName; + final String? photoUrl; + ListUserConversationsUserConversationsUser.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsUserConversationsUser otherTyped = other as ListUserConversationsUserConversationsUser; + return id == otherTyped.id && + fullName == otherTyped.fullName && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + return json; + } + + ListUserConversationsUserConversationsUser({ + required this.id, + this.fullName, + this.photoUrl, + }); +} + +@immutable +class ListUserConversationsData { + final List userConversations; + ListUserConversationsData.fromJson(dynamic json): + + userConversations = (json['userConversations'] as List) + .map((e) => ListUserConversationsUserConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsData otherTyped = other as ListUserConversationsData; + return userConversations == otherTyped.userConversations; + + } + @override + int get hashCode => userConversations.hashCode; + + + Map toJson() { + Map json = {}; + json['userConversations'] = userConversations.map((e) => e.toJson()).toList(); + return json; + } + + ListUserConversationsData({ + required this.userConversations, + }); +} + +@immutable +class ListUserConversationsVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListUserConversationsVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsVariables otherTyped = other as ListUserConversationsVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListUserConversationsVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations_by_conversation_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations_by_conversation_id.dart new file mode 100644 index 00000000..67741598 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations_by_conversation_id.dart @@ -0,0 +1,241 @@ +part of 'generated.dart'; + +class ListUserConversationsByConversationIdVariablesBuilder { + String conversationId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListUserConversationsByConversationIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUserConversationsByConversationIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListUserConversationsByConversationIdVariablesBuilder(this._dataConnect, {required this.conversationId,}); + Deserializer dataDeserializer = (dynamic json) => ListUserConversationsByConversationIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListUserConversationsByConversationIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListUserConversationsByConversationIdVariables vars= ListUserConversationsByConversationIdVariables(conversationId: conversationId,offset: _offset,limit: _limit,); + return _dataConnect.query("listUserConversationsByConversationId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListUserConversationsByConversationIdUserConversations { + final String id; + final String conversationId; + final String userId; + final int? unreadCount; + final Timestamp? lastReadAt; + final Timestamp? createdAt; + final ListUserConversationsByConversationIdUserConversationsUser user; + ListUserConversationsByConversationIdUserConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']), + unreadCount = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']), + lastReadAt = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + user = ListUserConversationsByConversationIdUserConversationsUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByConversationIdUserConversations otherTyped = other as ListUserConversationsByConversationIdUserConversations; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt && + createdAt == otherTyped.createdAt && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode, createdAt.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if (unreadCount != null) { + json['unreadCount'] = nativeToJson(unreadCount); + } + if (lastReadAt != null) { + json['lastReadAt'] = lastReadAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['user'] = user.toJson(); + return json; + } + + ListUserConversationsByConversationIdUserConversations({ + required this.id, + required this.conversationId, + required this.userId, + this.unreadCount, + this.lastReadAt, + this.createdAt, + required this.user, + }); +} + +@immutable +class ListUserConversationsByConversationIdUserConversationsUser { + final String id; + final String? fullName; + final String? photoUrl; + ListUserConversationsByConversationIdUserConversationsUser.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByConversationIdUserConversationsUser otherTyped = other as ListUserConversationsByConversationIdUserConversationsUser; + return id == otherTyped.id && + fullName == otherTyped.fullName && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + return json; + } + + ListUserConversationsByConversationIdUserConversationsUser({ + required this.id, + this.fullName, + this.photoUrl, + }); +} + +@immutable +class ListUserConversationsByConversationIdData { + final List userConversations; + ListUserConversationsByConversationIdData.fromJson(dynamic json): + + userConversations = (json['userConversations'] as List) + .map((e) => ListUserConversationsByConversationIdUserConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByConversationIdData otherTyped = other as ListUserConversationsByConversationIdData; + return userConversations == otherTyped.userConversations; + + } + @override + int get hashCode => userConversations.hashCode; + + + Map toJson() { + Map json = {}; + json['userConversations'] = userConversations.map((e) => e.toJson()).toList(); + return json; + } + + ListUserConversationsByConversationIdData({ + required this.userConversations, + }); +} + +@immutable +class ListUserConversationsByConversationIdVariables { + final String conversationId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListUserConversationsByConversationIdVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByConversationIdVariables otherTyped = other as ListUserConversationsByConversationIdVariables; + return conversationId == otherTyped.conversationId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListUserConversationsByConversationIdVariables({ + required this.conversationId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations_by_user_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations_by_user_id.dart new file mode 100644 index 00000000..fee3854e --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_user_conversations_by_user_id.dart @@ -0,0 +1,354 @@ +part of 'generated.dart'; + +class ListUserConversationsByUserIdVariablesBuilder { + String userId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListUserConversationsByUserIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListUserConversationsByUserIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListUserConversationsByUserIdVariablesBuilder(this._dataConnect, {required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => ListUserConversationsByUserIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListUserConversationsByUserIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListUserConversationsByUserIdVariables vars= ListUserConversationsByUserIdVariables(userId: userId,offset: _offset,limit: _limit,); + return _dataConnect.query("listUserConversationsByUserId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListUserConversationsByUserIdUserConversations { + final String id; + final String conversationId; + final String userId; + final int? unreadCount; + final Timestamp? lastReadAt; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListUserConversationsByUserIdUserConversationsConversation conversation; + final ListUserConversationsByUserIdUserConversationsUser user; + ListUserConversationsByUserIdUserConversations.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']), + unreadCount = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']), + lastReadAt = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + conversation = ListUserConversationsByUserIdUserConversationsConversation.fromJson(json['conversation']), + user = ListUserConversationsByUserIdUserConversationsUser.fromJson(json['user']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByUserIdUserConversations otherTyped = other as ListUserConversationsByUserIdUserConversations; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + conversation == otherTyped.conversation && + user == otherTyped.user; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, conversation.hashCode, user.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if (unreadCount != null) { + json['unreadCount'] = nativeToJson(unreadCount); + } + if (lastReadAt != null) { + json['lastReadAt'] = lastReadAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['conversation'] = conversation.toJson(); + json['user'] = user.toJson(); + return json; + } + + ListUserConversationsByUserIdUserConversations({ + required this.id, + required this.conversationId, + required this.userId, + this.unreadCount, + this.lastReadAt, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.conversation, + required this.user, + }); +} + +@immutable +class ListUserConversationsByUserIdUserConversationsConversation { + final String id; + final String? subject; + final EnumValue? status; + final EnumValue? conversationType; + final bool? isGroup; + final String? groupName; + final String? lastMessage; + final Timestamp? lastMessageAt; + final Timestamp? createdAt; + ListUserConversationsByUserIdUserConversationsConversation.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + subject = json['subject'] == null ? null : nativeFromJson(json['subject']), + status = json['status'] == null ? null : conversationStatusDeserializer(json['status']), + conversationType = json['conversationType'] == null ? null : conversationTypeDeserializer(json['conversationType']), + isGroup = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']), + groupName = json['groupName'] == null ? null : nativeFromJson(json['groupName']), + lastMessage = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']), + lastMessageAt = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByUserIdUserConversationsConversation otherTyped = other as ListUserConversationsByUserIdUserConversationsConversation; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt && + createdAt == otherTyped.createdAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode, createdAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (subject != null) { + json['subject'] = nativeToJson(subject); + } + if (status != null) { + json['status'] = + conversationStatusSerializer(status!) + ; + } + if (conversationType != null) { + json['conversationType'] = + conversationTypeSerializer(conversationType!) + ; + } + if (isGroup != null) { + json['isGroup'] = nativeToJson(isGroup); + } + if (groupName != null) { + json['groupName'] = nativeToJson(groupName); + } + if (lastMessage != null) { + json['lastMessage'] = nativeToJson(lastMessage); + } + if (lastMessageAt != null) { + json['lastMessageAt'] = lastMessageAt!.toJson(); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + return json; + } + + ListUserConversationsByUserIdUserConversationsConversation({ + required this.id, + this.subject, + this.status, + this.conversationType, + this.isGroup, + this.groupName, + this.lastMessage, + this.lastMessageAt, + this.createdAt, + }); +} + +@immutable +class ListUserConversationsByUserIdUserConversationsUser { + final String id; + final String? fullName; + final String? photoUrl; + ListUserConversationsByUserIdUserConversationsUser.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByUserIdUserConversationsUser otherTyped = other as ListUserConversationsByUserIdUserConversationsUser; + return id == otherTyped.id && + fullName == otherTyped.fullName && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + return json; + } + + ListUserConversationsByUserIdUserConversationsUser({ + required this.id, + this.fullName, + this.photoUrl, + }); +} + +@immutable +class ListUserConversationsByUserIdData { + final List userConversations; + ListUserConversationsByUserIdData.fromJson(dynamic json): + + userConversations = (json['userConversations'] as List) + .map((e) => ListUserConversationsByUserIdUserConversations.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByUserIdData otherTyped = other as ListUserConversationsByUserIdData; + return userConversations == otherTyped.userConversations; + + } + @override + int get hashCode => userConversations.hashCode; + + + Map toJson() { + Map json = {}; + json['userConversations'] = userConversations.map((e) => e.toJson()).toList(); + return json; + } + + ListUserConversationsByUserIdData({ + required this.userConversations, + }); +} + +@immutable +class ListUserConversationsByUserIdVariables { + final String userId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListUserConversationsByUserIdVariables.fromJson(Map json): + + userId = nativeFromJson(json['userId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUserConversationsByUserIdVariables otherTyped = other as ListUserConversationsByUserIdVariables; + return userId == otherTyped.userId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([userId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['userId'] = nativeToJson(userId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListUserConversationsByUserIdVariables({ + required this.userId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_users.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_users.dart new file mode 100644 index 00000000..b628142a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_users.dart @@ -0,0 +1,137 @@ +part of 'generated.dart'; + +class ListUsersVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListUsersVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListUsersData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listUsers", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListUsersUsers { + final String id; + final String? email; + final String? fullName; + final EnumValue role; + final String? userRole; + final String? photoUrl; + final Timestamp? createdDate; + final Timestamp? updatedDate; + ListUsersUsers.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + fullName = json['fullName'] == null ? null : nativeFromJson(json['fullName']), + role = userBaseRoleDeserializer(json['role']), + userRole = json['userRole'] == null ? null : nativeFromJson(json['userRole']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + createdDate = json['createdDate'] == null ? null : Timestamp.fromJson(json['createdDate']), + updatedDate = json['updatedDate'] == null ? null : Timestamp.fromJson(json['updatedDate']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUsersUsers otherTyped = other as ListUsersUsers; + return id == otherTyped.id && + email == otherTyped.email && + fullName == otherTyped.fullName && + role == otherTyped.role && + userRole == otherTyped.userRole && + photoUrl == otherTyped.photoUrl && + createdDate == otherTyped.createdDate && + updatedDate == otherTyped.updatedDate; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, email.hashCode, fullName.hashCode, role.hashCode, userRole.hashCode, photoUrl.hashCode, createdDate.hashCode, updatedDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (fullName != null) { + json['fullName'] = nativeToJson(fullName); + } + json['role'] = + userBaseRoleSerializer(role) + ; + if (userRole != null) { + json['userRole'] = nativeToJson(userRole); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (createdDate != null) { + json['createdDate'] = createdDate!.toJson(); + } + if (updatedDate != null) { + json['updatedDate'] = updatedDate!.toJson(); + } + return json; + } + + ListUsersUsers({ + required this.id, + this.email, + this.fullName, + required this.role, + this.userRole, + this.photoUrl, + this.createdDate, + this.updatedDate, + }); +} + +@immutable +class ListUsersData { + final List users; + ListUsersData.fromJson(dynamic json): + + users = (json['users'] as List) + .map((e) => ListUsersUsers.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListUsersData otherTyped = other as ListUsersData; + return users == otherTyped.users; + + } + @override + int get hashCode => users.hashCode; + + + Map toJson() { + Map json = {}; + json['users'] = users.map((e) => e.toJson()).toList(); + return json; + } + + ListUsersData({ + required this.users, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_benefit_plans.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_benefit_plans.dart new file mode 100644 index 00000000..2aee6cf6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_benefit_plans.dart @@ -0,0 +1,248 @@ +part of 'generated.dart'; + +class ListVendorBenefitPlansVariablesBuilder { + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; + ListVendorBenefitPlansVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListVendorBenefitPlansVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListVendorBenefitPlansVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListVendorBenefitPlansData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListVendorBenefitPlansVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListVendorBenefitPlansVariables vars= ListVendorBenefitPlansVariables(offset: _offset,limit: _limit,); + return _dataConnect.query("listVendorBenefitPlans", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListVendorBenefitPlansVendorBenefitPlans { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListVendorBenefitPlansVendorBenefitPlansVendor vendor; + ListVendorBenefitPlansVendorBenefitPlans.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = ListVendorBenefitPlansVendorBenefitPlansVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansVendorBenefitPlans otherTyped = other as ListVendorBenefitPlansVendorBenefitPlans; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['vendor'] = vendor.toJson(); + return json; + } + + ListVendorBenefitPlansVendorBenefitPlans({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.vendor, + }); +} + +@immutable +class ListVendorBenefitPlansVendorBenefitPlansVendor { + final String companyName; + ListVendorBenefitPlansVendorBenefitPlansVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansVendorBenefitPlansVendor otherTyped = other as ListVendorBenefitPlansVendorBenefitPlansVendor; + return companyName == otherTyped.companyName; + + } + @override + int get hashCode => companyName.hashCode; + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListVendorBenefitPlansVendorBenefitPlansVendor({ + required this.companyName, + }); +} + +@immutable +class ListVendorBenefitPlansData { + final List vendorBenefitPlans; + ListVendorBenefitPlansData.fromJson(dynamic json): + + vendorBenefitPlans = (json['vendorBenefitPlans'] as List) + .map((e) => ListVendorBenefitPlansVendorBenefitPlans.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansData otherTyped = other as ListVendorBenefitPlansData; + return vendorBenefitPlans == otherTyped.vendorBenefitPlans; + + } + @override + int get hashCode => vendorBenefitPlans.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlans'] = vendorBenefitPlans.map((e) => e.toJson()).toList(); + return json; + } + + ListVendorBenefitPlansData({ + required this.vendorBenefitPlans, + }); +} + +@immutable +class ListVendorBenefitPlansVariables { + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListVendorBenefitPlansVariables.fromJson(Map json) { + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansVariables otherTyped = other as ListVendorBenefitPlansVariables; + return offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListVendorBenefitPlansVariables({ + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_benefit_plans_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_benefit_plans_by_vendor_id.dart new file mode 100644 index 00000000..47704ee3 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_benefit_plans_by_vendor_id.dart @@ -0,0 +1,255 @@ +part of 'generated.dart'; + +class ListVendorBenefitPlansByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListVendorBenefitPlansByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListVendorBenefitPlansByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListVendorBenefitPlansByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListVendorBenefitPlansByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListVendorBenefitPlansByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListVendorBenefitPlansByVendorIdVariables vars= ListVendorBenefitPlansByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listVendorBenefitPlansByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListVendorBenefitPlansByVendorIdVendorBenefitPlans { + final String id; + final String vendorId; + final String title; + final String? description; + final String? requestLabel; + final int? total; + final bool? isActive; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final ListVendorBenefitPlansByVendorIdVendorBenefitPlansVendor vendor; + ListVendorBenefitPlansByVendorIdVendorBenefitPlans.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + title = nativeFromJson(json['title']), + description = json['description'] == null ? null : nativeFromJson(json['description']), + requestLabel = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']), + total = json['total'] == null ? null : nativeFromJson(json['total']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = ListVendorBenefitPlansByVendorIdVendorBenefitPlansVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansByVendorIdVendorBenefitPlans otherTyped = other as ListVendorBenefitPlansByVendorIdVendorBenefitPlans; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['title'] = nativeToJson(title); + if (description != null) { + json['description'] = nativeToJson(description); + } + if (requestLabel != null) { + json['requestLabel'] = nativeToJson(requestLabel); + } + if (total != null) { + json['total'] = nativeToJson(total); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + json['vendor'] = vendor.toJson(); + return json; + } + + ListVendorBenefitPlansByVendorIdVendorBenefitPlans({ + required this.id, + required this.vendorId, + required this.title, + this.description, + this.requestLabel, + this.total, + this.isActive, + this.createdAt, + this.updatedAt, + this.createdBy, + required this.vendor, + }); +} + +@immutable +class ListVendorBenefitPlansByVendorIdVendorBenefitPlansVendor { + final String companyName; + ListVendorBenefitPlansByVendorIdVendorBenefitPlansVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansByVendorIdVendorBenefitPlansVendor otherTyped = other as ListVendorBenefitPlansByVendorIdVendorBenefitPlansVendor; + return companyName == otherTyped.companyName; + + } + @override + int get hashCode => companyName.hashCode; + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListVendorBenefitPlansByVendorIdVendorBenefitPlansVendor({ + required this.companyName, + }); +} + +@immutable +class ListVendorBenefitPlansByVendorIdData { + final List vendorBenefitPlans; + ListVendorBenefitPlansByVendorIdData.fromJson(dynamic json): + + vendorBenefitPlans = (json['vendorBenefitPlans'] as List) + .map((e) => ListVendorBenefitPlansByVendorIdVendorBenefitPlans.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansByVendorIdData otherTyped = other as ListVendorBenefitPlansByVendorIdData; + return vendorBenefitPlans == otherTyped.vendorBenefitPlans; + + } + @override + int get hashCode => vendorBenefitPlans.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlans'] = vendorBenefitPlans.map((e) => e.toJson()).toList(); + return json; + } + + ListVendorBenefitPlansByVendorIdData({ + required this.vendorBenefitPlans, + }); +} + +@immutable +class ListVendorBenefitPlansByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListVendorBenefitPlansByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorBenefitPlansByVendorIdVariables otherTyped = other as ListVendorBenefitPlansByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListVendorBenefitPlansByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_rates.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_rates.dart new file mode 100644 index 00000000..20b178cc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendor_rates.dart @@ -0,0 +1,204 @@ +part of 'generated.dart'; + +class ListVendorRatesVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListVendorRatesVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListVendorRatesData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listVendorRates", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListVendorRatesVendorRates { + final String id; + final String vendorId; + final String? roleName; + final EnumValue? category; + final double? clientRate; + final double? employeeWage; + final double? markupPercentage; + final double? vendorFeePercentage; + final bool? isActive; + final String? notes; + final Timestamp? createdAt; + final ListVendorRatesVendorRatesVendor vendor; + ListVendorRatesVendorRates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + roleName = json['roleName'] == null ? null : nativeFromJson(json['roleName']), + category = json['category'] == null ? null : categoryTypeDeserializer(json['category']), + clientRate = json['clientRate'] == null ? null : nativeFromJson(json['clientRate']), + employeeWage = json['employeeWage'] == null ? null : nativeFromJson(json['employeeWage']), + markupPercentage = json['markupPercentage'] == null ? null : nativeFromJson(json['markupPercentage']), + vendorFeePercentage = json['vendorFeePercentage'] == null ? null : nativeFromJson(json['vendorFeePercentage']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + vendor = ListVendorRatesVendorRatesVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorRatesVendorRates otherTyped = other as ListVendorRatesVendorRates; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + roleName == otherTyped.roleName && + category == otherTyped.category && + clientRate == otherTyped.clientRate && + employeeWage == otherTyped.employeeWage && + markupPercentage == otherTyped.markupPercentage && + vendorFeePercentage == otherTyped.vendorFeePercentage && + isActive == otherTyped.isActive && + notes == otherTyped.notes && + createdAt == otherTyped.createdAt && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, roleName.hashCode, category.hashCode, clientRate.hashCode, employeeWage.hashCode, markupPercentage.hashCode, vendorFeePercentage.hashCode, isActive.hashCode, notes.hashCode, createdAt.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + if (roleName != null) { + json['roleName'] = nativeToJson(roleName); + } + if (category != null) { + json['category'] = + categoryTypeSerializer(category!) + ; + } + if (clientRate != null) { + json['clientRate'] = nativeToJson(clientRate); + } + if (employeeWage != null) { + json['employeeWage'] = nativeToJson(employeeWage); + } + if (markupPercentage != null) { + json['markupPercentage'] = nativeToJson(markupPercentage); + } + if (vendorFeePercentage != null) { + json['vendorFeePercentage'] = nativeToJson(vendorFeePercentage); + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['vendor'] = vendor.toJson(); + return json; + } + + ListVendorRatesVendorRates({ + required this.id, + required this.vendorId, + this.roleName, + this.category, + this.clientRate, + this.employeeWage, + this.markupPercentage, + this.vendorFeePercentage, + this.isActive, + this.notes, + this.createdAt, + required this.vendor, + }); +} + +@immutable +class ListVendorRatesVendorRatesVendor { + final String companyName; + final String? region; + ListVendorRatesVendorRatesVendor.fromJson(dynamic json): + + companyName = nativeFromJson(json['companyName']), + region = json['region'] == null ? null : nativeFromJson(json['region']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorRatesVendorRatesVendor otherTyped = other as ListVendorRatesVendorRatesVendor; + return companyName == otherTyped.companyName && + region == otherTyped.region; + + } + @override + int get hashCode => Object.hashAll([companyName.hashCode, region.hashCode]); + + + Map toJson() { + Map json = {}; + json['companyName'] = nativeToJson(companyName); + if (region != null) { + json['region'] = nativeToJson(region); + } + return json; + } + + ListVendorRatesVendorRatesVendor({ + required this.companyName, + this.region, + }); +} + +@immutable +class ListVendorRatesData { + final List vendorRates; + ListVendorRatesData.fromJson(dynamic json): + + vendorRates = (json['vendorRates'] as List) + .map((e) => ListVendorRatesVendorRates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorRatesData otherTyped = other as ListVendorRatesData; + return vendorRates == otherTyped.vendorRates; + + } + @override + int get hashCode => vendorRates.hashCode; + + + Map toJson() { + Map json = {}; + json['vendorRates'] = vendorRates.map((e) => e.toJson()).toList(); + return json; + } + + ListVendorRatesData({ + required this.vendorRates, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendors.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendors.dart new file mode 100644 index 00000000..03280e62 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_vendors.dart @@ -0,0 +1,249 @@ +part of 'generated.dart'; + +class ListVendorsVariablesBuilder { + + final FirebaseDataConnect _dataConnect; + ListVendorsVariablesBuilder(this._dataConnect, ); + Deserializer dataDeserializer = (dynamic json) => ListVendorsData.fromJson(jsonDecode(json)); + + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + + return _dataConnect.query("listVendors", dataDeserializer, emptySerializer, null); + } +} + +@immutable +class ListVendorsVendors { + final String id; + final String userId; + final String companyName; + final String? email; + final String? phone; + final String? photoUrl; + final String? address; + final String? billingAddress; + final String? timezone; + final String? legalName; + final String? doingBusinessAs; + final String? region; + final String? state; + final String? city; + final String? serviceSpecialty; + final EnumValue? approvalStatus; + final bool? isActive; + final double? markup; + final double? fee; + final double? csat; + final EnumValue? tier; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + ListVendorsVendors.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + userId = nativeFromJson(json['userId']), + companyName = nativeFromJson(json['companyName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + phone = json['phone'] == null ? null : nativeFromJson(json['phone']), + photoUrl = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']), + address = json['address'] == null ? null : nativeFromJson(json['address']), + billingAddress = json['billingAddress'] == null ? null : nativeFromJson(json['billingAddress']), + timezone = json['timezone'] == null ? null : nativeFromJson(json['timezone']), + legalName = json['legalName'] == null ? null : nativeFromJson(json['legalName']), + doingBusinessAs = json['doingBusinessAs'] == null ? null : nativeFromJson(json['doingBusinessAs']), + region = json['region'] == null ? null : nativeFromJson(json['region']), + state = json['state'] == null ? null : nativeFromJson(json['state']), + city = json['city'] == null ? null : nativeFromJson(json['city']), + serviceSpecialty = json['serviceSpecialty'] == null ? null : nativeFromJson(json['serviceSpecialty']), + approvalStatus = json['approvalStatus'] == null ? null : approvalStatusDeserializer(json['approvalStatus']), + isActive = json['isActive'] == null ? null : nativeFromJson(json['isActive']), + markup = json['markup'] == null ? null : nativeFromJson(json['markup']), + fee = json['fee'] == null ? null : nativeFromJson(json['fee']), + csat = json['csat'] == null ? null : nativeFromJson(json['csat']), + tier = json['tier'] == null ? null : vendorTierDeserializer(json['tier']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorsVendors otherTyped = other as ListVendorsVendors; + return id == otherTyped.id && + userId == otherTyped.userId && + companyName == otherTyped.companyName && + email == otherTyped.email && + phone == otherTyped.phone && + photoUrl == otherTyped.photoUrl && + address == otherTyped.address && + billingAddress == otherTyped.billingAddress && + timezone == otherTyped.timezone && + legalName == otherTyped.legalName && + doingBusinessAs == otherTyped.doingBusinessAs && + region == otherTyped.region && + state == otherTyped.state && + city == otherTyped.city && + serviceSpecialty == otherTyped.serviceSpecialty && + approvalStatus == otherTyped.approvalStatus && + isActive == otherTyped.isActive && + markup == otherTyped.markup && + fee == otherTyped.fee && + csat == otherTyped.csat && + tier == otherTyped.tier && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, companyName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode, address.hashCode, billingAddress.hashCode, timezone.hashCode, legalName.hashCode, doingBusinessAs.hashCode, region.hashCode, state.hashCode, city.hashCode, serviceSpecialty.hashCode, approvalStatus.hashCode, isActive.hashCode, markup.hashCode, fee.hashCode, csat.hashCode, tier.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['userId'] = nativeToJson(userId); + json['companyName'] = nativeToJson(companyName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (phone != null) { + json['phone'] = nativeToJson(phone); + } + if (photoUrl != null) { + json['photoUrl'] = nativeToJson(photoUrl); + } + if (address != null) { + json['address'] = nativeToJson(address); + } + if (billingAddress != null) { + json['billingAddress'] = nativeToJson(billingAddress); + } + if (timezone != null) { + json['timezone'] = nativeToJson(timezone); + } + if (legalName != null) { + json['legalName'] = nativeToJson(legalName); + } + if (doingBusinessAs != null) { + json['doingBusinessAs'] = nativeToJson(doingBusinessAs); + } + if (region != null) { + json['region'] = nativeToJson(region); + } + if (state != null) { + json['state'] = nativeToJson(state); + } + if (city != null) { + json['city'] = nativeToJson(city); + } + if (serviceSpecialty != null) { + json['serviceSpecialty'] = nativeToJson(serviceSpecialty); + } + if (approvalStatus != null) { + json['approvalStatus'] = + approvalStatusSerializer(approvalStatus!) + ; + } + if (isActive != null) { + json['isActive'] = nativeToJson(isActive); + } + if (markup != null) { + json['markup'] = nativeToJson(markup); + } + if (fee != null) { + json['fee'] = nativeToJson(fee); + } + if (csat != null) { + json['csat'] = nativeToJson(csat); + } + if (tier != null) { + json['tier'] = + vendorTierSerializer(tier!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + return json; + } + + ListVendorsVendors({ + required this.id, + required this.userId, + required this.companyName, + this.email, + this.phone, + this.photoUrl, + this.address, + this.billingAddress, + this.timezone, + this.legalName, + this.doingBusinessAs, + this.region, + this.state, + this.city, + this.serviceSpecialty, + this.approvalStatus, + this.isActive, + this.markup, + this.fee, + this.csat, + this.tier, + this.createdAt, + this.updatedAt, + this.createdBy, + }); +} + +@immutable +class ListVendorsData { + final List vendors; + ListVendorsData.fromJson(dynamic json): + + vendors = (json['vendors'] as List) + .map((e) => ListVendorsVendors.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListVendorsData otherTyped = other as ListVendorsData; + return vendors == otherTyped.vendors; + + } + @override + int get hashCode => vendors.hashCode; + + + Map toJson() { + Map json = {}; + json['vendors'] = vendors.map((e) => e.toJson()).toList(); + return json; + } + + ListVendorsData({ + required this.vendors, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_workforce_by_staff_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_workforce_by_staff_id.dart new file mode 100644 index 00000000..8cdaa962 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_workforce_by_staff_id.dart @@ -0,0 +1,243 @@ +part of 'generated.dart'; + +class ListWorkforceByStaffIdVariablesBuilder { + String staffId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListWorkforceByStaffIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListWorkforceByStaffIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListWorkforceByStaffIdVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => ListWorkforceByStaffIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListWorkforceByStaffIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListWorkforceByStaffIdVariables vars= ListWorkforceByStaffIdVariables(staffId: staffId,offset: _offset,limit: _limit,); + return _dataConnect.query("listWorkforceByStaffId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListWorkforceByStaffIdWorkforces { + final String id; + final String vendorId; + final String workforceNumber; + final EnumValue? employmentType; + final EnumValue? status; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final ListWorkforceByStaffIdWorkforcesVendor vendor; + ListWorkforceByStaffIdWorkforces.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + vendorId = nativeFromJson(json['vendorId']), + workforceNumber = nativeFromJson(json['workforceNumber']), + employmentType = json['employmentType'] == null ? null : workforceEmploymentTypeDeserializer(json['employmentType']), + status = json['status'] == null ? null : workforceStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + vendor = ListWorkforceByStaffIdWorkforcesVendor.fromJson(json['vendor']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByStaffIdWorkforces otherTyped = other as ListWorkforceByStaffIdWorkforces; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + workforceNumber == otherTyped.workforceNumber && + employmentType == otherTyped.employmentType && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + vendor == otherTyped.vendor; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, workforceNumber.hashCode, employmentType.hashCode, status.hashCode, createdAt.hashCode, updatedAt.hashCode, vendor.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['vendorId'] = nativeToJson(vendorId); + json['workforceNumber'] = nativeToJson(workforceNumber); + if (employmentType != null) { + json['employmentType'] = + workforceEmploymentTypeSerializer(employmentType!) + ; + } + if (status != null) { + json['status'] = + workforceStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + json['vendor'] = vendor.toJson(); + return json; + } + + ListWorkforceByStaffIdWorkforces({ + required this.id, + required this.vendorId, + required this.workforceNumber, + this.employmentType, + this.status, + this.createdAt, + this.updatedAt, + required this.vendor, + }); +} + +@immutable +class ListWorkforceByStaffIdWorkforcesVendor { + final String id; + final String companyName; + ListWorkforceByStaffIdWorkforcesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByStaffIdWorkforcesVendor otherTyped = other as ListWorkforceByStaffIdWorkforcesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + ListWorkforceByStaffIdWorkforcesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class ListWorkforceByStaffIdData { + final List workforces; + ListWorkforceByStaffIdData.fromJson(dynamic json): + + workforces = (json['workforces'] as List) + .map((e) => ListWorkforceByStaffIdWorkforces.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByStaffIdData otherTyped = other as ListWorkforceByStaffIdData; + return workforces == otherTyped.workforces; + + } + @override + int get hashCode => workforces.hashCode; + + + Map toJson() { + Map json = {}; + json['workforces'] = workforces.map((e) => e.toJson()).toList(); + return json; + } + + ListWorkforceByStaffIdData({ + required this.workforces, + }); +} + +@immutable +class ListWorkforceByStaffIdVariables { + final String staffId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListWorkforceByStaffIdVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByStaffIdVariables otherTyped = other as ListWorkforceByStaffIdVariables; + return staffId == otherTyped.staffId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListWorkforceByStaffIdVariables({ + required this.staffId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/list_workforce_by_vendor_id.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/list_workforce_by_vendor_id.dart new file mode 100644 index 00000000..c8975e17 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/list_workforce_by_vendor_id.dart @@ -0,0 +1,236 @@ +part of 'generated.dart'; + +class ListWorkforceByVendorIdVariablesBuilder { + String vendorId; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; ListWorkforceByVendorIdVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + ListWorkforceByVendorIdVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + ListWorkforceByVendorIdVariablesBuilder(this._dataConnect, {required this.vendorId,}); + Deserializer dataDeserializer = (dynamic json) => ListWorkforceByVendorIdData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (ListWorkforceByVendorIdVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + ListWorkforceByVendorIdVariables vars= ListWorkforceByVendorIdVariables(vendorId: vendorId,offset: _offset,limit: _limit,); + return _dataConnect.query("listWorkforceByVendorId", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class ListWorkforceByVendorIdWorkforces { + final String id; + final String staffId; + final String workforceNumber; + final EnumValue? employmentType; + final EnumValue? status; + final Timestamp? createdAt; + final ListWorkforceByVendorIdWorkforcesStaff staff; + ListWorkforceByVendorIdWorkforces.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + staffId = nativeFromJson(json['staffId']), + workforceNumber = nativeFromJson(json['workforceNumber']), + employmentType = json['employmentType'] == null ? null : workforceEmploymentTypeDeserializer(json['employmentType']), + status = json['status'] == null ? null : workforceStatusDeserializer(json['status']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + staff = ListWorkforceByVendorIdWorkforcesStaff.fromJson(json['staff']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByVendorIdWorkforces otherTyped = other as ListWorkforceByVendorIdWorkforces; + return id == otherTyped.id && + staffId == otherTyped.staffId && + workforceNumber == otherTyped.workforceNumber && + employmentType == otherTyped.employmentType && + status == otherTyped.status && + createdAt == otherTyped.createdAt && + staff == otherTyped.staff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, staffId.hashCode, workforceNumber.hashCode, employmentType.hashCode, status.hashCode, createdAt.hashCode, staff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['staffId'] = nativeToJson(staffId); + json['workforceNumber'] = nativeToJson(workforceNumber); + if (employmentType != null) { + json['employmentType'] = + workforceEmploymentTypeSerializer(employmentType!) + ; + } + if (status != null) { + json['status'] = + workforceStatusSerializer(status!) + ; + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + json['staff'] = staff.toJson(); + return json; + } + + ListWorkforceByVendorIdWorkforces({ + required this.id, + required this.staffId, + required this.workforceNumber, + this.employmentType, + this.status, + this.createdAt, + required this.staff, + }); +} + +@immutable +class ListWorkforceByVendorIdWorkforcesStaff { + final String id; + final String fullName; + ListWorkforceByVendorIdWorkforcesStaff.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + fullName = nativeFromJson(json['fullName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByVendorIdWorkforcesStaff otherTyped = other as ListWorkforceByVendorIdWorkforcesStaff; + return id == otherTyped.id && + fullName == otherTyped.fullName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['fullName'] = nativeToJson(fullName); + return json; + } + + ListWorkforceByVendorIdWorkforcesStaff({ + required this.id, + required this.fullName, + }); +} + +@immutable +class ListWorkforceByVendorIdData { + final List workforces; + ListWorkforceByVendorIdData.fromJson(dynamic json): + + workforces = (json['workforces'] as List) + .map((e) => ListWorkforceByVendorIdWorkforces.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByVendorIdData otherTyped = other as ListWorkforceByVendorIdData; + return workforces == otherTyped.workforces; + + } + @override + int get hashCode => workforces.hashCode; + + + Map toJson() { + Map json = {}; + json['workforces'] = workforces.map((e) => e.toJson()).toList(); + return json; + } + + ListWorkforceByVendorIdData({ + required this.workforces, + }); +} + +@immutable +class ListWorkforceByVendorIdVariables { + final String vendorId; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + ListWorkforceByVendorIdVariables.fromJson(Map json): + + vendorId = nativeFromJson(json['vendorId']) { + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final ListWorkforceByVendorIdVariables otherTyped = other as ListWorkforceByVendorIdVariables; + return vendorId == otherTyped.vendorId && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([vendorId.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorId'] = nativeToJson(vendorId); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + ListWorkforceByVendorIdVariables({ + required this.vendorId, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/mark_activity_log_as_read.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/mark_activity_log_as_read.dart new file mode 100644 index 00000000..e1f9ed7f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/mark_activity_log_as_read.dart @@ -0,0 +1,124 @@ +part of 'generated.dart'; + +class MarkActivityLogAsReadVariablesBuilder { + String id; + + final FirebaseDataConnect _dataConnect; + MarkActivityLogAsReadVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => MarkActivityLogAsReadData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (MarkActivityLogAsReadVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + MarkActivityLogAsReadVariables vars= MarkActivityLogAsReadVariables(id: id,); + return _dataConnect.mutation("markActivityLogAsRead", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class MarkActivityLogAsReadActivityLogUpdate { + final String id; + MarkActivityLogAsReadActivityLogUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkActivityLogAsReadActivityLogUpdate otherTyped = other as MarkActivityLogAsReadActivityLogUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + MarkActivityLogAsReadActivityLogUpdate({ + required this.id, + }); +} + +@immutable +class MarkActivityLogAsReadData { + final MarkActivityLogAsReadActivityLogUpdate? activityLog_update; + MarkActivityLogAsReadData.fromJson(dynamic json): + + activityLog_update = json['activityLog_update'] == null ? null : MarkActivityLogAsReadActivityLogUpdate.fromJson(json['activityLog_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkActivityLogAsReadData otherTyped = other as MarkActivityLogAsReadData; + return activityLog_update == otherTyped.activityLog_update; + + } + @override + int get hashCode => activityLog_update.hashCode; + + + Map toJson() { + Map json = {}; + if (activityLog_update != null) { + json['activityLog_update'] = activityLog_update!.toJson(); + } + return json; + } + + MarkActivityLogAsReadData({ + this.activityLog_update, + }); +} + +@immutable +class MarkActivityLogAsReadVariables { + final String id; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + MarkActivityLogAsReadVariables.fromJson(Map json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkActivityLogAsReadVariables otherTyped = other as MarkActivityLogAsReadVariables; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + MarkActivityLogAsReadVariables({ + required this.id, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/mark_activity_logs_as_read.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/mark_activity_logs_as_read.dart new file mode 100644 index 00000000..c976961d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/mark_activity_logs_as_read.dart @@ -0,0 +1,90 @@ +part of 'generated.dart'; + +class MarkActivityLogsAsReadVariablesBuilder { + List ids; + + final FirebaseDataConnect _dataConnect; + MarkActivityLogsAsReadVariablesBuilder(this._dataConnect, {required this.ids,}); + Deserializer dataDeserializer = (dynamic json) => MarkActivityLogsAsReadData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (MarkActivityLogsAsReadVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + MarkActivityLogsAsReadVariables vars= MarkActivityLogsAsReadVariables(ids: ids,); + return _dataConnect.mutation("markActivityLogsAsRead", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class MarkActivityLogsAsReadData { + final int activityLog_updateMany; + MarkActivityLogsAsReadData.fromJson(dynamic json): + + activityLog_updateMany = nativeFromJson(json['activityLog_updateMany']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkActivityLogsAsReadData otherTyped = other as MarkActivityLogsAsReadData; + return activityLog_updateMany == otherTyped.activityLog_updateMany; + + } + @override + int get hashCode => activityLog_updateMany.hashCode; + + + Map toJson() { + Map json = {}; + json['activityLog_updateMany'] = nativeToJson(activityLog_updateMany); + return json; + } + + MarkActivityLogsAsReadData({ + required this.activityLog_updateMany, + }); +} + +@immutable +class MarkActivityLogsAsReadVariables { + final List ids; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + MarkActivityLogsAsReadVariables.fromJson(Map json): + + ids = (json['ids'] as List) + .map((e) => nativeFromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkActivityLogsAsReadVariables otherTyped = other as MarkActivityLogsAsReadVariables; + return ids == otherTyped.ids; + + } + @override + int get hashCode => ids.hashCode; + + + Map toJson() { + Map json = {}; + json['ids'] = ids.map((e) => nativeToJson(e)).toList(); + return json; + } + + MarkActivityLogsAsReadVariables({ + required this.ids, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/mark_conversation_as_read.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/mark_conversation_as_read.dart new file mode 100644 index 00000000..d24fd1fc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/mark_conversation_as_read.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class MarkConversationAsReadVariablesBuilder { + String conversationId; + String userId; + Optional _lastReadAt = Optional.optional((json) => json['lastReadAt'] = Timestamp.fromJson(json['lastReadAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; MarkConversationAsReadVariablesBuilder lastReadAt(Timestamp? t) { + _lastReadAt.value = t; + return this; + } + + MarkConversationAsReadVariablesBuilder(this._dataConnect, {required this.conversationId,required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => MarkConversationAsReadData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (MarkConversationAsReadVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + MarkConversationAsReadVariables vars= MarkConversationAsReadVariables(conversationId: conversationId,userId: userId,lastReadAt: _lastReadAt,); + return _dataConnect.mutation("markConversationAsRead", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class MarkConversationAsReadUserConversationUpdate { + final String conversationId; + final String userId; + MarkConversationAsReadUserConversationUpdate.fromJson(dynamic json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkConversationAsReadUserConversationUpdate otherTyped = other as MarkConversationAsReadUserConversationUpdate; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + return json; + } + + MarkConversationAsReadUserConversationUpdate({ + required this.conversationId, + required this.userId, + }); +} + +@immutable +class MarkConversationAsReadData { + final MarkConversationAsReadUserConversationUpdate? userConversation_update; + MarkConversationAsReadData.fromJson(dynamic json): + + userConversation_update = json['userConversation_update'] == null ? null : MarkConversationAsReadUserConversationUpdate.fromJson(json['userConversation_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkConversationAsReadData otherTyped = other as MarkConversationAsReadData; + return userConversation_update == otherTyped.userConversation_update; + + } + @override + int get hashCode => userConversation_update.hashCode; + + + Map toJson() { + Map json = {}; + if (userConversation_update != null) { + json['userConversation_update'] = userConversation_update!.toJson(); + } + return json; + } + + MarkConversationAsReadData({ + this.userConversation_update, + }); +} + +@immutable +class MarkConversationAsReadVariables { + final String conversationId; + final String userId; + late final OptionallastReadAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + MarkConversationAsReadVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']) { + + + + + lastReadAt = Optional.optional((json) => json['lastReadAt'] = Timestamp.fromJson(json['lastReadAt']), defaultSerializer); + lastReadAt.value = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final MarkConversationAsReadVariables otherTyped = other as MarkConversationAsReadVariables; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + lastReadAt == otherTyped.lastReadAt; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode, lastReadAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if(lastReadAt.state == OptionalState.set) { + json['lastReadAt'] = lastReadAt.toJson(); + } + return json; + } + + MarkConversationAsReadVariables({ + required this.conversationId, + required this.userId, + required this.lastReadAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/search_invoice_templates_by_owner_and_name.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/search_invoice_templates_by_owner_and_name.dart new file mode 100644 index 00000000..8dc4e87b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/search_invoice_templates_by_owner_and_name.dart @@ -0,0 +1,491 @@ +part of 'generated.dart'; + +class SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder { + String ownerId; + String name; + Optional _offset = Optional.optional(nativeFromJson, nativeToJson); + Optional _limit = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder offset(int? t) { + _offset.value = t; + return this; + } + SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder limit(int? t) { + _limit.value = t; + return this; + } + + SearchInvoiceTemplatesByOwnerAndNameVariablesBuilder(this._dataConnect, {required this.ownerId,required this.name,}); + Deserializer dataDeserializer = (dynamic json) => SearchInvoiceTemplatesByOwnerAndNameData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (SearchInvoiceTemplatesByOwnerAndNameVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + QueryRef ref() { + SearchInvoiceTemplatesByOwnerAndNameVariables vars= SearchInvoiceTemplatesByOwnerAndNameVariables(ownerId: ownerId,name: name,offset: _offset,limit: _limit,); + return _dataConnect.query("searchInvoiceTemplatesByOwnerAndName", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplates { + final String id; + final String name; + final String ownerId; + final String? vendorId; + final String? businessId; + final String? orderId; + final EnumValue? paymentTerms; + final String? invoiceNumber; + final Timestamp? issueDate; + final Timestamp? dueDate; + final String? hub; + final String? managerName; + final String? vendorNumber; + final AnyValue? roles; + final AnyValue? charges; + final double? otherCharges; + final double? subtotal; + final double? amount; + final String? notes; + final int? staffCount; + final int? chargesCount; + final Timestamp? createdAt; + final Timestamp? updatedAt; + final String? createdBy; + final SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesVendor? vendor; + final SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesBusiness? business; + final SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesOrder? order; + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplates.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + name = nativeFromJson(json['name']), + ownerId = nativeFromJson(json['ownerId']), + vendorId = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']), + businessId = json['businessId'] == null ? null : nativeFromJson(json['businessId']), + orderId = json['orderId'] == null ? null : nativeFromJson(json['orderId']), + paymentTerms = json['paymentTerms'] == null ? null : inovicePaymentTermsTempDeserializer(json['paymentTerms']), + invoiceNumber = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']), + issueDate = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']), + dueDate = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']), + hub = json['hub'] == null ? null : nativeFromJson(json['hub']), + managerName = json['managerName'] == null ? null : nativeFromJson(json['managerName']), + vendorNumber = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']), + roles = json['roles'] == null ? null : AnyValue.fromJson(json['roles']), + charges = json['charges'] == null ? null : AnyValue.fromJson(json['charges']), + otherCharges = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']), + subtotal = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']), + amount = json['amount'] == null ? null : nativeFromJson(json['amount']), + notes = json['notes'] == null ? null : nativeFromJson(json['notes']), + staffCount = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']), + chargesCount = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']), + createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']), + updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']), + createdBy = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']), + vendor = json['vendor'] == null ? null : SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesVendor.fromJson(json['vendor']), + business = json['business'] == null ? null : SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesBusiness.fromJson(json['business']), + order = json['order'] == null ? null : SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesOrder.fromJson(json['order']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplates otherTyped = other as SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplates; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + createdAt == otherTyped.createdAt && + updatedAt == otherTyped.updatedAt && + createdBy == otherTyped.createdBy && + vendor == otherTyped.vendor && + business == otherTyped.business && + order == otherTyped.order; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, vendor.hashCode, business.hashCode, order.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['name'] = nativeToJson(name); + json['ownerId'] = nativeToJson(ownerId); + if (vendorId != null) { + json['vendorId'] = nativeToJson(vendorId); + } + if (businessId != null) { + json['businessId'] = nativeToJson(businessId); + } + if (orderId != null) { + json['orderId'] = nativeToJson(orderId); + } + if (paymentTerms != null) { + json['paymentTerms'] = + inovicePaymentTermsTempSerializer(paymentTerms!) + ; + } + if (invoiceNumber != null) { + json['invoiceNumber'] = nativeToJson(invoiceNumber); + } + if (issueDate != null) { + json['issueDate'] = issueDate!.toJson(); + } + if (dueDate != null) { + json['dueDate'] = dueDate!.toJson(); + } + if (hub != null) { + json['hub'] = nativeToJson(hub); + } + if (managerName != null) { + json['managerName'] = nativeToJson(managerName); + } + if (vendorNumber != null) { + json['vendorNumber'] = nativeToJson(vendorNumber); + } + if (roles != null) { + json['roles'] = roles!.toJson(); + } + if (charges != null) { + json['charges'] = charges!.toJson(); + } + if (otherCharges != null) { + json['otherCharges'] = nativeToJson(otherCharges); + } + if (subtotal != null) { + json['subtotal'] = nativeToJson(subtotal); + } + if (amount != null) { + json['amount'] = nativeToJson(amount); + } + if (notes != null) { + json['notes'] = nativeToJson(notes); + } + if (staffCount != null) { + json['staffCount'] = nativeToJson(staffCount); + } + if (chargesCount != null) { + json['chargesCount'] = nativeToJson(chargesCount); + } + if (createdAt != null) { + json['createdAt'] = createdAt!.toJson(); + } + if (updatedAt != null) { + json['updatedAt'] = updatedAt!.toJson(); + } + if (createdBy != null) { + json['createdBy'] = nativeToJson(createdBy); + } + if (vendor != null) { + json['vendor'] = vendor!.toJson(); + } + if (business != null) { + json['business'] = business!.toJson(); + } + if (order != null) { + json['order'] = order!.toJson(); + } + return json; + } + + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplates({ + required this.id, + required this.name, + required this.ownerId, + this.vendorId, + this.businessId, + this.orderId, + this.paymentTerms, + this.invoiceNumber, + this.issueDate, + this.dueDate, + this.hub, + this.managerName, + this.vendorNumber, + this.roles, + this.charges, + this.otherCharges, + this.subtotal, + this.amount, + this.notes, + this.staffCount, + this.chargesCount, + this.createdAt, + this.updatedAt, + this.createdBy, + this.vendor, + this.business, + this.order, + }); +} + +@immutable +class SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesVendor { + final String id; + final String companyName; + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesVendor.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + companyName = nativeFromJson(json['companyName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesVendor otherTyped = other as SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesVendor; + return id == otherTyped.id && + companyName == otherTyped.companyName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['companyName'] = nativeToJson(companyName); + return json; + } + + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesVendor({ + required this.id, + required this.companyName, + }); +} + +@immutable +class SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesBusiness { + final String id; + final String businessName; + final String? email; + final String? contactName; + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesBusiness.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + businessName = nativeFromJson(json['businessName']), + email = json['email'] == null ? null : nativeFromJson(json['email']), + contactName = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesBusiness otherTyped = other as SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesBusiness; + return id == otherTyped.id && + businessName == otherTyped.businessName && + email == otherTyped.email && + contactName == otherTyped.contactName; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['businessName'] = nativeToJson(businessName); + if (email != null) { + json['email'] = nativeToJson(email); + } + if (contactName != null) { + json['contactName'] = nativeToJson(contactName); + } + return json; + } + + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesBusiness({ + required this.id, + required this.businessName, + this.email, + this.contactName, + }); +} + +@immutable +class SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesOrder { + final String id; + final String? eventName; + final EnumValue status; + final EnumValue orderType; + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesOrder.fromJson(dynamic json): + + id = nativeFromJson(json['id']), + eventName = json['eventName'] == null ? null : nativeFromJson(json['eventName']), + status = orderStatusDeserializer(json['status']), + orderType = orderTypeDeserializer(json['orderType']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesOrder otherTyped = other as SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesOrder; + return id == otherTyped.id && + eventName == otherTyped.eventName && + status == otherTyped.status && + orderType == otherTyped.orderType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, status.hashCode, orderType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if (eventName != null) { + json['eventName'] = nativeToJson(eventName); + } + json['status'] = + orderStatusSerializer(status) + ; + json['orderType'] = + orderTypeSerializer(orderType) + ; + return json; + } + + SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplatesOrder({ + required this.id, + this.eventName, + required this.status, + required this.orderType, + }); +} + +@immutable +class SearchInvoiceTemplatesByOwnerAndNameData { + final List invoiceTemplates; + SearchInvoiceTemplatesByOwnerAndNameData.fromJson(dynamic json): + + invoiceTemplates = (json['invoiceTemplates'] as List) + .map((e) => SearchInvoiceTemplatesByOwnerAndNameInvoiceTemplates.fromJson(e)) + .toList(); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final SearchInvoiceTemplatesByOwnerAndNameData otherTyped = other as SearchInvoiceTemplatesByOwnerAndNameData; + return invoiceTemplates == otherTyped.invoiceTemplates; + + } + @override + int get hashCode => invoiceTemplates.hashCode; + + + Map toJson() { + Map json = {}; + json['invoiceTemplates'] = invoiceTemplates.map((e) => e.toJson()).toList(); + return json; + } + + SearchInvoiceTemplatesByOwnerAndNameData({ + required this.invoiceTemplates, + }); +} + +@immutable +class SearchInvoiceTemplatesByOwnerAndNameVariables { + final String ownerId; + final String name; + late final Optionaloffset; + late final Optionallimit; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + SearchInvoiceTemplatesByOwnerAndNameVariables.fromJson(Map json): + + ownerId = nativeFromJson(json['ownerId']), + name = nativeFromJson(json['name']) { + + + + + offset = Optional.optional(nativeFromJson, nativeToJson); + offset.value = json['offset'] == null ? null : nativeFromJson(json['offset']); + + + limit = Optional.optional(nativeFromJson, nativeToJson); + limit.value = json['limit'] == null ? null : nativeFromJson(json['limit']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final SearchInvoiceTemplatesByOwnerAndNameVariables otherTyped = other as SearchInvoiceTemplatesByOwnerAndNameVariables; + return ownerId == otherTyped.ownerId && + name == otherTyped.name && + offset == otherTyped.offset && + limit == otherTyped.limit; + + } + @override + int get hashCode => Object.hashAll([ownerId.hashCode, name.hashCode, offset.hashCode, limit.hashCode]); + + + Map toJson() { + Map json = {}; + json['ownerId'] = nativeToJson(ownerId); + json['name'] = nativeToJson(name); + if(offset.state == OptionalState.set) { + json['offset'] = offset.toJson(); + } + if(limit.state == OptionalState.set) { + json['limit'] = limit.toJson(); + } + return json; + } + + SearchInvoiceTemplatesByOwnerAndNameVariables({ + required this.ownerId, + required this.name, + required this.offset, + required this.limit, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_account.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_account.dart new file mode 100644 index 00000000..45c9489c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_account.dart @@ -0,0 +1,187 @@ +part of 'generated.dart'; + +class UpdateAccountVariablesBuilder { + String id; + Optional _bank = Optional.optional(nativeFromJson, nativeToJson); + Optional _type = Optional.optional((data) => AccountType.values.byName(data), enumSerializer); + Optional _last4 = Optional.optional(nativeFromJson, nativeToJson); + Optional _isPrimary = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateAccountVariablesBuilder bank(String? t) { + _bank.value = t; + return this; + } + UpdateAccountVariablesBuilder type(AccountType? t) { + _type.value = t; + return this; + } + UpdateAccountVariablesBuilder last4(String? t) { + _last4.value = t; + return this; + } + UpdateAccountVariablesBuilder isPrimary(bool? t) { + _isPrimary.value = t; + return this; + } + + UpdateAccountVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateAccountData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateAccountVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateAccountVariables vars= UpdateAccountVariables(id: id,bank: _bank,type: _type,last4: _last4,isPrimary: _isPrimary,); + return _dataConnect.mutation("updateAccount", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateAccountAccountUpdate { + final String id; + UpdateAccountAccountUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAccountAccountUpdate otherTyped = other as UpdateAccountAccountUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateAccountAccountUpdate({ + required this.id, + }); +} + +@immutable +class UpdateAccountData { + final UpdateAccountAccountUpdate? account_update; + UpdateAccountData.fromJson(dynamic json): + + account_update = json['account_update'] == null ? null : UpdateAccountAccountUpdate.fromJson(json['account_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAccountData otherTyped = other as UpdateAccountData; + return account_update == otherTyped.account_update; + + } + @override + int get hashCode => account_update.hashCode; + + + Map toJson() { + Map json = {}; + if (account_update != null) { + json['account_update'] = account_update!.toJson(); + } + return json; + } + + UpdateAccountData({ + this.account_update, + }); +} + +@immutable +class UpdateAccountVariables { + final String id; + late final Optionalbank; + late final Optionaltype; + late final Optionallast4; + late final OptionalisPrimary; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateAccountVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + bank = Optional.optional(nativeFromJson, nativeToJson); + bank.value = json['bank'] == null ? null : nativeFromJson(json['bank']); + + + type = Optional.optional((data) => AccountType.values.byName(data), enumSerializer); + type.value = json['type'] == null ? null : AccountType.values.byName(json['type']); + + + last4 = Optional.optional(nativeFromJson, nativeToJson); + last4.value = json['last4'] == null ? null : nativeFromJson(json['last4']); + + + isPrimary = Optional.optional(nativeFromJson, nativeToJson); + isPrimary.value = json['isPrimary'] == null ? null : nativeFromJson(json['isPrimary']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAccountVariables otherTyped = other as UpdateAccountVariables; + return id == otherTyped.id && + bank == otherTyped.bank && + type == otherTyped.type && + last4 == otherTyped.last4 && + isPrimary == otherTyped.isPrimary; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(bank.state == OptionalState.set) { + json['bank'] = bank.toJson(); + } + if(type.state == OptionalState.set) { + json['type'] = type.toJson(); + } + if(last4.state == OptionalState.set) { + json['last4'] = last4.toJson(); + } + if(isPrimary.state == OptionalState.set) { + json['isPrimary'] = isPrimary.toJson(); + } + return json; + } + + UpdateAccountVariables({ + required this.id, + required this.bank, + required this.type, + required this.last4, + required this.isPrimary, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_activity_log.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_activity_log.dart new file mode 100644 index 00000000..9e226064 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_activity_log.dart @@ -0,0 +1,292 @@ +part of 'generated.dart'; + +class UpdateActivityLogVariablesBuilder { + String id; + Optional _userId = Optional.optional(nativeFromJson, nativeToJson); + Optional _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + Optional _hourStart = Optional.optional(nativeFromJson, nativeToJson); + Optional _hourEnd = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalhours = Optional.optional(nativeFromJson, nativeToJson); + Optional _iconType = Optional.optional((data) => ActivityIconType.values.byName(data), enumSerializer); + Optional _iconColor = Optional.optional(nativeFromJson, nativeToJson); + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _isRead = Optional.optional(nativeFromJson, nativeToJson); + Optional _activityType = Optional.optional((data) => ActivityType.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; UpdateActivityLogVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + UpdateActivityLogVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + UpdateActivityLogVariablesBuilder hourStart(String? t) { + _hourStart.value = t; + return this; + } + UpdateActivityLogVariablesBuilder hourEnd(String? t) { + _hourEnd.value = t; + return this; + } + UpdateActivityLogVariablesBuilder totalhours(String? t) { + _totalhours.value = t; + return this; + } + UpdateActivityLogVariablesBuilder iconType(ActivityIconType? t) { + _iconType.value = t; + return this; + } + UpdateActivityLogVariablesBuilder iconColor(String? t) { + _iconColor.value = t; + return this; + } + UpdateActivityLogVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateActivityLogVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateActivityLogVariablesBuilder isRead(bool? t) { + _isRead.value = t; + return this; + } + UpdateActivityLogVariablesBuilder activityType(ActivityType? t) { + _activityType.value = t; + return this; + } + + UpdateActivityLogVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateActivityLogData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateActivityLogVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateActivityLogVariables vars= UpdateActivityLogVariables(id: id,userId: _userId,date: _date,hourStart: _hourStart,hourEnd: _hourEnd,totalhours: _totalhours,iconType: _iconType,iconColor: _iconColor,title: _title,description: _description,isRead: _isRead,activityType: _activityType,); + return _dataConnect.mutation("updateActivityLog", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateActivityLogActivityLogUpdate { + final String id; + UpdateActivityLogActivityLogUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateActivityLogActivityLogUpdate otherTyped = other as UpdateActivityLogActivityLogUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateActivityLogActivityLogUpdate({ + required this.id, + }); +} + +@immutable +class UpdateActivityLogData { + final UpdateActivityLogActivityLogUpdate? activityLog_update; + UpdateActivityLogData.fromJson(dynamic json): + + activityLog_update = json['activityLog_update'] == null ? null : UpdateActivityLogActivityLogUpdate.fromJson(json['activityLog_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateActivityLogData otherTyped = other as UpdateActivityLogData; + return activityLog_update == otherTyped.activityLog_update; + + } + @override + int get hashCode => activityLog_update.hashCode; + + + Map toJson() { + Map json = {}; + if (activityLog_update != null) { + json['activityLog_update'] = activityLog_update!.toJson(); + } + return json; + } + + UpdateActivityLogData({ + this.activityLog_update, + }); +} + +@immutable +class UpdateActivityLogVariables { + final String id; + late final OptionaluserId; + late final Optionaldate; + late final OptionalhourStart; + late final OptionalhourEnd; + late final Optionaltotalhours; + late final OptionaliconType; + late final OptionaliconColor; + late final Optionaltitle; + late final Optionaldescription; + late final OptionalisRead; + late final OptionalactivityType; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateActivityLogVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + userId = Optional.optional(nativeFromJson, nativeToJson); + userId.value = json['userId'] == null ? null : nativeFromJson(json['userId']); + + + date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']); + + + hourStart = Optional.optional(nativeFromJson, nativeToJson); + hourStart.value = json['hourStart'] == null ? null : nativeFromJson(json['hourStart']); + + + hourEnd = Optional.optional(nativeFromJson, nativeToJson); + hourEnd.value = json['hourEnd'] == null ? null : nativeFromJson(json['hourEnd']); + + + totalhours = Optional.optional(nativeFromJson, nativeToJson); + totalhours.value = json['totalhours'] == null ? null : nativeFromJson(json['totalhours']); + + + iconType = Optional.optional((data) => ActivityIconType.values.byName(data), enumSerializer); + iconType.value = json['iconType'] == null ? null : ActivityIconType.values.byName(json['iconType']); + + + iconColor = Optional.optional(nativeFromJson, nativeToJson); + iconColor.value = json['iconColor'] == null ? null : nativeFromJson(json['iconColor']); + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + isRead = Optional.optional(nativeFromJson, nativeToJson); + isRead.value = json['isRead'] == null ? null : nativeFromJson(json['isRead']); + + + activityType = Optional.optional((data) => ActivityType.values.byName(data), enumSerializer); + activityType.value = json['activityType'] == null ? null : ActivityType.values.byName(json['activityType']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateActivityLogVariables otherTyped = other as UpdateActivityLogVariables; + return id == otherTyped.id && + userId == otherTyped.userId && + date == otherTyped.date && + hourStart == otherTyped.hourStart && + hourEnd == otherTyped.hourEnd && + totalhours == otherTyped.totalhours && + iconType == otherTyped.iconType && + iconColor == otherTyped.iconColor && + title == otherTyped.title && + description == otherTyped.description && + isRead == otherTyped.isRead && + activityType == otherTyped.activityType; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, date.hashCode, hourStart.hashCode, hourEnd.hashCode, totalhours.hashCode, iconType.hashCode, iconColor.hashCode, title.hashCode, description.hashCode, isRead.hashCode, activityType.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(userId.state == OptionalState.set) { + json['userId'] = userId.toJson(); + } + if(date.state == OptionalState.set) { + json['date'] = date.toJson(); + } + if(hourStart.state == OptionalState.set) { + json['hourStart'] = hourStart.toJson(); + } + if(hourEnd.state == OptionalState.set) { + json['hourEnd'] = hourEnd.toJson(); + } + if(totalhours.state == OptionalState.set) { + json['totalhours'] = totalhours.toJson(); + } + if(iconType.state == OptionalState.set) { + json['iconType'] = iconType.toJson(); + } + if(iconColor.state == OptionalState.set) { + json['iconColor'] = iconColor.toJson(); + } + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(isRead.state == OptionalState.set) { + json['isRead'] = isRead.toJson(); + } + if(activityType.state == OptionalState.set) { + json['activityType'] = activityType.toJson(); + } + return json; + } + + UpdateActivityLogVariables({ + required this.id, + required this.userId, + required this.date, + required this.hourStart, + required this.hourEnd, + required this.totalhours, + required this.iconType, + required this.iconColor, + required this.title, + required this.description, + required this.isRead, + required this.activityType, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_application_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_application_status.dart new file mode 100644 index 00000000..0d8c8165 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_application_status.dart @@ -0,0 +1,209 @@ +part of 'generated.dart'; + +class UpdateApplicationStatusVariablesBuilder { + String id; + Optional _shiftId = Optional.optional(nativeFromJson, nativeToJson); + Optional _staffId = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => ApplicationStatus.values.byName(data), enumSerializer); + Optional _checkInTime = Optional.optional((json) => json['checkInTime'] = Timestamp.fromJson(json['checkInTime']), defaultSerializer); + Optional _checkOutTime = Optional.optional((json) => json['checkOutTime'] = Timestamp.fromJson(json['checkOutTime']), defaultSerializer); + String roleId; + + final FirebaseDataConnect _dataConnect; UpdateApplicationStatusVariablesBuilder shiftId(String? t) { + _shiftId.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder status(ApplicationStatus? t) { + _status.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder checkInTime(Timestamp? t) { + _checkInTime.value = t; + return this; + } + UpdateApplicationStatusVariablesBuilder checkOutTime(Timestamp? t) { + _checkOutTime.value = t; + return this; + } + + UpdateApplicationStatusVariablesBuilder(this._dataConnect, {required this.id,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateApplicationStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateApplicationStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateApplicationStatusVariables vars= UpdateApplicationStatusVariables(id: id,shiftId: _shiftId,staffId: _staffId,status: _status,checkInTime: _checkInTime,checkOutTime: _checkOutTime,roleId: roleId,); + return _dataConnect.mutation("updateApplicationStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateApplicationStatusApplicationUpdate { + final String id; + UpdateApplicationStatusApplicationUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateApplicationStatusApplicationUpdate otherTyped = other as UpdateApplicationStatusApplicationUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateApplicationStatusApplicationUpdate({ + required this.id, + }); +} + +@immutable +class UpdateApplicationStatusData { + final UpdateApplicationStatusApplicationUpdate? application_update; + UpdateApplicationStatusData.fromJson(dynamic json): + + application_update = json['application_update'] == null ? null : UpdateApplicationStatusApplicationUpdate.fromJson(json['application_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateApplicationStatusData otherTyped = other as UpdateApplicationStatusData; + return application_update == otherTyped.application_update; + + } + @override + int get hashCode => application_update.hashCode; + + + Map toJson() { + Map json = {}; + if (application_update != null) { + json['application_update'] = application_update!.toJson(); + } + return json; + } + + UpdateApplicationStatusData({ + this.application_update, + }); +} + +@immutable +class UpdateApplicationStatusVariables { + final String id; + late final OptionalshiftId; + late final OptionalstaffId; + late final Optionalstatus; + late final OptionalcheckInTime; + late final OptionalcheckOutTime; + final String roleId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateApplicationStatusVariables.fromJson(Map json): + + id = nativeFromJson(json['id']), + roleId = nativeFromJson(json['roleId']) { + + + + shiftId = Optional.optional(nativeFromJson, nativeToJson); + shiftId.value = json['shiftId'] == null ? null : nativeFromJson(json['shiftId']); + + + staffId = Optional.optional(nativeFromJson, nativeToJson); + staffId.value = json['staffId'] == null ? null : nativeFromJson(json['staffId']); + + + status = Optional.optional((data) => ApplicationStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : ApplicationStatus.values.byName(json['status']); + + + checkInTime = Optional.optional((json) => json['checkInTime'] = Timestamp.fromJson(json['checkInTime']), defaultSerializer); + checkInTime.value = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']); + + + checkOutTime = Optional.optional((json) => json['checkOutTime'] = Timestamp.fromJson(json['checkOutTime']), defaultSerializer); + checkOutTime.value = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']); + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateApplicationStatusVariables otherTyped = other as UpdateApplicationStatusVariables; + return id == otherTyped.id && + shiftId == otherTyped.shiftId && + staffId == otherTyped.staffId && + status == otherTyped.status && + checkInTime == otherTyped.checkInTime && + checkOutTime == otherTyped.checkOutTime && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, checkInTime.hashCode, checkOutTime.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(shiftId.state == OptionalState.set) { + json['shiftId'] = shiftId.toJson(); + } + if(staffId.state == OptionalState.set) { + json['staffId'] = staffId.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(checkInTime.state == OptionalState.set) { + json['checkInTime'] = checkInTime.toJson(); + } + if(checkOutTime.state == OptionalState.set) { + json['checkOutTime'] = checkOutTime.toJson(); + } + json['roleId'] = nativeToJson(roleId); + return json; + } + + UpdateApplicationStatusVariables({ + required this.id, + required this.shiftId, + required this.staffId, + required this.status, + required this.checkInTime, + required this.checkOutTime, + required this.roleId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_assignment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_assignment.dart new file mode 100644 index 00000000..940cad0b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_assignment.dart @@ -0,0 +1,293 @@ +part of 'generated.dart'; + +class UpdateAssignmentVariablesBuilder { + String id; + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _instructions = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => AssignmentStatus.values.byName(data), enumSerializer); + Optional _tipsAvailable = Optional.optional(nativeFromJson, nativeToJson); + Optional _travelTime = Optional.optional(nativeFromJson, nativeToJson); + Optional _mealProvided = Optional.optional(nativeFromJson, nativeToJson); + Optional _parkingAvailable = Optional.optional(nativeFromJson, nativeToJson); + Optional _gasCompensation = Optional.optional(nativeFromJson, nativeToJson); + Optional> _managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + String roleId; + String shiftId; + + final FirebaseDataConnect _dataConnect; UpdateAssignmentVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateAssignmentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateAssignmentVariablesBuilder instructions(String? t) { + _instructions.value = t; + return this; + } + UpdateAssignmentVariablesBuilder status(AssignmentStatus? t) { + _status.value = t; + return this; + } + UpdateAssignmentVariablesBuilder tipsAvailable(bool? t) { + _tipsAvailable.value = t; + return this; + } + UpdateAssignmentVariablesBuilder travelTime(bool? t) { + _travelTime.value = t; + return this; + } + UpdateAssignmentVariablesBuilder mealProvided(bool? t) { + _mealProvided.value = t; + return this; + } + UpdateAssignmentVariablesBuilder parkingAvailable(bool? t) { + _parkingAvailable.value = t; + return this; + } + UpdateAssignmentVariablesBuilder gasCompensation(bool? t) { + _gasCompensation.value = t; + return this; + } + UpdateAssignmentVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + + UpdateAssignmentVariablesBuilder(this._dataConnect, {required this.id,required this.roleId,required this.shiftId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateAssignmentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateAssignmentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateAssignmentVariables vars= UpdateAssignmentVariables(id: id,title: _title,description: _description,instructions: _instructions,status: _status,tipsAvailable: _tipsAvailable,travelTime: _travelTime,mealProvided: _mealProvided,parkingAvailable: _parkingAvailable,gasCompensation: _gasCompensation,managers: _managers,roleId: roleId,shiftId: shiftId,); + return _dataConnect.mutation("UpdateAssignment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateAssignmentAssignmentUpdate { + final String id; + UpdateAssignmentAssignmentUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAssignmentAssignmentUpdate otherTyped = other as UpdateAssignmentAssignmentUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateAssignmentAssignmentUpdate({ + required this.id, + }); +} + +@immutable +class UpdateAssignmentData { + final UpdateAssignmentAssignmentUpdate? assignment_update; + UpdateAssignmentData.fromJson(dynamic json): + + assignment_update = json['assignment_update'] == null ? null : UpdateAssignmentAssignmentUpdate.fromJson(json['assignment_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAssignmentData otherTyped = other as UpdateAssignmentData; + return assignment_update == otherTyped.assignment_update; + + } + @override + int get hashCode => assignment_update.hashCode; + + + Map toJson() { + Map json = {}; + if (assignment_update != null) { + json['assignment_update'] = assignment_update!.toJson(); + } + return json; + } + + UpdateAssignmentData({ + this.assignment_update, + }); +} + +@immutable +class UpdateAssignmentVariables { + final String id; + late final Optionaltitle; + late final Optionaldescription; + late final Optionalinstructions; + late final Optionalstatus; + late final OptionaltipsAvailable; + late final OptionaltravelTime; + late final OptionalmealProvided; + late final OptionalparkingAvailable; + late final OptionalgasCompensation; + late final Optional>managers; + final String roleId; + final String shiftId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateAssignmentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']), + roleId = nativeFromJson(json['roleId']), + shiftId = nativeFromJson(json['shiftId']) { + + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + instructions = Optional.optional(nativeFromJson, nativeToJson); + instructions.value = json['instructions'] == null ? null : nativeFromJson(json['instructions']); + + + status = Optional.optional((data) => AssignmentStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : AssignmentStatus.values.byName(json['status']); + + + tipsAvailable = Optional.optional(nativeFromJson, nativeToJson); + tipsAvailable.value = json['tipsAvailable'] == null ? null : nativeFromJson(json['tipsAvailable']); + + + travelTime = Optional.optional(nativeFromJson, nativeToJson); + travelTime.value = json['travelTime'] == null ? null : nativeFromJson(json['travelTime']); + + + mealProvided = Optional.optional(nativeFromJson, nativeToJson); + mealProvided.value = json['mealProvided'] == null ? null : nativeFromJson(json['mealProvided']); + + + parkingAvailable = Optional.optional(nativeFromJson, nativeToJson); + parkingAvailable.value = json['parkingAvailable'] == null ? null : nativeFromJson(json['parkingAvailable']); + + + gasCompensation = Optional.optional(nativeFromJson, nativeToJson); + gasCompensation.value = json['gasCompensation'] == null ? null : nativeFromJson(json['gasCompensation']); + + + managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + managers.value = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(); + + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAssignmentVariables otherTyped = other as UpdateAssignmentVariables; + return id == otherTyped.id && + title == otherTyped.title && + description == otherTyped.description && + instructions == otherTyped.instructions && + status == otherTyped.status && + tipsAvailable == otherTyped.tipsAvailable && + travelTime == otherTyped.travelTime && + mealProvided == otherTyped.mealProvided && + parkingAvailable == otherTyped.parkingAvailable && + gasCompensation == otherTyped.gasCompensation && + managers == otherTyped.managers && + roleId == otherTyped.roleId && + shiftId == otherTyped.shiftId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, description.hashCode, instructions.hashCode, status.hashCode, tipsAvailable.hashCode, travelTime.hashCode, mealProvided.hashCode, parkingAvailable.hashCode, gasCompensation.hashCode, managers.hashCode, roleId.hashCode, shiftId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(instructions.state == OptionalState.set) { + json['instructions'] = instructions.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(tipsAvailable.state == OptionalState.set) { + json['tipsAvailable'] = tipsAvailable.toJson(); + } + if(travelTime.state == OptionalState.set) { + json['travelTime'] = travelTime.toJson(); + } + if(mealProvided.state == OptionalState.set) { + json['mealProvided'] = mealProvided.toJson(); + } + if(parkingAvailable.state == OptionalState.set) { + json['parkingAvailable'] = parkingAvailable.toJson(); + } + if(gasCompensation.state == OptionalState.set) { + json['gasCompensation'] = gasCompensation.toJson(); + } + if(managers.state == OptionalState.set) { + json['managers'] = managers.toJson(); + } + json['roleId'] = nativeToJson(roleId); + json['shiftId'] = nativeToJson(shiftId); + return json; + } + + UpdateAssignmentVariables({ + required this.id, + required this.title, + required this.description, + required this.instructions, + required this.status, + required this.tipsAvailable, + required this.travelTime, + required this.mealProvided, + required this.parkingAvailable, + required this.gasCompensation, + required this.managers, + required this.roleId, + required this.shiftId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_attire_option.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_attire_option.dart new file mode 100644 index 00000000..8644bbf1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_attire_option.dart @@ -0,0 +1,217 @@ +part of 'generated.dart'; + +class UpdateAttireOptionVariablesBuilder { + String id; + Optional _itemId = Optional.optional(nativeFromJson, nativeToJson); + Optional _label = Optional.optional(nativeFromJson, nativeToJson); + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + Optional _imageUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _isMandatory = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateAttireOptionVariablesBuilder itemId(String? t) { + _itemId.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder label(String? t) { + _label.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder imageUrl(String? t) { + _imageUrl.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder isMandatory(bool? t) { + _isMandatory.value = t; + return this; + } + UpdateAttireOptionVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + + UpdateAttireOptionVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateAttireOptionData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateAttireOptionVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateAttireOptionVariables vars= UpdateAttireOptionVariables(id: id,itemId: _itemId,label: _label,icon: _icon,imageUrl: _imageUrl,isMandatory: _isMandatory,vendorId: _vendorId,); + return _dataConnect.mutation("updateAttireOption", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateAttireOptionAttireOptionUpdate { + final String id; + UpdateAttireOptionAttireOptionUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAttireOptionAttireOptionUpdate otherTyped = other as UpdateAttireOptionAttireOptionUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateAttireOptionAttireOptionUpdate({ + required this.id, + }); +} + +@immutable +class UpdateAttireOptionData { + final UpdateAttireOptionAttireOptionUpdate? attireOption_update; + UpdateAttireOptionData.fromJson(dynamic json): + + attireOption_update = json['attireOption_update'] == null ? null : UpdateAttireOptionAttireOptionUpdate.fromJson(json['attireOption_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAttireOptionData otherTyped = other as UpdateAttireOptionData; + return attireOption_update == otherTyped.attireOption_update; + + } + @override + int get hashCode => attireOption_update.hashCode; + + + Map toJson() { + Map json = {}; + if (attireOption_update != null) { + json['attireOption_update'] = attireOption_update!.toJson(); + } + return json; + } + + UpdateAttireOptionData({ + this.attireOption_update, + }); +} + +@immutable +class UpdateAttireOptionVariables { + final String id; + late final OptionalitemId; + late final Optionallabel; + late final Optionalicon; + late final OptionalimageUrl; + late final OptionalisMandatory; + late final OptionalvendorId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateAttireOptionVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + itemId = Optional.optional(nativeFromJson, nativeToJson); + itemId.value = json['itemId'] == null ? null : nativeFromJson(json['itemId']); + + + label = Optional.optional(nativeFromJson, nativeToJson); + label.value = json['label'] == null ? null : nativeFromJson(json['label']); + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + + imageUrl = Optional.optional(nativeFromJson, nativeToJson); + imageUrl.value = json['imageUrl'] == null ? null : nativeFromJson(json['imageUrl']); + + + isMandatory = Optional.optional(nativeFromJson, nativeToJson); + isMandatory.value = json['isMandatory'] == null ? null : nativeFromJson(json['isMandatory']); + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateAttireOptionVariables otherTyped = other as UpdateAttireOptionVariables; + return id == otherTyped.id && + itemId == otherTyped.itemId && + label == otherTyped.label && + icon == otherTyped.icon && + imageUrl == otherTyped.imageUrl && + isMandatory == otherTyped.isMandatory && + vendorId == otherTyped.vendorId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, itemId.hashCode, label.hashCode, icon.hashCode, imageUrl.hashCode, isMandatory.hashCode, vendorId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(itemId.state == OptionalState.set) { + json['itemId'] = itemId.toJson(); + } + if(label.state == OptionalState.set) { + json['label'] = label.toJson(); + } + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + if(imageUrl.state == OptionalState.set) { + json['imageUrl'] = imageUrl.toJson(); + } + if(isMandatory.state == OptionalState.set) { + json['isMandatory'] = isMandatory.toJson(); + } + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + return json; + } + + UpdateAttireOptionVariables({ + required this.id, + required this.itemId, + required this.label, + required this.icon, + required this.imageUrl, + required this.isMandatory, + required this.vendorId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_benefits_data.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_benefits_data.dart new file mode 100644 index 00000000..a087af12 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_benefits_data.dart @@ -0,0 +1,154 @@ +part of 'generated.dart'; + +class UpdateBenefitsDataVariablesBuilder { + String staffId; + String vendorBenefitPlanId; + Optional _current = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateBenefitsDataVariablesBuilder current(int? t) { + _current.value = t; + return this; + } + + UpdateBenefitsDataVariablesBuilder(this._dataConnect, {required this.staffId,required this.vendorBenefitPlanId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateBenefitsDataData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateBenefitsDataVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateBenefitsDataVariables vars= UpdateBenefitsDataVariables(staffId: staffId,vendorBenefitPlanId: vendorBenefitPlanId,current: _current,); + return _dataConnect.mutation("updateBenefitsData", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateBenefitsDataBenefitsDataUpdate { + final String vendorBenefitPlanId; + final String staffId; + UpdateBenefitsDataBenefitsDataUpdate.fromJson(dynamic json): + + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']), + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateBenefitsDataBenefitsDataUpdate otherTyped = other as UpdateBenefitsDataBenefitsDataUpdate; + return vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + staffId == otherTyped.staffId; + + } + @override + int get hashCode => Object.hashAll([vendorBenefitPlanId.hashCode, staffId.hashCode]); + + + Map toJson() { + Map json = {}; + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + json['staffId'] = nativeToJson(staffId); + return json; + } + + UpdateBenefitsDataBenefitsDataUpdate({ + required this.vendorBenefitPlanId, + required this.staffId, + }); +} + +@immutable +class UpdateBenefitsDataData { + final UpdateBenefitsDataBenefitsDataUpdate? benefitsData_update; + UpdateBenefitsDataData.fromJson(dynamic json): + + benefitsData_update = json['benefitsData_update'] == null ? null : UpdateBenefitsDataBenefitsDataUpdate.fromJson(json['benefitsData_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateBenefitsDataData otherTyped = other as UpdateBenefitsDataData; + return benefitsData_update == otherTyped.benefitsData_update; + + } + @override + int get hashCode => benefitsData_update.hashCode; + + + Map toJson() { + Map json = {}; + if (benefitsData_update != null) { + json['benefitsData_update'] = benefitsData_update!.toJson(); + } + return json; + } + + UpdateBenefitsDataData({ + this.benefitsData_update, + }); +} + +@immutable +class UpdateBenefitsDataVariables { + final String staffId; + final String vendorBenefitPlanId; + late final Optionalcurrent; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateBenefitsDataVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + vendorBenefitPlanId = nativeFromJson(json['vendorBenefitPlanId']) { + + + + + current = Optional.optional(nativeFromJson, nativeToJson); + current.value = json['current'] == null ? null : nativeFromJson(json['current']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateBenefitsDataVariables otherTyped = other as UpdateBenefitsDataVariables; + return staffId == otherTyped.staffId && + vendorBenefitPlanId == otherTyped.vendorBenefitPlanId && + current == otherTyped.current; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, vendorBenefitPlanId.hashCode, current.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['vendorBenefitPlanId'] = nativeToJson(vendorBenefitPlanId); + if(current.state == OptionalState.set) { + json['current'] = current.toJson(); + } + return json; + } + + UpdateBenefitsDataVariables({ + required this.staffId, + required this.vendorBenefitPlanId, + required this.current, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_business.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_business.dart new file mode 100644 index 00000000..f5f1760a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_business.dart @@ -0,0 +1,322 @@ +part of 'generated.dart'; + +class UpdateBusinessVariablesBuilder { + String id; + Optional _businessName = Optional.optional(nativeFromJson, nativeToJson); + Optional _contactName = Optional.optional(nativeFromJson, nativeToJson); + Optional _companyLogoUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _phone = Optional.optional(nativeFromJson, nativeToJson); + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _hubBuilding = Optional.optional(nativeFromJson, nativeToJson); + Optional _address = Optional.optional(nativeFromJson, nativeToJson); + Optional _city = Optional.optional(nativeFromJson, nativeToJson); + Optional _area = Optional.optional((data) => BusinessArea.values.byName(data), enumSerializer); + Optional _sector = Optional.optional((data) => BusinessSector.values.byName(data), enumSerializer); + Optional _rateGroup = Optional.optional((data) => BusinessRateGroup.values.byName(data), enumSerializer); + Optional _status = Optional.optional((data) => BusinessStatus.values.byName(data), enumSerializer); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateBusinessVariablesBuilder businessName(String? t) { + _businessName.value = t; + return this; + } + UpdateBusinessVariablesBuilder contactName(String? t) { + _contactName.value = t; + return this; + } + UpdateBusinessVariablesBuilder companyLogoUrl(String? t) { + _companyLogoUrl.value = t; + return this; + } + UpdateBusinessVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateBusinessVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateBusinessVariablesBuilder hubBuilding(String? t) { + _hubBuilding.value = t; + return this; + } + UpdateBusinessVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateBusinessVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateBusinessVariablesBuilder area(BusinessArea? t) { + _area.value = t; + return this; + } + UpdateBusinessVariablesBuilder sector(BusinessSector? t) { + _sector.value = t; + return this; + } + UpdateBusinessVariablesBuilder rateGroup(BusinessRateGroup? t) { + _rateGroup.value = t; + return this; + } + UpdateBusinessVariablesBuilder status(BusinessStatus? t) { + _status.value = t; + return this; + } + UpdateBusinessVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + UpdateBusinessVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateBusinessData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateBusinessVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateBusinessVariables vars= UpdateBusinessVariables(id: id,businessName: _businessName,contactName: _contactName,companyLogoUrl: _companyLogoUrl,phone: _phone,email: _email,hubBuilding: _hubBuilding,address: _address,city: _city,area: _area,sector: _sector,rateGroup: _rateGroup,status: _status,notes: _notes,); + return _dataConnect.mutation("updateBusiness", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateBusinessBusinessUpdate { + final String id; + UpdateBusinessBusinessUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateBusinessBusinessUpdate otherTyped = other as UpdateBusinessBusinessUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateBusinessBusinessUpdate({ + required this.id, + }); +} + +@immutable +class UpdateBusinessData { + final UpdateBusinessBusinessUpdate? business_update; + UpdateBusinessData.fromJson(dynamic json): + + business_update = json['business_update'] == null ? null : UpdateBusinessBusinessUpdate.fromJson(json['business_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateBusinessData otherTyped = other as UpdateBusinessData; + return business_update == otherTyped.business_update; + + } + @override + int get hashCode => business_update.hashCode; + + + Map toJson() { + Map json = {}; + if (business_update != null) { + json['business_update'] = business_update!.toJson(); + } + return json; + } + + UpdateBusinessData({ + this.business_update, + }); +} + +@immutable +class UpdateBusinessVariables { + final String id; + late final OptionalbusinessName; + late final OptionalcontactName; + late final OptionalcompanyLogoUrl; + late final Optionalphone; + late final Optionalemail; + late final OptionalhubBuilding; + late final Optionaladdress; + late final Optionalcity; + late final Optionalarea; + late final Optionalsector; + late final OptionalrateGroup; + late final Optionalstatus; + late final Optionalnotes; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateBusinessVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + businessName = Optional.optional(nativeFromJson, nativeToJson); + businessName.value = json['businessName'] == null ? null : nativeFromJson(json['businessName']); + + + contactName = Optional.optional(nativeFromJson, nativeToJson); + contactName.value = json['contactName'] == null ? null : nativeFromJson(json['contactName']); + + + companyLogoUrl = Optional.optional(nativeFromJson, nativeToJson); + companyLogoUrl.value = json['companyLogoUrl'] == null ? null : nativeFromJson(json['companyLogoUrl']); + + + phone = Optional.optional(nativeFromJson, nativeToJson); + phone.value = json['phone'] == null ? null : nativeFromJson(json['phone']); + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + hubBuilding = Optional.optional(nativeFromJson, nativeToJson); + hubBuilding.value = json['hubBuilding'] == null ? null : nativeFromJson(json['hubBuilding']); + + + address = Optional.optional(nativeFromJson, nativeToJson); + address.value = json['address'] == null ? null : nativeFromJson(json['address']); + + + city = Optional.optional(nativeFromJson, nativeToJson); + city.value = json['city'] == null ? null : nativeFromJson(json['city']); + + + area = Optional.optional((data) => BusinessArea.values.byName(data), enumSerializer); + area.value = json['area'] == null ? null : BusinessArea.values.byName(json['area']); + + + sector = Optional.optional((data) => BusinessSector.values.byName(data), enumSerializer); + sector.value = json['sector'] == null ? null : BusinessSector.values.byName(json['sector']); + + + rateGroup = Optional.optional((data) => BusinessRateGroup.values.byName(data), enumSerializer); + rateGroup.value = json['rateGroup'] == null ? null : BusinessRateGroup.values.byName(json['rateGroup']); + + + status = Optional.optional((data) => BusinessStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : BusinessStatus.values.byName(json['status']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateBusinessVariables otherTyped = other as UpdateBusinessVariables; + return id == otherTyped.id && + businessName == otherTyped.businessName && + contactName == otherTyped.contactName && + companyLogoUrl == otherTyped.companyLogoUrl && + phone == otherTyped.phone && + email == otherTyped.email && + hubBuilding == otherTyped.hubBuilding && + address == otherTyped.address && + city == otherTyped.city && + area == otherTyped.area && + sector == otherTyped.sector && + rateGroup == otherTyped.rateGroup && + status == otherTyped.status && + notes == otherTyped.notes; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, contactName.hashCode, companyLogoUrl.hashCode, phone.hashCode, email.hashCode, hubBuilding.hashCode, address.hashCode, city.hashCode, area.hashCode, sector.hashCode, rateGroup.hashCode, status.hashCode, notes.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(businessName.state == OptionalState.set) { + json['businessName'] = businessName.toJson(); + } + if(contactName.state == OptionalState.set) { + json['contactName'] = contactName.toJson(); + } + if(companyLogoUrl.state == OptionalState.set) { + json['companyLogoUrl'] = companyLogoUrl.toJson(); + } + if(phone.state == OptionalState.set) { + json['phone'] = phone.toJson(); + } + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(hubBuilding.state == OptionalState.set) { + json['hubBuilding'] = hubBuilding.toJson(); + } + if(address.state == OptionalState.set) { + json['address'] = address.toJson(); + } + if(city.state == OptionalState.set) { + json['city'] = city.toJson(); + } + if(area.state == OptionalState.set) { + json['area'] = area.toJson(); + } + if(sector.state == OptionalState.set) { + json['sector'] = sector.toJson(); + } + if(rateGroup.state == OptionalState.set) { + json['rateGroup'] = rateGroup.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + return json; + } + + UpdateBusinessVariables({ + required this.id, + required this.businessName, + required this.contactName, + required this.companyLogoUrl, + required this.phone, + required this.email, + required this.hubBuilding, + required this.address, + required this.city, + required this.area, + required this.sector, + required this.rateGroup, + required this.status, + required this.notes, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_category.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_category.dart new file mode 100644 index 00000000..1fdfde46 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_category.dart @@ -0,0 +1,172 @@ +part of 'generated.dart'; + +class UpdateCategoryVariablesBuilder { + String id; + Optional _categoryId = Optional.optional(nativeFromJson, nativeToJson); + Optional _label = Optional.optional(nativeFromJson, nativeToJson); + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateCategoryVariablesBuilder categoryId(String? t) { + _categoryId.value = t; + return this; + } + UpdateCategoryVariablesBuilder label(String? t) { + _label.value = t; + return this; + } + UpdateCategoryVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + + UpdateCategoryVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateCategoryData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateCategoryVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateCategoryVariables vars= UpdateCategoryVariables(id: id,categoryId: _categoryId,label: _label,icon: _icon,); + return _dataConnect.mutation("updateCategory", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateCategoryCategoryUpdate { + final String id; + UpdateCategoryCategoryUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCategoryCategoryUpdate otherTyped = other as UpdateCategoryCategoryUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateCategoryCategoryUpdate({ + required this.id, + }); +} + +@immutable +class UpdateCategoryData { + final UpdateCategoryCategoryUpdate? category_update; + UpdateCategoryData.fromJson(dynamic json): + + category_update = json['category_update'] == null ? null : UpdateCategoryCategoryUpdate.fromJson(json['category_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCategoryData otherTyped = other as UpdateCategoryData; + return category_update == otherTyped.category_update; + + } + @override + int get hashCode => category_update.hashCode; + + + Map toJson() { + Map json = {}; + if (category_update != null) { + json['category_update'] = category_update!.toJson(); + } + return json; + } + + UpdateCategoryData({ + this.category_update, + }); +} + +@immutable +class UpdateCategoryVariables { + final String id; + late final OptionalcategoryId; + late final Optionallabel; + late final Optionalicon; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateCategoryVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + categoryId = Optional.optional(nativeFromJson, nativeToJson); + categoryId.value = json['categoryId'] == null ? null : nativeFromJson(json['categoryId']); + + + label = Optional.optional(nativeFromJson, nativeToJson); + label.value = json['label'] == null ? null : nativeFromJson(json['label']); + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCategoryVariables otherTyped = other as UpdateCategoryVariables; + return id == otherTyped.id && + categoryId == otherTyped.categoryId && + label == otherTyped.label && + icon == otherTyped.icon; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, categoryId.hashCode, label.hashCode, icon.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(categoryId.state == OptionalState.set) { + json['categoryId'] = categoryId.toJson(); + } + if(label.state == OptionalState.set) { + json['label'] = label.toJson(); + } + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + return json; + } + + UpdateCategoryVariables({ + required this.id, + required this.categoryId, + required this.label, + required this.icon, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_certificate.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_certificate.dart new file mode 100644 index 00000000..7dfc4207 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_certificate.dart @@ -0,0 +1,292 @@ +part of 'generated.dart'; + +class UpdateCertificateVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _expiry = Optional.optional((json) => json['expiry'] = Timestamp.fromJson(json['expiry']), defaultSerializer); + Optional _status = Optional.optional((data) => CertificateStatus.values.byName(data), enumSerializer); + Optional _fileUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + Optional _staffId = Optional.optional(nativeFromJson, nativeToJson); + Optional _certificationType = Optional.optional((data) => ComplianceType.values.byName(data), enumSerializer); + Optional _issuer = Optional.optional(nativeFromJson, nativeToJson); + Optional _validationStatus = Optional.optional((data) => ValidationStatus.values.byName(data), enumSerializer); + Optional _certificateNumber = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateCertificateVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateCertificateVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateCertificateVariablesBuilder expiry(Timestamp? t) { + _expiry.value = t; + return this; + } + UpdateCertificateVariablesBuilder status(CertificateStatus? t) { + _status.value = t; + return this; + } + UpdateCertificateVariablesBuilder fileUrl(String? t) { + _fileUrl.value = t; + return this; + } + UpdateCertificateVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + UpdateCertificateVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + UpdateCertificateVariablesBuilder certificationType(ComplianceType? t) { + _certificationType.value = t; + return this; + } + UpdateCertificateVariablesBuilder issuer(String? t) { + _issuer.value = t; + return this; + } + UpdateCertificateVariablesBuilder validationStatus(ValidationStatus? t) { + _validationStatus.value = t; + return this; + } + UpdateCertificateVariablesBuilder certificateNumber(String? t) { + _certificateNumber.value = t; + return this; + } + + UpdateCertificateVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateCertificateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateCertificateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateCertificateVariables vars= UpdateCertificateVariables(id: id,name: _name,description: _description,expiry: _expiry,status: _status,fileUrl: _fileUrl,icon: _icon,staffId: _staffId,certificationType: _certificationType,issuer: _issuer,validationStatus: _validationStatus,certificateNumber: _certificateNumber,); + return _dataConnect.mutation("UpdateCertificate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateCertificateCertificateUpdate { + final String id; + UpdateCertificateCertificateUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCertificateCertificateUpdate otherTyped = other as UpdateCertificateCertificateUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateCertificateCertificateUpdate({ + required this.id, + }); +} + +@immutable +class UpdateCertificateData { + final UpdateCertificateCertificateUpdate? certificate_update; + UpdateCertificateData.fromJson(dynamic json): + + certificate_update = json['certificate_update'] == null ? null : UpdateCertificateCertificateUpdate.fromJson(json['certificate_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCertificateData otherTyped = other as UpdateCertificateData; + return certificate_update == otherTyped.certificate_update; + + } + @override + int get hashCode => certificate_update.hashCode; + + + Map toJson() { + Map json = {}; + if (certificate_update != null) { + json['certificate_update'] = certificate_update!.toJson(); + } + return json; + } + + UpdateCertificateData({ + this.certificate_update, + }); +} + +@immutable +class UpdateCertificateVariables { + final String id; + late final Optionalname; + late final Optionaldescription; + late final Optionalexpiry; + late final Optionalstatus; + late final OptionalfileUrl; + late final Optionalicon; + late final OptionalstaffId; + late final OptionalcertificationType; + late final Optionalissuer; + late final OptionalvalidationStatus; + late final OptionalcertificateNumber; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateCertificateVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + expiry = Optional.optional((json) => json['expiry'] = Timestamp.fromJson(json['expiry']), defaultSerializer); + expiry.value = json['expiry'] == null ? null : Timestamp.fromJson(json['expiry']); + + + status = Optional.optional((data) => CertificateStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : CertificateStatus.values.byName(json['status']); + + + fileUrl = Optional.optional(nativeFromJson, nativeToJson); + fileUrl.value = json['fileUrl'] == null ? null : nativeFromJson(json['fileUrl']); + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + + staffId = Optional.optional(nativeFromJson, nativeToJson); + staffId.value = json['staffId'] == null ? null : nativeFromJson(json['staffId']); + + + certificationType = Optional.optional((data) => ComplianceType.values.byName(data), enumSerializer); + certificationType.value = json['certificationType'] == null ? null : ComplianceType.values.byName(json['certificationType']); + + + issuer = Optional.optional(nativeFromJson, nativeToJson); + issuer.value = json['issuer'] == null ? null : nativeFromJson(json['issuer']); + + + validationStatus = Optional.optional((data) => ValidationStatus.values.byName(data), enumSerializer); + validationStatus.value = json['validationStatus'] == null ? null : ValidationStatus.values.byName(json['validationStatus']); + + + certificateNumber = Optional.optional(nativeFromJson, nativeToJson); + certificateNumber.value = json['certificateNumber'] == null ? null : nativeFromJson(json['certificateNumber']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCertificateVariables otherTyped = other as UpdateCertificateVariables; + return id == otherTyped.id && + name == otherTyped.name && + description == otherTyped.description && + expiry == otherTyped.expiry && + status == otherTyped.status && + fileUrl == otherTyped.fileUrl && + icon == otherTyped.icon && + staffId == otherTyped.staffId && + certificationType == otherTyped.certificationType && + issuer == otherTyped.issuer && + validationStatus == otherTyped.validationStatus && + certificateNumber == otherTyped.certificateNumber; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, description.hashCode, expiry.hashCode, status.hashCode, fileUrl.hashCode, icon.hashCode, staffId.hashCode, certificationType.hashCode, issuer.hashCode, validationStatus.hashCode, certificateNumber.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(expiry.state == OptionalState.set) { + json['expiry'] = expiry.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(fileUrl.state == OptionalState.set) { + json['fileUrl'] = fileUrl.toJson(); + } + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + if(staffId.state == OptionalState.set) { + json['staffId'] = staffId.toJson(); + } + if(certificationType.state == OptionalState.set) { + json['certificationType'] = certificationType.toJson(); + } + if(issuer.state == OptionalState.set) { + json['issuer'] = issuer.toJson(); + } + if(validationStatus.state == OptionalState.set) { + json['validationStatus'] = validationStatus.toJson(); + } + if(certificateNumber.state == OptionalState.set) { + json['certificateNumber'] = certificateNumber.toJson(); + } + return json; + } + + UpdateCertificateVariables({ + required this.id, + required this.name, + required this.description, + required this.expiry, + required this.status, + required this.fileUrl, + required this.icon, + required this.staffId, + required this.certificationType, + required this.issuer, + required this.validationStatus, + required this.certificateNumber, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_client_feedback.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_client_feedback.dart new file mode 100644 index 00000000..4bb86003 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_client_feedback.dart @@ -0,0 +1,217 @@ +part of 'generated.dart'; + +class UpdateClientFeedbackVariablesBuilder { + String id; + Optional _businessId = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _rating = Optional.optional(nativeFromJson, nativeToJson); + Optional _comment = Optional.optional(nativeFromJson, nativeToJson); + Optional _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + Optional _createdBy = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateClientFeedbackVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder rating(int? t) { + _rating.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder comment(String? t) { + _comment.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + UpdateClientFeedbackVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + UpdateClientFeedbackVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateClientFeedbackData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateClientFeedbackVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateClientFeedbackVariables vars= UpdateClientFeedbackVariables(id: id,businessId: _businessId,vendorId: _vendorId,rating: _rating,comment: _comment,date: _date,createdBy: _createdBy,); + return _dataConnect.mutation("updateClientFeedback", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateClientFeedbackClientFeedbackUpdate { + final String id; + UpdateClientFeedbackClientFeedbackUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateClientFeedbackClientFeedbackUpdate otherTyped = other as UpdateClientFeedbackClientFeedbackUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateClientFeedbackClientFeedbackUpdate({ + required this.id, + }); +} + +@immutable +class UpdateClientFeedbackData { + final UpdateClientFeedbackClientFeedbackUpdate? clientFeedback_update; + UpdateClientFeedbackData.fromJson(dynamic json): + + clientFeedback_update = json['clientFeedback_update'] == null ? null : UpdateClientFeedbackClientFeedbackUpdate.fromJson(json['clientFeedback_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateClientFeedbackData otherTyped = other as UpdateClientFeedbackData; + return clientFeedback_update == otherTyped.clientFeedback_update; + + } + @override + int get hashCode => clientFeedback_update.hashCode; + + + Map toJson() { + Map json = {}; + if (clientFeedback_update != null) { + json['clientFeedback_update'] = clientFeedback_update!.toJson(); + } + return json; + } + + UpdateClientFeedbackData({ + this.clientFeedback_update, + }); +} + +@immutable +class UpdateClientFeedbackVariables { + final String id; + late final OptionalbusinessId; + late final OptionalvendorId; + late final Optionalrating; + late final Optionalcomment; + late final Optionaldate; + late final OptionalcreatedBy; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateClientFeedbackVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + businessId = Optional.optional(nativeFromJson, nativeToJson); + businessId.value = json['businessId'] == null ? null : nativeFromJson(json['businessId']); + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + rating = Optional.optional(nativeFromJson, nativeToJson); + rating.value = json['rating'] == null ? null : nativeFromJson(json['rating']); + + + comment = Optional.optional(nativeFromJson, nativeToJson); + comment.value = json['comment'] == null ? null : nativeFromJson(json['comment']); + + + date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']); + + + createdBy = Optional.optional(nativeFromJson, nativeToJson); + createdBy.value = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateClientFeedbackVariables otherTyped = other as UpdateClientFeedbackVariables; + return id == otherTyped.id && + businessId == otherTyped.businessId && + vendorId == otherTyped.vendorId && + rating == otherTyped.rating && + comment == otherTyped.comment && + date == otherTyped.date && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, businessId.hashCode, vendorId.hashCode, rating.hashCode, comment.hashCode, date.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(businessId.state == OptionalState.set) { + json['businessId'] = businessId.toJson(); + } + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(rating.state == OptionalState.set) { + json['rating'] = rating.toJson(); + } + if(comment.state == OptionalState.set) { + json['comment'] = comment.toJson(); + } + if(date.state == OptionalState.set) { + json['date'] = date.toJson(); + } + if(createdBy.state == OptionalState.set) { + json['createdBy'] = createdBy.toJson(); + } + return json; + } + + UpdateClientFeedbackVariables({ + required this.id, + required this.businessId, + required this.vendorId, + required this.rating, + required this.comment, + required this.date, + required this.createdBy, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_conversation.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_conversation.dart new file mode 100644 index 00000000..8b89f213 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_conversation.dart @@ -0,0 +1,232 @@ +part of 'generated.dart'; + +class UpdateConversationVariablesBuilder { + String id; + Optional _subject = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => ConversationStatus.values.byName(data), enumSerializer); + Optional _conversationType = Optional.optional((data) => ConversationType.values.byName(data), enumSerializer); + Optional _isGroup = Optional.optional(nativeFromJson, nativeToJson); + Optional _groupName = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastMessage = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastMessageAt = Optional.optional((json) => json['lastMessageAt'] = Timestamp.fromJson(json['lastMessageAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateConversationVariablesBuilder subject(String? t) { + _subject.value = t; + return this; + } + UpdateConversationVariablesBuilder status(ConversationStatus? t) { + _status.value = t; + return this; + } + UpdateConversationVariablesBuilder conversationType(ConversationType? t) { + _conversationType.value = t; + return this; + } + UpdateConversationVariablesBuilder isGroup(bool? t) { + _isGroup.value = t; + return this; + } + UpdateConversationVariablesBuilder groupName(String? t) { + _groupName.value = t; + return this; + } + UpdateConversationVariablesBuilder lastMessage(String? t) { + _lastMessage.value = t; + return this; + } + UpdateConversationVariablesBuilder lastMessageAt(Timestamp? t) { + _lastMessageAt.value = t; + return this; + } + + UpdateConversationVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateConversationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateConversationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateConversationVariables vars= UpdateConversationVariables(id: id,subject: _subject,status: _status,conversationType: _conversationType,isGroup: _isGroup,groupName: _groupName,lastMessage: _lastMessage,lastMessageAt: _lastMessageAt,); + return _dataConnect.mutation("updateConversation", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateConversationConversationUpdate { + final String id; + UpdateConversationConversationUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateConversationConversationUpdate otherTyped = other as UpdateConversationConversationUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateConversationConversationUpdate({ + required this.id, + }); +} + +@immutable +class UpdateConversationData { + final UpdateConversationConversationUpdate? conversation_update; + UpdateConversationData.fromJson(dynamic json): + + conversation_update = json['conversation_update'] == null ? null : UpdateConversationConversationUpdate.fromJson(json['conversation_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateConversationData otherTyped = other as UpdateConversationData; + return conversation_update == otherTyped.conversation_update; + + } + @override + int get hashCode => conversation_update.hashCode; + + + Map toJson() { + Map json = {}; + if (conversation_update != null) { + json['conversation_update'] = conversation_update!.toJson(); + } + return json; + } + + UpdateConversationData({ + this.conversation_update, + }); +} + +@immutable +class UpdateConversationVariables { + final String id; + late final Optionalsubject; + late final Optionalstatus; + late final OptionalconversationType; + late final OptionalisGroup; + late final OptionalgroupName; + late final OptionallastMessage; + late final OptionallastMessageAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateConversationVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + subject = Optional.optional(nativeFromJson, nativeToJson); + subject.value = json['subject'] == null ? null : nativeFromJson(json['subject']); + + + status = Optional.optional((data) => ConversationStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : ConversationStatus.values.byName(json['status']); + + + conversationType = Optional.optional((data) => ConversationType.values.byName(data), enumSerializer); + conversationType.value = json['conversationType'] == null ? null : ConversationType.values.byName(json['conversationType']); + + + isGroup = Optional.optional(nativeFromJson, nativeToJson); + isGroup.value = json['isGroup'] == null ? null : nativeFromJson(json['isGroup']); + + + groupName = Optional.optional(nativeFromJson, nativeToJson); + groupName.value = json['groupName'] == null ? null : nativeFromJson(json['groupName']); + + + lastMessage = Optional.optional(nativeFromJson, nativeToJson); + lastMessage.value = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']); + + + lastMessageAt = Optional.optional((json) => json['lastMessageAt'] = Timestamp.fromJson(json['lastMessageAt']), defaultSerializer); + lastMessageAt.value = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateConversationVariables otherTyped = other as UpdateConversationVariables; + return id == otherTyped.id && + subject == otherTyped.subject && + status == otherTyped.status && + conversationType == otherTyped.conversationType && + isGroup == otherTyped.isGroup && + groupName == otherTyped.groupName && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, subject.hashCode, status.hashCode, conversationType.hashCode, isGroup.hashCode, groupName.hashCode, lastMessage.hashCode, lastMessageAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(subject.state == OptionalState.set) { + json['subject'] = subject.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(conversationType.state == OptionalState.set) { + json['conversationType'] = conversationType.toJson(); + } + if(isGroup.state == OptionalState.set) { + json['isGroup'] = isGroup.toJson(); + } + if(groupName.state == OptionalState.set) { + json['groupName'] = groupName.toJson(); + } + if(lastMessage.state == OptionalState.set) { + json['lastMessage'] = lastMessage.toJson(); + } + if(lastMessageAt.state == OptionalState.set) { + json['lastMessageAt'] = lastMessageAt.toJson(); + } + return json; + } + + UpdateConversationVariables({ + required this.id, + required this.subject, + required this.status, + required this.conversationType, + required this.isGroup, + required this.groupName, + required this.lastMessage, + required this.lastMessageAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_conversation_last_message.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_conversation_last_message.dart new file mode 100644 index 00000000..8ca20bac --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_conversation_last_message.dart @@ -0,0 +1,157 @@ +part of 'generated.dart'; + +class UpdateConversationLastMessageVariablesBuilder { + String id; + Optional _lastMessage = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastMessageAt = Optional.optional((json) => json['lastMessageAt'] = Timestamp.fromJson(json['lastMessageAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateConversationLastMessageVariablesBuilder lastMessage(String? t) { + _lastMessage.value = t; + return this; + } + UpdateConversationLastMessageVariablesBuilder lastMessageAt(Timestamp? t) { + _lastMessageAt.value = t; + return this; + } + + UpdateConversationLastMessageVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateConversationLastMessageData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateConversationLastMessageVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateConversationLastMessageVariables vars= UpdateConversationLastMessageVariables(id: id,lastMessage: _lastMessage,lastMessageAt: _lastMessageAt,); + return _dataConnect.mutation("updateConversationLastMessage", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateConversationLastMessageConversationUpdate { + final String id; + UpdateConversationLastMessageConversationUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateConversationLastMessageConversationUpdate otherTyped = other as UpdateConversationLastMessageConversationUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateConversationLastMessageConversationUpdate({ + required this.id, + }); +} + +@immutable +class UpdateConversationLastMessageData { + final UpdateConversationLastMessageConversationUpdate? conversation_update; + UpdateConversationLastMessageData.fromJson(dynamic json): + + conversation_update = json['conversation_update'] == null ? null : UpdateConversationLastMessageConversationUpdate.fromJson(json['conversation_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateConversationLastMessageData otherTyped = other as UpdateConversationLastMessageData; + return conversation_update == otherTyped.conversation_update; + + } + @override + int get hashCode => conversation_update.hashCode; + + + Map toJson() { + Map json = {}; + if (conversation_update != null) { + json['conversation_update'] = conversation_update!.toJson(); + } + return json; + } + + UpdateConversationLastMessageData({ + this.conversation_update, + }); +} + +@immutable +class UpdateConversationLastMessageVariables { + final String id; + late final OptionallastMessage; + late final OptionallastMessageAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateConversationLastMessageVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + lastMessage = Optional.optional(nativeFromJson, nativeToJson); + lastMessage.value = json['lastMessage'] == null ? null : nativeFromJson(json['lastMessage']); + + + lastMessageAt = Optional.optional((json) => json['lastMessageAt'] = Timestamp.fromJson(json['lastMessageAt']), defaultSerializer); + lastMessageAt.value = json['lastMessageAt'] == null ? null : Timestamp.fromJson(json['lastMessageAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateConversationLastMessageVariables otherTyped = other as UpdateConversationLastMessageVariables; + return id == otherTyped.id && + lastMessage == otherTyped.lastMessage && + lastMessageAt == otherTyped.lastMessageAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, lastMessage.hashCode, lastMessageAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(lastMessage.state == OptionalState.set) { + json['lastMessage'] = lastMessage.toJson(); + } + if(lastMessageAt.state == OptionalState.set) { + json['lastMessageAt'] = lastMessageAt.toJson(); + } + return json; + } + + UpdateConversationLastMessageVariables({ + required this.id, + required this.lastMessage, + required this.lastMessageAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_course.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_course.dart new file mode 100644 index 00000000..5d45c7d6 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_course.dart @@ -0,0 +1,239 @@ +part of 'generated.dart'; + +class UpdateCourseVariablesBuilder { + String id; + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _thumbnailUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _durationMinutes = Optional.optional(nativeFromJson, nativeToJson); + Optional _xpReward = Optional.optional(nativeFromJson, nativeToJson); + String categoryId; + Optional _levelRequired = Optional.optional(nativeFromJson, nativeToJson); + Optional _isCertification = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateCourseVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateCourseVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateCourseVariablesBuilder thumbnailUrl(String? t) { + _thumbnailUrl.value = t; + return this; + } + UpdateCourseVariablesBuilder durationMinutes(int? t) { + _durationMinutes.value = t; + return this; + } + UpdateCourseVariablesBuilder xpReward(int? t) { + _xpReward.value = t; + return this; + } + UpdateCourseVariablesBuilder levelRequired(String? t) { + _levelRequired.value = t; + return this; + } + UpdateCourseVariablesBuilder isCertification(bool? t) { + _isCertification.value = t; + return this; + } + + UpdateCourseVariablesBuilder(this._dataConnect, {required this.id,required this.categoryId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateCourseData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateCourseVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateCourseVariables vars= UpdateCourseVariables(id: id,title: _title,description: _description,thumbnailUrl: _thumbnailUrl,durationMinutes: _durationMinutes,xpReward: _xpReward,categoryId: categoryId,levelRequired: _levelRequired,isCertification: _isCertification,); + return _dataConnect.mutation("updateCourse", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateCourseCourseUpdate { + final String id; + UpdateCourseCourseUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCourseCourseUpdate otherTyped = other as UpdateCourseCourseUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateCourseCourseUpdate({ + required this.id, + }); +} + +@immutable +class UpdateCourseData { + final UpdateCourseCourseUpdate? course_update; + UpdateCourseData.fromJson(dynamic json): + + course_update = json['course_update'] == null ? null : UpdateCourseCourseUpdate.fromJson(json['course_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCourseData otherTyped = other as UpdateCourseData; + return course_update == otherTyped.course_update; + + } + @override + int get hashCode => course_update.hashCode; + + + Map toJson() { + Map json = {}; + if (course_update != null) { + json['course_update'] = course_update!.toJson(); + } + return json; + } + + UpdateCourseData({ + this.course_update, + }); +} + +@immutable +class UpdateCourseVariables { + final String id; + late final Optionaltitle; + late final Optionaldescription; + late final OptionalthumbnailUrl; + late final OptionaldurationMinutes; + late final OptionalxpReward; + final String categoryId; + late final OptionallevelRequired; + late final OptionalisCertification; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateCourseVariables.fromJson(Map json): + + id = nativeFromJson(json['id']), + categoryId = nativeFromJson(json['categoryId']) { + + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + thumbnailUrl = Optional.optional(nativeFromJson, nativeToJson); + thumbnailUrl.value = json['thumbnailUrl'] == null ? null : nativeFromJson(json['thumbnailUrl']); + + + durationMinutes = Optional.optional(nativeFromJson, nativeToJson); + durationMinutes.value = json['durationMinutes'] == null ? null : nativeFromJson(json['durationMinutes']); + + + xpReward = Optional.optional(nativeFromJson, nativeToJson); + xpReward.value = json['xpReward'] == null ? null : nativeFromJson(json['xpReward']); + + + + levelRequired = Optional.optional(nativeFromJson, nativeToJson); + levelRequired.value = json['levelRequired'] == null ? null : nativeFromJson(json['levelRequired']); + + + isCertification = Optional.optional(nativeFromJson, nativeToJson); + isCertification.value = json['isCertification'] == null ? null : nativeFromJson(json['isCertification']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCourseVariables otherTyped = other as UpdateCourseVariables; + return id == otherTyped.id && + title == otherTyped.title && + description == otherTyped.description && + thumbnailUrl == otherTyped.thumbnailUrl && + durationMinutes == otherTyped.durationMinutes && + xpReward == otherTyped.xpReward && + categoryId == otherTyped.categoryId && + levelRequired == otherTyped.levelRequired && + isCertification == otherTyped.isCertification; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, description.hashCode, thumbnailUrl.hashCode, durationMinutes.hashCode, xpReward.hashCode, categoryId.hashCode, levelRequired.hashCode, isCertification.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(thumbnailUrl.state == OptionalState.set) { + json['thumbnailUrl'] = thumbnailUrl.toJson(); + } + if(durationMinutes.state == OptionalState.set) { + json['durationMinutes'] = durationMinutes.toJson(); + } + if(xpReward.state == OptionalState.set) { + json['xpReward'] = xpReward.toJson(); + } + json['categoryId'] = nativeToJson(categoryId); + if(levelRequired.state == OptionalState.set) { + json['levelRequired'] = levelRequired.toJson(); + } + if(isCertification.state == OptionalState.set) { + json['isCertification'] = isCertification.toJson(); + } + return json; + } + + UpdateCourseVariables({ + required this.id, + required this.title, + required this.description, + required this.thumbnailUrl, + required this.durationMinutes, + required this.xpReward, + required this.categoryId, + required this.levelRequired, + required this.isCertification, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_custom_rate_card.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_custom_rate_card.dart new file mode 100644 index 00000000..4b70966a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_custom_rate_card.dart @@ -0,0 +1,187 @@ +part of 'generated.dart'; + +class UpdateCustomRateCardVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _baseBook = Optional.optional(nativeFromJson, nativeToJson); + Optional _discount = Optional.optional(nativeFromJson, nativeToJson); + Optional _isDefault = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateCustomRateCardVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateCustomRateCardVariablesBuilder baseBook(String? t) { + _baseBook.value = t; + return this; + } + UpdateCustomRateCardVariablesBuilder discount(double? t) { + _discount.value = t; + return this; + } + UpdateCustomRateCardVariablesBuilder isDefault(bool? t) { + _isDefault.value = t; + return this; + } + + UpdateCustomRateCardVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateCustomRateCardData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateCustomRateCardVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateCustomRateCardVariables vars= UpdateCustomRateCardVariables(id: id,name: _name,baseBook: _baseBook,discount: _discount,isDefault: _isDefault,); + return _dataConnect.mutation("updateCustomRateCard", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateCustomRateCardCustomRateCardUpdate { + final String id; + UpdateCustomRateCardCustomRateCardUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCustomRateCardCustomRateCardUpdate otherTyped = other as UpdateCustomRateCardCustomRateCardUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateCustomRateCardCustomRateCardUpdate({ + required this.id, + }); +} + +@immutable +class UpdateCustomRateCardData { + final UpdateCustomRateCardCustomRateCardUpdate? customRateCard_update; + UpdateCustomRateCardData.fromJson(dynamic json): + + customRateCard_update = json['customRateCard_update'] == null ? null : UpdateCustomRateCardCustomRateCardUpdate.fromJson(json['customRateCard_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCustomRateCardData otherTyped = other as UpdateCustomRateCardData; + return customRateCard_update == otherTyped.customRateCard_update; + + } + @override + int get hashCode => customRateCard_update.hashCode; + + + Map toJson() { + Map json = {}; + if (customRateCard_update != null) { + json['customRateCard_update'] = customRateCard_update!.toJson(); + } + return json; + } + + UpdateCustomRateCardData({ + this.customRateCard_update, + }); +} + +@immutable +class UpdateCustomRateCardVariables { + final String id; + late final Optionalname; + late final OptionalbaseBook; + late final Optionaldiscount; + late final OptionalisDefault; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateCustomRateCardVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + baseBook = Optional.optional(nativeFromJson, nativeToJson); + baseBook.value = json['baseBook'] == null ? null : nativeFromJson(json['baseBook']); + + + discount = Optional.optional(nativeFromJson, nativeToJson); + discount.value = json['discount'] == null ? null : nativeFromJson(json['discount']); + + + isDefault = Optional.optional(nativeFromJson, nativeToJson); + isDefault.value = json['isDefault'] == null ? null : nativeFromJson(json['isDefault']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateCustomRateCardVariables otherTyped = other as UpdateCustomRateCardVariables; + return id == otherTyped.id && + name == otherTyped.name && + baseBook == otherTyped.baseBook && + discount == otherTyped.discount && + isDefault == otherTyped.isDefault; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, baseBook.hashCode, discount.hashCode, isDefault.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(baseBook.state == OptionalState.set) { + json['baseBook'] = baseBook.toJson(); + } + if(discount.state == OptionalState.set) { + json['discount'] = discount.toJson(); + } + if(isDefault.state == OptionalState.set) { + json['isDefault'] = isDefault.toJson(); + } + return json; + } + + UpdateCustomRateCardVariables({ + required this.id, + required this.name, + required this.baseBook, + required this.discount, + required this.isDefault, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_document.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_document.dart new file mode 100644 index 00000000..ab803a9b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_document.dart @@ -0,0 +1,172 @@ +part of 'generated.dart'; + +class UpdateDocumentVariablesBuilder { + String id; + Optional _documentType = Optional.optional((data) => DocumentType.values.byName(data), enumSerializer); + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateDocumentVariablesBuilder documentType(DocumentType? t) { + _documentType.value = t; + return this; + } + UpdateDocumentVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateDocumentVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + + UpdateDocumentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateDocumentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateDocumentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateDocumentVariables vars= UpdateDocumentVariables(id: id,documentType: _documentType,name: _name,description: _description,); + return _dataConnect.mutation("updateDocument", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateDocumentDocumentUpdate { + final String id; + UpdateDocumentDocumentUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateDocumentDocumentUpdate otherTyped = other as UpdateDocumentDocumentUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateDocumentDocumentUpdate({ + required this.id, + }); +} + +@immutable +class UpdateDocumentData { + final UpdateDocumentDocumentUpdate? document_update; + UpdateDocumentData.fromJson(dynamic json): + + document_update = json['document_update'] == null ? null : UpdateDocumentDocumentUpdate.fromJson(json['document_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateDocumentData otherTyped = other as UpdateDocumentData; + return document_update == otherTyped.document_update; + + } + @override + int get hashCode => document_update.hashCode; + + + Map toJson() { + Map json = {}; + if (document_update != null) { + json['document_update'] = document_update!.toJson(); + } + return json; + } + + UpdateDocumentData({ + this.document_update, + }); +} + +@immutable +class UpdateDocumentVariables { + final String id; + late final OptionaldocumentType; + late final Optionalname; + late final Optionaldescription; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateDocumentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + documentType = Optional.optional((data) => DocumentType.values.byName(data), enumSerializer); + documentType.value = json['documentType'] == null ? null : DocumentType.values.byName(json['documentType']); + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateDocumentVariables otherTyped = other as UpdateDocumentVariables; + return id == otherTyped.id && + documentType == otherTyped.documentType && + name == otherTyped.name && + description == otherTyped.description; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, documentType.hashCode, name.hashCode, description.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(documentType.state == OptionalState.set) { + json['documentType'] = documentType.toJson(); + } + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + return json; + } + + UpdateDocumentVariables({ + required this.id, + required this.documentType, + required this.name, + required this.description, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_emergency_contact.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_emergency_contact.dart new file mode 100644 index 00000000..88642214 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_emergency_contact.dart @@ -0,0 +1,172 @@ +part of 'generated.dart'; + +class UpdateEmergencyContactVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _phone = Optional.optional(nativeFromJson, nativeToJson); + Optional _relationship = Optional.optional((data) => RelationshipType.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; UpdateEmergencyContactVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateEmergencyContactVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateEmergencyContactVariablesBuilder relationship(RelationshipType? t) { + _relationship.value = t; + return this; + } + + UpdateEmergencyContactVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateEmergencyContactData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateEmergencyContactVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateEmergencyContactVariables vars= UpdateEmergencyContactVariables(id: id,name: _name,phone: _phone,relationship: _relationship,); + return _dataConnect.mutation("updateEmergencyContact", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateEmergencyContactEmergencyContactUpdate { + final String id; + UpdateEmergencyContactEmergencyContactUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateEmergencyContactEmergencyContactUpdate otherTyped = other as UpdateEmergencyContactEmergencyContactUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateEmergencyContactEmergencyContactUpdate({ + required this.id, + }); +} + +@immutable +class UpdateEmergencyContactData { + final UpdateEmergencyContactEmergencyContactUpdate? emergencyContact_update; + UpdateEmergencyContactData.fromJson(dynamic json): + + emergencyContact_update = json['emergencyContact_update'] == null ? null : UpdateEmergencyContactEmergencyContactUpdate.fromJson(json['emergencyContact_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateEmergencyContactData otherTyped = other as UpdateEmergencyContactData; + return emergencyContact_update == otherTyped.emergencyContact_update; + + } + @override + int get hashCode => emergencyContact_update.hashCode; + + + Map toJson() { + Map json = {}; + if (emergencyContact_update != null) { + json['emergencyContact_update'] = emergencyContact_update!.toJson(); + } + return json; + } + + UpdateEmergencyContactData({ + this.emergencyContact_update, + }); +} + +@immutable +class UpdateEmergencyContactVariables { + final String id; + late final Optionalname; + late final Optionalphone; + late final Optionalrelationship; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateEmergencyContactVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + phone = Optional.optional(nativeFromJson, nativeToJson); + phone.value = json['phone'] == null ? null : nativeFromJson(json['phone']); + + + relationship = Optional.optional((data) => RelationshipType.values.byName(data), enumSerializer); + relationship.value = json['relationship'] == null ? null : RelationshipType.values.byName(json['relationship']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateEmergencyContactVariables otherTyped = other as UpdateEmergencyContactVariables; + return id == otherTyped.id && + name == otherTyped.name && + phone == otherTyped.phone && + relationship == otherTyped.relationship; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, phone.hashCode, relationship.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(phone.state == OptionalState.set) { + json['phone'] = phone.toJson(); + } + if(relationship.state == OptionalState.set) { + json['relationship'] = relationship.toJson(); + } + return json; + } + + UpdateEmergencyContactVariables({ + required this.id, + required this.name, + required this.phone, + required this.relationship, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_faq_data.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_faq_data.dart new file mode 100644 index 00000000..ec75f99a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_faq_data.dart @@ -0,0 +1,159 @@ +part of 'generated.dart'; + +class UpdateFaqDataVariablesBuilder { + String id; + Optional _category = Optional.optional(nativeFromJson, nativeToJson); + Optional> _questions = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + + final FirebaseDataConnect _dataConnect; UpdateFaqDataVariablesBuilder category(String? t) { + _category.value = t; + return this; + } + UpdateFaqDataVariablesBuilder questions(List? t) { + _questions.value = t; + return this; + } + + UpdateFaqDataVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateFaqDataData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateFaqDataVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateFaqDataVariables vars= UpdateFaqDataVariables(id: id,category: _category,questions: _questions,); + return _dataConnect.mutation("updateFaqData", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateFaqDataFaqDataUpdate { + final String id; + UpdateFaqDataFaqDataUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateFaqDataFaqDataUpdate otherTyped = other as UpdateFaqDataFaqDataUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateFaqDataFaqDataUpdate({ + required this.id, + }); +} + +@immutable +class UpdateFaqDataData { + final UpdateFaqDataFaqDataUpdate? faqData_update; + UpdateFaqDataData.fromJson(dynamic json): + + faqData_update = json['faqData_update'] == null ? null : UpdateFaqDataFaqDataUpdate.fromJson(json['faqData_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateFaqDataData otherTyped = other as UpdateFaqDataData; + return faqData_update == otherTyped.faqData_update; + + } + @override + int get hashCode => faqData_update.hashCode; + + + Map toJson() { + Map json = {}; + if (faqData_update != null) { + json['faqData_update'] = faqData_update!.toJson(); + } + return json; + } + + UpdateFaqDataData({ + this.faqData_update, + }); +} + +@immutable +class UpdateFaqDataVariables { + final String id; + late final Optionalcategory; + late final Optional>questions; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateFaqDataVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + category = Optional.optional(nativeFromJson, nativeToJson); + category.value = json['category'] == null ? null : nativeFromJson(json['category']); + + + questions = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + questions.value = json['questions'] == null ? null : (json['questions'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateFaqDataVariables otherTyped = other as UpdateFaqDataVariables; + return id == otherTyped.id && + category == otherTyped.category && + questions == otherTyped.questions; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, category.hashCode, questions.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(category.state == OptionalState.set) { + json['category'] = category.toJson(); + } + if(questions.state == OptionalState.set) { + json['questions'] = questions.toJson(); + } + return json; + } + + UpdateFaqDataVariables({ + required this.id, + required this.category, + required this.questions, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_hub.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_hub.dart new file mode 100644 index 00000000..76fd54b9 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_hub.dart @@ -0,0 +1,202 @@ +part of 'generated.dart'; + +class UpdateHubVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _locationName = Optional.optional(nativeFromJson, nativeToJson); + Optional _address = Optional.optional(nativeFromJson, nativeToJson); + Optional _nfcTagId = Optional.optional(nativeFromJson, nativeToJson); + Optional _ownerId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateHubVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateHubVariablesBuilder locationName(String? t) { + _locationName.value = t; + return this; + } + UpdateHubVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateHubVariablesBuilder nfcTagId(String? t) { + _nfcTagId.value = t; + return this; + } + UpdateHubVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + + UpdateHubVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateHubData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateHubVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateHubVariables vars= UpdateHubVariables(id: id,name: _name,locationName: _locationName,address: _address,nfcTagId: _nfcTagId,ownerId: _ownerId,); + return _dataConnect.mutation("updateHub", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateHubHubUpdate { + final String id; + UpdateHubHubUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateHubHubUpdate otherTyped = other as UpdateHubHubUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateHubHubUpdate({ + required this.id, + }); +} + +@immutable +class UpdateHubData { + final UpdateHubHubUpdate? hub_update; + UpdateHubData.fromJson(dynamic json): + + hub_update = json['hub_update'] == null ? null : UpdateHubHubUpdate.fromJson(json['hub_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateHubData otherTyped = other as UpdateHubData; + return hub_update == otherTyped.hub_update; + + } + @override + int get hashCode => hub_update.hashCode; + + + Map toJson() { + Map json = {}; + if (hub_update != null) { + json['hub_update'] = hub_update!.toJson(); + } + return json; + } + + UpdateHubData({ + this.hub_update, + }); +} + +@immutable +class UpdateHubVariables { + final String id; + late final Optionalname; + late final OptionallocationName; + late final Optionaladdress; + late final OptionalnfcTagId; + late final OptionalownerId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateHubVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + locationName = Optional.optional(nativeFromJson, nativeToJson); + locationName.value = json['locationName'] == null ? null : nativeFromJson(json['locationName']); + + + address = Optional.optional(nativeFromJson, nativeToJson); + address.value = json['address'] == null ? null : nativeFromJson(json['address']); + + + nfcTagId = Optional.optional(nativeFromJson, nativeToJson); + nfcTagId.value = json['nfcTagId'] == null ? null : nativeFromJson(json['nfcTagId']); + + + ownerId = Optional.optional(nativeFromJson, nativeToJson); + ownerId.value = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateHubVariables otherTyped = other as UpdateHubVariables; + return id == otherTyped.id && + name == otherTyped.name && + locationName == otherTyped.locationName && + address == otherTyped.address && + nfcTagId == otherTyped.nfcTagId && + ownerId == otherTyped.ownerId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, locationName.hashCode, address.hashCode, nfcTagId.hashCode, ownerId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(locationName.state == OptionalState.set) { + json['locationName'] = locationName.toJson(); + } + if(address.state == OptionalState.set) { + json['address'] = address.toJson(); + } + if(nfcTagId.state == OptionalState.set) { + json['nfcTagId'] = nfcTagId.toJson(); + } + if(ownerId.state == OptionalState.set) { + json['ownerId'] = ownerId.toJson(); + } + return json; + } + + UpdateHubVariables({ + required this.id, + required this.name, + required this.locationName, + required this.address, + required this.nfcTagId, + required this.ownerId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_invoice.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_invoice.dart new file mode 100644 index 00000000..8cdc5a81 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_invoice.dart @@ -0,0 +1,457 @@ +part of 'generated.dart'; + +class UpdateInvoiceVariablesBuilder { + String id; + Optional _status = Optional.optional((data) => InvoiceStatus.values.byName(data), enumSerializer); + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _businessId = Optional.optional(nativeFromJson, nativeToJson); + Optional _orderId = Optional.optional(nativeFromJson, nativeToJson); + Optional _paymentTerms = Optional.optional((data) => InovicePaymentTerms.values.byName(data), enumSerializer); + Optional _invoiceNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _issueDate = Optional.optional((json) => json['issueDate'] = Timestamp.fromJson(json['issueDate']), defaultSerializer); + Optional _dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + Optional _hub = Optional.optional(nativeFromJson, nativeToJson); + Optional _managerName = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _otherCharges = Optional.optional(nativeFromJson, nativeToJson); + Optional _subtotal = Optional.optional(nativeFromJson, nativeToJson); + Optional _amount = Optional.optional(nativeFromJson, nativeToJson); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + Optional _staffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _chargesCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _disputedItems = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _disputeReason = Optional.optional(nativeFromJson, nativeToJson); + Optional _disputeDetails = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateInvoiceVariablesBuilder status(InvoiceStatus? t) { + _status.value = t; + return this; + } + UpdateInvoiceVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateInvoiceVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateInvoiceVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + UpdateInvoiceVariablesBuilder paymentTerms(InovicePaymentTerms? t) { + _paymentTerms.value = t; + return this; + } + UpdateInvoiceVariablesBuilder invoiceNumber(String? t) { + _invoiceNumber.value = t; + return this; + } + UpdateInvoiceVariablesBuilder issueDate(Timestamp? t) { + _issueDate.value = t; + return this; + } + UpdateInvoiceVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + UpdateInvoiceVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + UpdateInvoiceVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + UpdateInvoiceVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + UpdateInvoiceVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + UpdateInvoiceVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + UpdateInvoiceVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + UpdateInvoiceVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + UpdateInvoiceVariablesBuilder amount(double? t) { + _amount.value = t; + return this; + } + UpdateInvoiceVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + UpdateInvoiceVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + UpdateInvoiceVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + UpdateInvoiceVariablesBuilder disputedItems(AnyValue? t) { + _disputedItems.value = t; + return this; + } + UpdateInvoiceVariablesBuilder disputeReason(String? t) { + _disputeReason.value = t; + return this; + } + UpdateInvoiceVariablesBuilder disputeDetails(String? t) { + _disputeDetails.value = t; + return this; + } + + UpdateInvoiceVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateInvoiceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateInvoiceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateInvoiceVariables vars= UpdateInvoiceVariables(id: id,status: _status,vendorId: _vendorId,businessId: _businessId,orderId: _orderId,paymentTerms: _paymentTerms,invoiceNumber: _invoiceNumber,issueDate: _issueDate,dueDate: _dueDate,hub: _hub,managerName: _managerName,vendorNumber: _vendorNumber,roles: _roles,charges: _charges,otherCharges: _otherCharges,subtotal: _subtotal,amount: _amount,notes: _notes,staffCount: _staffCount,chargesCount: _chargesCount,disputedItems: _disputedItems,disputeReason: _disputeReason,disputeDetails: _disputeDetails,); + return _dataConnect.mutation("updateInvoice", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateInvoiceInvoiceUpdate { + final String id; + UpdateInvoiceInvoiceUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateInvoiceInvoiceUpdate otherTyped = other as UpdateInvoiceInvoiceUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateInvoiceInvoiceUpdate({ + required this.id, + }); +} + +@immutable +class UpdateInvoiceData { + final UpdateInvoiceInvoiceUpdate? invoice_update; + UpdateInvoiceData.fromJson(dynamic json): + + invoice_update = json['invoice_update'] == null ? null : UpdateInvoiceInvoiceUpdate.fromJson(json['invoice_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateInvoiceData otherTyped = other as UpdateInvoiceData; + return invoice_update == otherTyped.invoice_update; + + } + @override + int get hashCode => invoice_update.hashCode; + + + Map toJson() { + Map json = {}; + if (invoice_update != null) { + json['invoice_update'] = invoice_update!.toJson(); + } + return json; + } + + UpdateInvoiceData({ + this.invoice_update, + }); +} + +@immutable +class UpdateInvoiceVariables { + final String id; + late final Optionalstatus; + late final OptionalvendorId; + late final OptionalbusinessId; + late final OptionalorderId; + late final OptionalpaymentTerms; + late final OptionalinvoiceNumber; + late final OptionalissueDate; + late final OptionaldueDate; + late final Optionalhub; + late final OptionalmanagerName; + late final OptionalvendorNumber; + late final Optionalroles; + late final Optionalcharges; + late final OptionalotherCharges; + late final Optionalsubtotal; + late final Optionalamount; + late final Optionalnotes; + late final OptionalstaffCount; + late final OptionalchargesCount; + late final OptionaldisputedItems; + late final OptionaldisputeReason; + late final OptionaldisputeDetails; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateInvoiceVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + status = Optional.optional((data) => InvoiceStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : InvoiceStatus.values.byName(json['status']); + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + businessId = Optional.optional(nativeFromJson, nativeToJson); + businessId.value = json['businessId'] == null ? null : nativeFromJson(json['businessId']); + + + orderId = Optional.optional(nativeFromJson, nativeToJson); + orderId.value = json['orderId'] == null ? null : nativeFromJson(json['orderId']); + + + paymentTerms = Optional.optional((data) => InovicePaymentTerms.values.byName(data), enumSerializer); + paymentTerms.value = json['paymentTerms'] == null ? null : InovicePaymentTerms.values.byName(json['paymentTerms']); + + + invoiceNumber = Optional.optional(nativeFromJson, nativeToJson); + invoiceNumber.value = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']); + + + issueDate = Optional.optional((json) => json['issueDate'] = Timestamp.fromJson(json['issueDate']), defaultSerializer); + issueDate.value = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']); + + + dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + dueDate.value = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']); + + + hub = Optional.optional(nativeFromJson, nativeToJson); + hub.value = json['hub'] == null ? null : nativeFromJson(json['hub']); + + + managerName = Optional.optional(nativeFromJson, nativeToJson); + managerName.value = json['managerName'] == null ? null : nativeFromJson(json['managerName']); + + + vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + vendorNumber.value = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']); + + + roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + roles.value = json['roles'] == null ? null : AnyValue.fromJson(json['roles']); + + + charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + charges.value = json['charges'] == null ? null : AnyValue.fromJson(json['charges']); + + + otherCharges = Optional.optional(nativeFromJson, nativeToJson); + otherCharges.value = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']); + + + subtotal = Optional.optional(nativeFromJson, nativeToJson); + subtotal.value = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']); + + + amount = Optional.optional(nativeFromJson, nativeToJson); + amount.value = json['amount'] == null ? null : nativeFromJson(json['amount']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + + staffCount = Optional.optional(nativeFromJson, nativeToJson); + staffCount.value = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']); + + + chargesCount = Optional.optional(nativeFromJson, nativeToJson); + chargesCount.value = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']); + + + disputedItems = Optional.optional(AnyValue.fromJson, defaultSerializer); + disputedItems.value = json['disputedItems'] == null ? null : AnyValue.fromJson(json['disputedItems']); + + + disputeReason = Optional.optional(nativeFromJson, nativeToJson); + disputeReason.value = json['disputeReason'] == null ? null : nativeFromJson(json['disputeReason']); + + + disputeDetails = Optional.optional(nativeFromJson, nativeToJson); + disputeDetails.value = json['disputeDetails'] == null ? null : nativeFromJson(json['disputeDetails']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateInvoiceVariables otherTyped = other as UpdateInvoiceVariables; + return id == otherTyped.id && + status == otherTyped.status && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount && + disputedItems == otherTyped.disputedItems && + disputeReason == otherTyped.disputeReason && + disputeDetails == otherTyped.disputeDetails; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode, disputedItems.hashCode, disputeReason.hashCode, disputeDetails.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(businessId.state == OptionalState.set) { + json['businessId'] = businessId.toJson(); + } + if(orderId.state == OptionalState.set) { + json['orderId'] = orderId.toJson(); + } + if(paymentTerms.state == OptionalState.set) { + json['paymentTerms'] = paymentTerms.toJson(); + } + if(invoiceNumber.state == OptionalState.set) { + json['invoiceNumber'] = invoiceNumber.toJson(); + } + if(issueDate.state == OptionalState.set) { + json['issueDate'] = issueDate.toJson(); + } + if(dueDate.state == OptionalState.set) { + json['dueDate'] = dueDate.toJson(); + } + if(hub.state == OptionalState.set) { + json['hub'] = hub.toJson(); + } + if(managerName.state == OptionalState.set) { + json['managerName'] = managerName.toJson(); + } + if(vendorNumber.state == OptionalState.set) { + json['vendorNumber'] = vendorNumber.toJson(); + } + if(roles.state == OptionalState.set) { + json['roles'] = roles.toJson(); + } + if(charges.state == OptionalState.set) { + json['charges'] = charges.toJson(); + } + if(otherCharges.state == OptionalState.set) { + json['otherCharges'] = otherCharges.toJson(); + } + if(subtotal.state == OptionalState.set) { + json['subtotal'] = subtotal.toJson(); + } + if(amount.state == OptionalState.set) { + json['amount'] = amount.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + if(staffCount.state == OptionalState.set) { + json['staffCount'] = staffCount.toJson(); + } + if(chargesCount.state == OptionalState.set) { + json['chargesCount'] = chargesCount.toJson(); + } + if(disputedItems.state == OptionalState.set) { + json['disputedItems'] = disputedItems.toJson(); + } + if(disputeReason.state == OptionalState.set) { + json['disputeReason'] = disputeReason.toJson(); + } + if(disputeDetails.state == OptionalState.set) { + json['disputeDetails'] = disputeDetails.toJson(); + } + return json; + } + + UpdateInvoiceVariables({ + required this.id, + required this.status, + required this.vendorId, + required this.businessId, + required this.orderId, + required this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + required this.hub, + required this.managerName, + required this.vendorNumber, + required this.roles, + required this.charges, + required this.otherCharges, + required this.subtotal, + required this.amount, + required this.notes, + required this.staffCount, + required this.chargesCount, + required this.disputedItems, + required this.disputeReason, + required this.disputeDetails, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_invoice_template.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_invoice_template.dart new file mode 100644 index 00000000..3cb12633 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_invoice_template.dart @@ -0,0 +1,427 @@ +part of 'generated.dart'; + +class UpdateInvoiceTemplateVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _ownerId = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _businessId = Optional.optional(nativeFromJson, nativeToJson); + Optional _orderId = Optional.optional(nativeFromJson, nativeToJson); + Optional _paymentTerms = Optional.optional((data) => InovicePaymentTermsTemp.values.byName(data), enumSerializer); + Optional _invoiceNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _issueDate = Optional.optional((json) => json['issueDate'] = Timestamp.fromJson(json['issueDate']), defaultSerializer); + Optional _dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + Optional _hub = Optional.optional(nativeFromJson, nativeToJson); + Optional _managerName = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _otherCharges = Optional.optional(nativeFromJson, nativeToJson); + Optional _subtotal = Optional.optional(nativeFromJson, nativeToJson); + Optional _amount = Optional.optional(nativeFromJson, nativeToJson); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + Optional _staffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _chargesCount = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateInvoiceTemplateVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder paymentTerms(InovicePaymentTermsTemp? t) { + _paymentTerms.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder invoiceNumber(String? t) { + _invoiceNumber.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder issueDate(Timestamp? t) { + _issueDate.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder vendorNumber(String? t) { + _vendorNumber.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder roles(AnyValue? t) { + _roles.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder charges(AnyValue? t) { + _charges.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder otherCharges(double? t) { + _otherCharges.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder subtotal(double? t) { + _subtotal.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder amount(double? t) { + _amount.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder staffCount(int? t) { + _staffCount.value = t; + return this; + } + UpdateInvoiceTemplateVariablesBuilder chargesCount(int? t) { + _chargesCount.value = t; + return this; + } + + UpdateInvoiceTemplateVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateInvoiceTemplateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateInvoiceTemplateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateInvoiceTemplateVariables vars= UpdateInvoiceTemplateVariables(id: id,name: _name,ownerId: _ownerId,vendorId: _vendorId,businessId: _businessId,orderId: _orderId,paymentTerms: _paymentTerms,invoiceNumber: _invoiceNumber,issueDate: _issueDate,dueDate: _dueDate,hub: _hub,managerName: _managerName,vendorNumber: _vendorNumber,roles: _roles,charges: _charges,otherCharges: _otherCharges,subtotal: _subtotal,amount: _amount,notes: _notes,staffCount: _staffCount,chargesCount: _chargesCount,); + return _dataConnect.mutation("updateInvoiceTemplate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateInvoiceTemplateInvoiceTemplateUpdate { + final String id; + UpdateInvoiceTemplateInvoiceTemplateUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateInvoiceTemplateInvoiceTemplateUpdate otherTyped = other as UpdateInvoiceTemplateInvoiceTemplateUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateInvoiceTemplateInvoiceTemplateUpdate({ + required this.id, + }); +} + +@immutable +class UpdateInvoiceTemplateData { + final UpdateInvoiceTemplateInvoiceTemplateUpdate? invoiceTemplate_update; + UpdateInvoiceTemplateData.fromJson(dynamic json): + + invoiceTemplate_update = json['invoiceTemplate_update'] == null ? null : UpdateInvoiceTemplateInvoiceTemplateUpdate.fromJson(json['invoiceTemplate_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateInvoiceTemplateData otherTyped = other as UpdateInvoiceTemplateData; + return invoiceTemplate_update == otherTyped.invoiceTemplate_update; + + } + @override + int get hashCode => invoiceTemplate_update.hashCode; + + + Map toJson() { + Map json = {}; + if (invoiceTemplate_update != null) { + json['invoiceTemplate_update'] = invoiceTemplate_update!.toJson(); + } + return json; + } + + UpdateInvoiceTemplateData({ + this.invoiceTemplate_update, + }); +} + +@immutable +class UpdateInvoiceTemplateVariables { + final String id; + late final Optionalname; + late final OptionalownerId; + late final OptionalvendorId; + late final OptionalbusinessId; + late final OptionalorderId; + late final OptionalpaymentTerms; + late final OptionalinvoiceNumber; + late final OptionalissueDate; + late final OptionaldueDate; + late final Optionalhub; + late final OptionalmanagerName; + late final OptionalvendorNumber; + late final Optionalroles; + late final Optionalcharges; + late final OptionalotherCharges; + late final Optionalsubtotal; + late final Optionalamount; + late final Optionalnotes; + late final OptionalstaffCount; + late final OptionalchargesCount; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateInvoiceTemplateVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + ownerId = Optional.optional(nativeFromJson, nativeToJson); + ownerId.value = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']); + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + businessId = Optional.optional(nativeFromJson, nativeToJson); + businessId.value = json['businessId'] == null ? null : nativeFromJson(json['businessId']); + + + orderId = Optional.optional(nativeFromJson, nativeToJson); + orderId.value = json['orderId'] == null ? null : nativeFromJson(json['orderId']); + + + paymentTerms = Optional.optional((data) => InovicePaymentTermsTemp.values.byName(data), enumSerializer); + paymentTerms.value = json['paymentTerms'] == null ? null : InovicePaymentTermsTemp.values.byName(json['paymentTerms']); + + + invoiceNumber = Optional.optional(nativeFromJson, nativeToJson); + invoiceNumber.value = json['invoiceNumber'] == null ? null : nativeFromJson(json['invoiceNumber']); + + + issueDate = Optional.optional((json) => json['issueDate'] = Timestamp.fromJson(json['issueDate']), defaultSerializer); + issueDate.value = json['issueDate'] == null ? null : Timestamp.fromJson(json['issueDate']); + + + dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + dueDate.value = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']); + + + hub = Optional.optional(nativeFromJson, nativeToJson); + hub.value = json['hub'] == null ? null : nativeFromJson(json['hub']); + + + managerName = Optional.optional(nativeFromJson, nativeToJson); + managerName.value = json['managerName'] == null ? null : nativeFromJson(json['managerName']); + + + vendorNumber = Optional.optional(nativeFromJson, nativeToJson); + vendorNumber.value = json['vendorNumber'] == null ? null : nativeFromJson(json['vendorNumber']); + + + roles = Optional.optional(AnyValue.fromJson, defaultSerializer); + roles.value = json['roles'] == null ? null : AnyValue.fromJson(json['roles']); + + + charges = Optional.optional(AnyValue.fromJson, defaultSerializer); + charges.value = json['charges'] == null ? null : AnyValue.fromJson(json['charges']); + + + otherCharges = Optional.optional(nativeFromJson, nativeToJson); + otherCharges.value = json['otherCharges'] == null ? null : nativeFromJson(json['otherCharges']); + + + subtotal = Optional.optional(nativeFromJson, nativeToJson); + subtotal.value = json['subtotal'] == null ? null : nativeFromJson(json['subtotal']); + + + amount = Optional.optional(nativeFromJson, nativeToJson); + amount.value = json['amount'] == null ? null : nativeFromJson(json['amount']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + + staffCount = Optional.optional(nativeFromJson, nativeToJson); + staffCount.value = json['staffCount'] == null ? null : nativeFromJson(json['staffCount']); + + + chargesCount = Optional.optional(nativeFromJson, nativeToJson); + chargesCount.value = json['chargesCount'] == null ? null : nativeFromJson(json['chargesCount']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateInvoiceTemplateVariables otherTyped = other as UpdateInvoiceTemplateVariables; + return id == otherTyped.id && + name == otherTyped.name && + ownerId == otherTyped.ownerId && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + orderId == otherTyped.orderId && + paymentTerms == otherTyped.paymentTerms && + invoiceNumber == otherTyped.invoiceNumber && + issueDate == otherTyped.issueDate && + dueDate == otherTyped.dueDate && + hub == otherTyped.hub && + managerName == otherTyped.managerName && + vendorNumber == otherTyped.vendorNumber && + roles == otherTyped.roles && + charges == otherTyped.charges && + otherCharges == otherTyped.otherCharges && + subtotal == otherTyped.subtotal && + amount == otherTyped.amount && + notes == otherTyped.notes && + staffCount == otherTyped.staffCount && + chargesCount == otherTyped.chargesCount; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, ownerId.hashCode, vendorId.hashCode, businessId.hashCode, orderId.hashCode, paymentTerms.hashCode, invoiceNumber.hashCode, issueDate.hashCode, dueDate.hashCode, hub.hashCode, managerName.hashCode, vendorNumber.hashCode, roles.hashCode, charges.hashCode, otherCharges.hashCode, subtotal.hashCode, amount.hashCode, notes.hashCode, staffCount.hashCode, chargesCount.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(ownerId.state == OptionalState.set) { + json['ownerId'] = ownerId.toJson(); + } + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(businessId.state == OptionalState.set) { + json['businessId'] = businessId.toJson(); + } + if(orderId.state == OptionalState.set) { + json['orderId'] = orderId.toJson(); + } + if(paymentTerms.state == OptionalState.set) { + json['paymentTerms'] = paymentTerms.toJson(); + } + if(invoiceNumber.state == OptionalState.set) { + json['invoiceNumber'] = invoiceNumber.toJson(); + } + if(issueDate.state == OptionalState.set) { + json['issueDate'] = issueDate.toJson(); + } + if(dueDate.state == OptionalState.set) { + json['dueDate'] = dueDate.toJson(); + } + if(hub.state == OptionalState.set) { + json['hub'] = hub.toJson(); + } + if(managerName.state == OptionalState.set) { + json['managerName'] = managerName.toJson(); + } + if(vendorNumber.state == OptionalState.set) { + json['vendorNumber'] = vendorNumber.toJson(); + } + if(roles.state == OptionalState.set) { + json['roles'] = roles.toJson(); + } + if(charges.state == OptionalState.set) { + json['charges'] = charges.toJson(); + } + if(otherCharges.state == OptionalState.set) { + json['otherCharges'] = otherCharges.toJson(); + } + if(subtotal.state == OptionalState.set) { + json['subtotal'] = subtotal.toJson(); + } + if(amount.state == OptionalState.set) { + json['amount'] = amount.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + if(staffCount.state == OptionalState.set) { + json['staffCount'] = staffCount.toJson(); + } + if(chargesCount.state == OptionalState.set) { + json['chargesCount'] = chargesCount.toJson(); + } + return json; + } + + UpdateInvoiceTemplateVariables({ + required this.id, + required this.name, + required this.ownerId, + required this.vendorId, + required this.businessId, + required this.orderId, + required this.paymentTerms, + required this.invoiceNumber, + required this.issueDate, + required this.dueDate, + required this.hub, + required this.managerName, + required this.vendorNumber, + required this.roles, + required this.charges, + required this.otherCharges, + required this.subtotal, + required this.amount, + required this.notes, + required this.staffCount, + required this.chargesCount, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_level.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_level.dart new file mode 100644 index 00000000..0385a5bf --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_level.dart @@ -0,0 +1,187 @@ +part of 'generated.dart'; + +class UpdateLevelVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _xpRequired = Optional.optional(nativeFromJson, nativeToJson); + Optional _icon = Optional.optional(nativeFromJson, nativeToJson); + Optional _colors = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateLevelVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateLevelVariablesBuilder xpRequired(int? t) { + _xpRequired.value = t; + return this; + } + UpdateLevelVariablesBuilder icon(String? t) { + _icon.value = t; + return this; + } + UpdateLevelVariablesBuilder colors(AnyValue? t) { + _colors.value = t; + return this; + } + + UpdateLevelVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateLevelData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateLevelVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateLevelVariables vars= UpdateLevelVariables(id: id,name: _name,xpRequired: _xpRequired,icon: _icon,colors: _colors,); + return _dataConnect.mutation("updateLevel", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateLevelLevelUpdate { + final String id; + UpdateLevelLevelUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateLevelLevelUpdate otherTyped = other as UpdateLevelLevelUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateLevelLevelUpdate({ + required this.id, + }); +} + +@immutable +class UpdateLevelData { + final UpdateLevelLevelUpdate? level_update; + UpdateLevelData.fromJson(dynamic json): + + level_update = json['level_update'] == null ? null : UpdateLevelLevelUpdate.fromJson(json['level_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateLevelData otherTyped = other as UpdateLevelData; + return level_update == otherTyped.level_update; + + } + @override + int get hashCode => level_update.hashCode; + + + Map toJson() { + Map json = {}; + if (level_update != null) { + json['level_update'] = level_update!.toJson(); + } + return json; + } + + UpdateLevelData({ + this.level_update, + }); +} + +@immutable +class UpdateLevelVariables { + final String id; + late final Optionalname; + late final OptionalxpRequired; + late final Optionalicon; + late final Optionalcolors; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateLevelVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + xpRequired = Optional.optional(nativeFromJson, nativeToJson); + xpRequired.value = json['xpRequired'] == null ? null : nativeFromJson(json['xpRequired']); + + + icon = Optional.optional(nativeFromJson, nativeToJson); + icon.value = json['icon'] == null ? null : nativeFromJson(json['icon']); + + + colors = Optional.optional(AnyValue.fromJson, defaultSerializer); + colors.value = json['colors'] == null ? null : AnyValue.fromJson(json['colors']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateLevelVariables otherTyped = other as UpdateLevelVariables; + return id == otherTyped.id && + name == otherTyped.name && + xpRequired == otherTyped.xpRequired && + icon == otherTyped.icon && + colors == otherTyped.colors; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, xpRequired.hashCode, icon.hashCode, colors.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(xpRequired.state == OptionalState.set) { + json['xpRequired'] = xpRequired.toJson(); + } + if(icon.state == OptionalState.set) { + json['icon'] = icon.toJson(); + } + if(colors.state == OptionalState.set) { + json['colors'] = colors.toJson(); + } + return json; + } + + UpdateLevelVariables({ + required this.id, + required this.name, + required this.xpRequired, + required this.icon, + required this.colors, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_message.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_message.dart new file mode 100644 index 00000000..466a250a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_message.dart @@ -0,0 +1,187 @@ +part of 'generated.dart'; + +class UpdateMessageVariablesBuilder { + String id; + Optional _conversationId = Optional.optional(nativeFromJson, nativeToJson); + Optional _senderId = Optional.optional(nativeFromJson, nativeToJson); + Optional _content = Optional.optional(nativeFromJson, nativeToJson); + Optional _isSystem = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateMessageVariablesBuilder conversationId(String? t) { + _conversationId.value = t; + return this; + } + UpdateMessageVariablesBuilder senderId(String? t) { + _senderId.value = t; + return this; + } + UpdateMessageVariablesBuilder content(String? t) { + _content.value = t; + return this; + } + UpdateMessageVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + UpdateMessageVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateMessageData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateMessageVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateMessageVariables vars= UpdateMessageVariables(id: id,conversationId: _conversationId,senderId: _senderId,content: _content,isSystem: _isSystem,); + return _dataConnect.mutation("updateMessage", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateMessageMessageUpdate { + final String id; + UpdateMessageMessageUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateMessageMessageUpdate otherTyped = other as UpdateMessageMessageUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateMessageMessageUpdate({ + required this.id, + }); +} + +@immutable +class UpdateMessageData { + final UpdateMessageMessageUpdate? message_update; + UpdateMessageData.fromJson(dynamic json): + + message_update = json['message_update'] == null ? null : UpdateMessageMessageUpdate.fromJson(json['message_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateMessageData otherTyped = other as UpdateMessageData; + return message_update == otherTyped.message_update; + + } + @override + int get hashCode => message_update.hashCode; + + + Map toJson() { + Map json = {}; + if (message_update != null) { + json['message_update'] = message_update!.toJson(); + } + return json; + } + + UpdateMessageData({ + this.message_update, + }); +} + +@immutable +class UpdateMessageVariables { + final String id; + late final OptionalconversationId; + late final OptionalsenderId; + late final Optionalcontent; + late final OptionalisSystem; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateMessageVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + conversationId = Optional.optional(nativeFromJson, nativeToJson); + conversationId.value = json['conversationId'] == null ? null : nativeFromJson(json['conversationId']); + + + senderId = Optional.optional(nativeFromJson, nativeToJson); + senderId.value = json['senderId'] == null ? null : nativeFromJson(json['senderId']); + + + content = Optional.optional(nativeFromJson, nativeToJson); + content.value = json['content'] == null ? null : nativeFromJson(json['content']); + + + isSystem = Optional.optional(nativeFromJson, nativeToJson); + isSystem.value = json['isSystem'] == null ? null : nativeFromJson(json['isSystem']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateMessageVariables otherTyped = other as UpdateMessageVariables; + return id == otherTyped.id && + conversationId == otherTyped.conversationId && + senderId == otherTyped.senderId && + content == otherTyped.content && + isSystem == otherTyped.isSystem; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, conversationId.hashCode, senderId.hashCode, content.hashCode, isSystem.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(conversationId.state == OptionalState.set) { + json['conversationId'] = conversationId.toJson(); + } + if(senderId.state == OptionalState.set) { + json['senderId'] = senderId.toJson(); + } + if(content.state == OptionalState.set) { + json['content'] = content.toJson(); + } + if(isSystem.state == OptionalState.set) { + json['isSystem'] = isSystem.toJson(); + } + return json; + } + + UpdateMessageVariables({ + required this.id, + required this.conversationId, + required this.senderId, + required this.content, + required this.isSystem, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_order.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_order.dart new file mode 100644 index 00000000..83438d80 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_order.dart @@ -0,0 +1,382 @@ +part of 'generated.dart'; + +class UpdateOrderVariablesBuilder { + String id; + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _businessId = Optional.optional(nativeFromJson, nativeToJson); + Optional _location = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); + Optional _startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer); + Optional _endDate = Optional.optional((json) => json['endDate'] = Timestamp.fromJson(json['endDate']), defaultSerializer); + Optional _total = Optional.optional(nativeFromJson, nativeToJson); + Optional _eventName = Optional.optional(nativeFromJson, nativeToJson); + Optional _assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _shifts = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _requested = Optional.optional(nativeFromJson, nativeToJson); + Optional _hub = Optional.optional(nativeFromJson, nativeToJson); + Optional _recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + Optional _detectedConflicts = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _poReference = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateOrderVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateOrderVariablesBuilder businessId(String? t) { + _businessId.value = t; + return this; + } + UpdateOrderVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + UpdateOrderVariablesBuilder status(OrderStatus? t) { + _status.value = t; + return this; + } + UpdateOrderVariablesBuilder startDate(Timestamp? t) { + _startDate.value = t; + return this; + } + UpdateOrderVariablesBuilder endDate(Timestamp? t) { + _endDate.value = t; + return this; + } + UpdateOrderVariablesBuilder total(double? t) { + _total.value = t; + return this; + } + UpdateOrderVariablesBuilder eventName(String? t) { + _eventName.value = t; + return this; + } + UpdateOrderVariablesBuilder assignedStaff(AnyValue? t) { + _assignedStaff.value = t; + return this; + } + UpdateOrderVariablesBuilder shifts(AnyValue? t) { + _shifts.value = t; + return this; + } + UpdateOrderVariablesBuilder requested(int? t) { + _requested.value = t; + return this; + } + UpdateOrderVariablesBuilder hub(String? t) { + _hub.value = t; + return this; + } + UpdateOrderVariablesBuilder recurringDays(AnyValue? t) { + _recurringDays.value = t; + return this; + } + UpdateOrderVariablesBuilder permanentDays(AnyValue? t) { + _permanentDays.value = t; + return this; + } + UpdateOrderVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + UpdateOrderVariablesBuilder detectedConflicts(AnyValue? t) { + _detectedConflicts.value = t; + return this; + } + UpdateOrderVariablesBuilder poReference(String? t) { + _poReference.value = t; + return this; + } + + UpdateOrderVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateOrderData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateOrderVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateOrderVariables vars= UpdateOrderVariables(id: id,vendorId: _vendorId,businessId: _businessId,location: _location,status: _status,startDate: _startDate,endDate: _endDate,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,hub: _hub,recurringDays: _recurringDays,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,); + return _dataConnect.mutation("updateOrder", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateOrderOrderUpdate { + final String id; + UpdateOrderOrderUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateOrderOrderUpdate otherTyped = other as UpdateOrderOrderUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateOrderOrderUpdate({ + required this.id, + }); +} + +@immutable +class UpdateOrderData { + final UpdateOrderOrderUpdate? order_update; + UpdateOrderData.fromJson(dynamic json): + + order_update = json['order_update'] == null ? null : UpdateOrderOrderUpdate.fromJson(json['order_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateOrderData otherTyped = other as UpdateOrderData; + return order_update == otherTyped.order_update; + + } + @override + int get hashCode => order_update.hashCode; + + + Map toJson() { + Map json = {}; + if (order_update != null) { + json['order_update'] = order_update!.toJson(); + } + return json; + } + + UpdateOrderData({ + this.order_update, + }); +} + +@immutable +class UpdateOrderVariables { + final String id; + late final OptionalvendorId; + late final OptionalbusinessId; + late final Optionallocation; + late final Optionalstatus; + late final OptionalstartDate; + late final OptionalendDate; + late final Optionaltotal; + late final OptionaleventName; + late final OptionalassignedStaff; + late final Optionalshifts; + late final Optionalrequested; + late final Optionalhub; + late final OptionalrecurringDays; + late final OptionalpermanentDays; + late final Optionalnotes; + late final OptionaldetectedConflicts; + late final OptionalpoReference; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateOrderVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + businessId = Optional.optional(nativeFromJson, nativeToJson); + businessId.value = json['businessId'] == null ? null : nativeFromJson(json['businessId']); + + + location = Optional.optional(nativeFromJson, nativeToJson); + location.value = json['location'] == null ? null : nativeFromJson(json['location']); + + + status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : OrderStatus.values.byName(json['status']); + + + startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer); + startDate.value = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']); + + + endDate = Optional.optional((json) => json['endDate'] = Timestamp.fromJson(json['endDate']), defaultSerializer); + endDate.value = json['endDate'] == null ? null : Timestamp.fromJson(json['endDate']); + + + total = Optional.optional(nativeFromJson, nativeToJson); + total.value = json['total'] == null ? null : nativeFromJson(json['total']); + + + eventName = Optional.optional(nativeFromJson, nativeToJson); + eventName.value = json['eventName'] == null ? null : nativeFromJson(json['eventName']); + + + assignedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + assignedStaff.value = json['assignedStaff'] == null ? null : AnyValue.fromJson(json['assignedStaff']); + + + shifts = Optional.optional(AnyValue.fromJson, defaultSerializer); + shifts.value = json['shifts'] == null ? null : AnyValue.fromJson(json['shifts']); + + + requested = Optional.optional(nativeFromJson, nativeToJson); + requested.value = json['requested'] == null ? null : nativeFromJson(json['requested']); + + + hub = Optional.optional(nativeFromJson, nativeToJson); + hub.value = json['hub'] == null ? null : nativeFromJson(json['hub']); + + + recurringDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + recurringDays.value = json['recurringDays'] == null ? null : AnyValue.fromJson(json['recurringDays']); + + + permanentDays = Optional.optional(AnyValue.fromJson, defaultSerializer); + permanentDays.value = json['permanentDays'] == null ? null : AnyValue.fromJson(json['permanentDays']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + + detectedConflicts = Optional.optional(AnyValue.fromJson, defaultSerializer); + detectedConflicts.value = json['detectedConflicts'] == null ? null : AnyValue.fromJson(json['detectedConflicts']); + + + poReference = Optional.optional(nativeFromJson, nativeToJson); + poReference.value = json['poReference'] == null ? null : nativeFromJson(json['poReference']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateOrderVariables otherTyped = other as UpdateOrderVariables; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + businessId == otherTyped.businessId && + location == otherTyped.location && + status == otherTyped.status && + startDate == otherTyped.startDate && + endDate == otherTyped.endDate && + total == otherTyped.total && + eventName == otherTyped.eventName && + assignedStaff == otherTyped.assignedStaff && + shifts == otherTyped.shifts && + requested == otherTyped.requested && + hub == otherTyped.hub && + recurringDays == otherTyped.recurringDays && + permanentDays == otherTyped.permanentDays && + notes == otherTyped.notes && + detectedConflicts == otherTyped.detectedConflicts && + poReference == otherTyped.poReference; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, businessId.hashCode, location.hashCode, status.hashCode, startDate.hashCode, endDate.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(businessId.state == OptionalState.set) { + json['businessId'] = businessId.toJson(); + } + if(location.state == OptionalState.set) { + json['location'] = location.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(startDate.state == OptionalState.set) { + json['startDate'] = startDate.toJson(); + } + if(endDate.state == OptionalState.set) { + json['endDate'] = endDate.toJson(); + } + if(total.state == OptionalState.set) { + json['total'] = total.toJson(); + } + if(eventName.state == OptionalState.set) { + json['eventName'] = eventName.toJson(); + } + if(assignedStaff.state == OptionalState.set) { + json['assignedStaff'] = assignedStaff.toJson(); + } + if(shifts.state == OptionalState.set) { + json['shifts'] = shifts.toJson(); + } + if(requested.state == OptionalState.set) { + json['requested'] = requested.toJson(); + } + if(hub.state == OptionalState.set) { + json['hub'] = hub.toJson(); + } + if(recurringDays.state == OptionalState.set) { + json['recurringDays'] = recurringDays.toJson(); + } + if(permanentDays.state == OptionalState.set) { + json['permanentDays'] = permanentDays.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + if(detectedConflicts.state == OptionalState.set) { + json['detectedConflicts'] = detectedConflicts.toJson(); + } + if(poReference.state == OptionalState.set) { + json['poReference'] = poReference.toJson(); + } + return json; + } + + UpdateOrderVariables({ + required this.id, + required this.vendorId, + required this.businessId, + required this.location, + required this.status, + required this.startDate, + required this.endDate, + required this.total, + required this.eventName, + required this.assignedStaff, + required this.shifts, + required this.requested, + required this.hub, + required this.recurringDays, + required this.permanentDays, + required this.notes, + required this.detectedConflicts, + required this.poReference, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_recent_payment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_recent_payment.dart new file mode 100644 index 00000000..f2ff0280 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_recent_payment.dart @@ -0,0 +1,202 @@ +part of 'generated.dart'; + +class UpdateRecentPaymentVariablesBuilder { + String id; + Optional _workedTime = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => RecentPaymentStatus.values.byName(data), enumSerializer); + Optional _staffId = Optional.optional(nativeFromJson, nativeToJson); + Optional _applicationId = Optional.optional(nativeFromJson, nativeToJson); + Optional _invoiceId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateRecentPaymentVariablesBuilder workedTime(String? t) { + _workedTime.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder status(RecentPaymentStatus? t) { + _status.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder staffId(String? t) { + _staffId.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder applicationId(String? t) { + _applicationId.value = t; + return this; + } + UpdateRecentPaymentVariablesBuilder invoiceId(String? t) { + _invoiceId.value = t; + return this; + } + + UpdateRecentPaymentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateRecentPaymentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateRecentPaymentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateRecentPaymentVariables vars= UpdateRecentPaymentVariables(id: id,workedTime: _workedTime,status: _status,staffId: _staffId,applicationId: _applicationId,invoiceId: _invoiceId,); + return _dataConnect.mutation("updateRecentPayment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateRecentPaymentRecentPaymentUpdate { + final String id; + UpdateRecentPaymentRecentPaymentUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRecentPaymentRecentPaymentUpdate otherTyped = other as UpdateRecentPaymentRecentPaymentUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateRecentPaymentRecentPaymentUpdate({ + required this.id, + }); +} + +@immutable +class UpdateRecentPaymentData { + final UpdateRecentPaymentRecentPaymentUpdate? recentPayment_update; + UpdateRecentPaymentData.fromJson(dynamic json): + + recentPayment_update = json['recentPayment_update'] == null ? null : UpdateRecentPaymentRecentPaymentUpdate.fromJson(json['recentPayment_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRecentPaymentData otherTyped = other as UpdateRecentPaymentData; + return recentPayment_update == otherTyped.recentPayment_update; + + } + @override + int get hashCode => recentPayment_update.hashCode; + + + Map toJson() { + Map json = {}; + if (recentPayment_update != null) { + json['recentPayment_update'] = recentPayment_update!.toJson(); + } + return json; + } + + UpdateRecentPaymentData({ + this.recentPayment_update, + }); +} + +@immutable +class UpdateRecentPaymentVariables { + final String id; + late final OptionalworkedTime; + late final Optionalstatus; + late final OptionalstaffId; + late final OptionalapplicationId; + late final OptionalinvoiceId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateRecentPaymentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + workedTime = Optional.optional(nativeFromJson, nativeToJson); + workedTime.value = json['workedTime'] == null ? null : nativeFromJson(json['workedTime']); + + + status = Optional.optional((data) => RecentPaymentStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : RecentPaymentStatus.values.byName(json['status']); + + + staffId = Optional.optional(nativeFromJson, nativeToJson); + staffId.value = json['staffId'] == null ? null : nativeFromJson(json['staffId']); + + + applicationId = Optional.optional(nativeFromJson, nativeToJson); + applicationId.value = json['applicationId'] == null ? null : nativeFromJson(json['applicationId']); + + + invoiceId = Optional.optional(nativeFromJson, nativeToJson); + invoiceId.value = json['invoiceId'] == null ? null : nativeFromJson(json['invoiceId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRecentPaymentVariables otherTyped = other as UpdateRecentPaymentVariables; + return id == otherTyped.id && + workedTime == otherTyped.workedTime && + status == otherTyped.status && + staffId == otherTyped.staffId && + applicationId == otherTyped.applicationId && + invoiceId == otherTyped.invoiceId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workedTime.hashCode, status.hashCode, staffId.hashCode, applicationId.hashCode, invoiceId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(workedTime.state == OptionalState.set) { + json['workedTime'] = workedTime.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(staffId.state == OptionalState.set) { + json['staffId'] = staffId.toJson(); + } + if(applicationId.state == OptionalState.set) { + json['applicationId'] = applicationId.toJson(); + } + if(invoiceId.state == OptionalState.set) { + json['invoiceId'] = invoiceId.toJson(); + } + return json; + } + + UpdateRecentPaymentVariables({ + required this.id, + required this.workedTime, + required this.status, + required this.staffId, + required this.applicationId, + required this.invoiceId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_role.dart new file mode 100644 index 00000000..a7ed336c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_role.dart @@ -0,0 +1,164 @@ +part of 'generated.dart'; + +class UpdateRoleVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _costPerHour = Optional.optional(nativeFromJson, nativeToJson); + String roleCategoryId; + + final FirebaseDataConnect _dataConnect; UpdateRoleVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateRoleVariablesBuilder costPerHour(double? t) { + _costPerHour.value = t; + return this; + } + + UpdateRoleVariablesBuilder(this._dataConnect, {required this.id,required this.roleCategoryId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateRoleVariables vars= UpdateRoleVariables(id: id,name: _name,costPerHour: _costPerHour,roleCategoryId: roleCategoryId,); + return _dataConnect.mutation("updateRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateRoleRoleUpdate { + final String id; + UpdateRoleRoleUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRoleRoleUpdate otherTyped = other as UpdateRoleRoleUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateRoleRoleUpdate({ + required this.id, + }); +} + +@immutable +class UpdateRoleData { + final UpdateRoleRoleUpdate? role_update; + UpdateRoleData.fromJson(dynamic json): + + role_update = json['role_update'] == null ? null : UpdateRoleRoleUpdate.fromJson(json['role_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRoleData otherTyped = other as UpdateRoleData; + return role_update == otherTyped.role_update; + + } + @override + int get hashCode => role_update.hashCode; + + + Map toJson() { + Map json = {}; + if (role_update != null) { + json['role_update'] = role_update!.toJson(); + } + return json; + } + + UpdateRoleData({ + this.role_update, + }); +} + +@immutable +class UpdateRoleVariables { + final String id; + late final Optionalname; + late final OptionalcostPerHour; + final String roleCategoryId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateRoleVariables.fromJson(Map json): + + id = nativeFromJson(json['id']), + roleCategoryId = nativeFromJson(json['roleCategoryId']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + costPerHour = Optional.optional(nativeFromJson, nativeToJson); + costPerHour.value = json['costPerHour'] == null ? null : nativeFromJson(json['costPerHour']); + + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRoleVariables otherTyped = other as UpdateRoleVariables; + return id == otherTyped.id && + name == otherTyped.name && + costPerHour == otherTyped.costPerHour && + roleCategoryId == otherTyped.roleCategoryId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode, roleCategoryId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(costPerHour.state == OptionalState.set) { + json['costPerHour'] = costPerHour.toJson(); + } + json['roleCategoryId'] = nativeToJson(roleCategoryId); + return json; + } + + UpdateRoleVariables({ + required this.id, + required this.name, + required this.costPerHour, + required this.roleCategoryId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_role_category.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_role_category.dart new file mode 100644 index 00000000..80f2f027 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_role_category.dart @@ -0,0 +1,157 @@ +part of 'generated.dart'; + +class UpdateRoleCategoryVariablesBuilder { + String id; + Optional _roleName = Optional.optional(nativeFromJson, nativeToJson); + Optional _category = Optional.optional((data) => RoleCategoryType.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; UpdateRoleCategoryVariablesBuilder roleName(String? t) { + _roleName.value = t; + return this; + } + UpdateRoleCategoryVariablesBuilder category(RoleCategoryType? t) { + _category.value = t; + return this; + } + + UpdateRoleCategoryVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateRoleCategoryData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateRoleCategoryVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateRoleCategoryVariables vars= UpdateRoleCategoryVariables(id: id,roleName: _roleName,category: _category,); + return _dataConnect.mutation("updateRoleCategory", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateRoleCategoryRoleCategoryUpdate { + final String id; + UpdateRoleCategoryRoleCategoryUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRoleCategoryRoleCategoryUpdate otherTyped = other as UpdateRoleCategoryRoleCategoryUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateRoleCategoryRoleCategoryUpdate({ + required this.id, + }); +} + +@immutable +class UpdateRoleCategoryData { + final UpdateRoleCategoryRoleCategoryUpdate? roleCategory_update; + UpdateRoleCategoryData.fromJson(dynamic json): + + roleCategory_update = json['roleCategory_update'] == null ? null : UpdateRoleCategoryRoleCategoryUpdate.fromJson(json['roleCategory_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRoleCategoryData otherTyped = other as UpdateRoleCategoryData; + return roleCategory_update == otherTyped.roleCategory_update; + + } + @override + int get hashCode => roleCategory_update.hashCode; + + + Map toJson() { + Map json = {}; + if (roleCategory_update != null) { + json['roleCategory_update'] = roleCategory_update!.toJson(); + } + return json; + } + + UpdateRoleCategoryData({ + this.roleCategory_update, + }); +} + +@immutable +class UpdateRoleCategoryVariables { + final String id; + late final OptionalroleName; + late final Optionalcategory; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateRoleCategoryVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + roleName = Optional.optional(nativeFromJson, nativeToJson); + roleName.value = json['roleName'] == null ? null : nativeFromJson(json['roleName']); + + + category = Optional.optional((data) => RoleCategoryType.values.byName(data), enumSerializer); + category.value = json['category'] == null ? null : RoleCategoryType.values.byName(json['category']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateRoleCategoryVariables otherTyped = other as UpdateRoleCategoryVariables; + return id == otherTyped.id && + roleName == otherTyped.roleName && + category == otherTyped.category; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, roleName.hashCode, category.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(roleName.state == OptionalState.set) { + json['roleName'] = roleName.toJson(); + } + if(category.state == OptionalState.set) { + json['category'] = category.toJson(); + } + return json; + } + + UpdateRoleCategoryVariables({ + required this.id, + required this.roleName, + required this.category, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_shift.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_shift.dart new file mode 100644 index 00000000..8739955f --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_shift.dart @@ -0,0 +1,399 @@ +part of 'generated.dart'; + +class UpdateShiftVariablesBuilder { + String id; + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _orderId = Optional.optional(nativeFromJson, nativeToJson); + Optional _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + Optional _startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + Optional _endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + Optional _hours = Optional.optional(nativeFromJson, nativeToJson); + Optional _cost = Optional.optional(nativeFromJson, nativeToJson); + Optional _location = Optional.optional(nativeFromJson, nativeToJson); + Optional _locationAddress = Optional.optional(nativeFromJson, nativeToJson); + Optional _latitude = Optional.optional(nativeFromJson, nativeToJson); + Optional _longitude = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); + Optional _workersNeeded = Optional.optional(nativeFromJson, nativeToJson); + Optional _filled = Optional.optional(nativeFromJson, nativeToJson); + Optional _filledAt = Optional.optional((json) => json['filledAt'] = Timestamp.fromJson(json['filledAt']), defaultSerializer); + Optional> _managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + Optional _durationDays = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateShiftVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateShiftVariablesBuilder orderId(String? t) { + _orderId.value = t; + return this; + } + UpdateShiftVariablesBuilder date(Timestamp? t) { + _date.value = t; + return this; + } + UpdateShiftVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + UpdateShiftVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + UpdateShiftVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + UpdateShiftVariablesBuilder cost(double? t) { + _cost.value = t; + return this; + } + UpdateShiftVariablesBuilder location(String? t) { + _location.value = t; + return this; + } + UpdateShiftVariablesBuilder locationAddress(String? t) { + _locationAddress.value = t; + return this; + } + UpdateShiftVariablesBuilder latitude(double? t) { + _latitude.value = t; + return this; + } + UpdateShiftVariablesBuilder longitude(double? t) { + _longitude.value = t; + return this; + } + UpdateShiftVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateShiftVariablesBuilder status(ShiftStatus? t) { + _status.value = t; + return this; + } + UpdateShiftVariablesBuilder workersNeeded(int? t) { + _workersNeeded.value = t; + return this; + } + UpdateShiftVariablesBuilder filled(int? t) { + _filled.value = t; + return this; + } + UpdateShiftVariablesBuilder filledAt(Timestamp? t) { + _filledAt.value = t; + return this; + } + UpdateShiftVariablesBuilder managers(List? t) { + _managers.value = t; + return this; + } + UpdateShiftVariablesBuilder durationDays(int? t) { + _durationDays.value = t; + return this; + } + + UpdateShiftVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateShiftData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateShiftVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateShiftVariables vars= UpdateShiftVariables(id: id,title: _title,orderId: _orderId,date: _date,startTime: _startTime,endTime: _endTime,hours: _hours,cost: _cost,location: _location,locationAddress: _locationAddress,latitude: _latitude,longitude: _longitude,description: _description,status: _status,workersNeeded: _workersNeeded,filled: _filled,filledAt: _filledAt,managers: _managers,durationDays: _durationDays,); + return _dataConnect.mutation("updateShift", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateShiftShiftUpdate { + final String id; + UpdateShiftShiftUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateShiftShiftUpdate otherTyped = other as UpdateShiftShiftUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateShiftShiftUpdate({ + required this.id, + }); +} + +@immutable +class UpdateShiftData { + final UpdateShiftShiftUpdate? shift_update; + UpdateShiftData.fromJson(dynamic json): + + shift_update = json['shift_update'] == null ? null : UpdateShiftShiftUpdate.fromJson(json['shift_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateShiftData otherTyped = other as UpdateShiftData; + return shift_update == otherTyped.shift_update; + + } + @override + int get hashCode => shift_update.hashCode; + + + Map toJson() { + Map json = {}; + if (shift_update != null) { + json['shift_update'] = shift_update!.toJson(); + } + return json; + } + + UpdateShiftData({ + this.shift_update, + }); +} + +@immutable +class UpdateShiftVariables { + final String id; + late final Optionaltitle; + late final OptionalorderId; + late final Optionaldate; + late final OptionalstartTime; + late final OptionalendTime; + late final Optionalhours; + late final Optionalcost; + late final Optionallocation; + late final OptionallocationAddress; + late final Optionallatitude; + late final Optionallongitude; + late final Optionaldescription; + late final Optionalstatus; + late final OptionalworkersNeeded; + late final Optionalfilled; + late final OptionalfilledAt; + late final Optional>managers; + late final OptionaldurationDays; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateShiftVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + orderId = Optional.optional(nativeFromJson, nativeToJson); + orderId.value = json['orderId'] == null ? null : nativeFromJson(json['orderId']); + + + date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer); + date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']); + + + startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + startTime.value = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']); + + + endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + endTime.value = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']); + + + hours = Optional.optional(nativeFromJson, nativeToJson); + hours.value = json['hours'] == null ? null : nativeFromJson(json['hours']); + + + cost = Optional.optional(nativeFromJson, nativeToJson); + cost.value = json['cost'] == null ? null : nativeFromJson(json['cost']); + + + location = Optional.optional(nativeFromJson, nativeToJson); + location.value = json['location'] == null ? null : nativeFromJson(json['location']); + + + locationAddress = Optional.optional(nativeFromJson, nativeToJson); + locationAddress.value = json['locationAddress'] == null ? null : nativeFromJson(json['locationAddress']); + + + latitude = Optional.optional(nativeFromJson, nativeToJson); + latitude.value = json['latitude'] == null ? null : nativeFromJson(json['latitude']); + + + longitude = Optional.optional(nativeFromJson, nativeToJson); + longitude.value = json['longitude'] == null ? null : nativeFromJson(json['longitude']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + status = Optional.optional((data) => ShiftStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : ShiftStatus.values.byName(json['status']); + + + workersNeeded = Optional.optional(nativeFromJson, nativeToJson); + workersNeeded.value = json['workersNeeded'] == null ? null : nativeFromJson(json['workersNeeded']); + + + filled = Optional.optional(nativeFromJson, nativeToJson); + filled.value = json['filled'] == null ? null : nativeFromJson(json['filled']); + + + filledAt = Optional.optional((json) => json['filledAt'] = Timestamp.fromJson(json['filledAt']), defaultSerializer); + filledAt.value = json['filledAt'] == null ? null : Timestamp.fromJson(json['filledAt']); + + + managers = Optional.optional(listDeserializer(AnyValue.fromJson), listSerializer(defaultSerializer)); + managers.value = json['managers'] == null ? null : (json['managers'] as List) + .map((e) => AnyValue.fromJson(e)) + .toList(); + + + durationDays = Optional.optional(nativeFromJson, nativeToJson); + durationDays.value = json['durationDays'] == null ? null : nativeFromJson(json['durationDays']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateShiftVariables otherTyped = other as UpdateShiftVariables; + return id == otherTyped.id && + title == otherTyped.title && + orderId == otherTyped.orderId && + date == otherTyped.date && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + cost == otherTyped.cost && + location == otherTyped.location && + locationAddress == otherTyped.locationAddress && + latitude == otherTyped.latitude && + longitude == otherTyped.longitude && + description == otherTyped.description && + status == otherTyped.status && + workersNeeded == otherTyped.workersNeeded && + filled == otherTyped.filled && + filledAt == otherTyped.filledAt && + managers == otherTyped.managers && + durationDays == otherTyped.durationDays; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, title.hashCode, orderId.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, cost.hashCode, location.hashCode, locationAddress.hashCode, latitude.hashCode, longitude.hashCode, description.hashCode, status.hashCode, workersNeeded.hashCode, filled.hashCode, filledAt.hashCode, managers.hashCode, durationDays.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(orderId.state == OptionalState.set) { + json['orderId'] = orderId.toJson(); + } + if(date.state == OptionalState.set) { + json['date'] = date.toJson(); + } + if(startTime.state == OptionalState.set) { + json['startTime'] = startTime.toJson(); + } + if(endTime.state == OptionalState.set) { + json['endTime'] = endTime.toJson(); + } + if(hours.state == OptionalState.set) { + json['hours'] = hours.toJson(); + } + if(cost.state == OptionalState.set) { + json['cost'] = cost.toJson(); + } + if(location.state == OptionalState.set) { + json['location'] = location.toJson(); + } + if(locationAddress.state == OptionalState.set) { + json['locationAddress'] = locationAddress.toJson(); + } + if(latitude.state == OptionalState.set) { + json['latitude'] = latitude.toJson(); + } + if(longitude.state == OptionalState.set) { + json['longitude'] = longitude.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(workersNeeded.state == OptionalState.set) { + json['workersNeeded'] = workersNeeded.toJson(); + } + if(filled.state == OptionalState.set) { + json['filled'] = filled.toJson(); + } + if(filledAt.state == OptionalState.set) { + json['filledAt'] = filledAt.toJson(); + } + if(managers.state == OptionalState.set) { + json['managers'] = managers.toJson(); + } + if(durationDays.state == OptionalState.set) { + json['durationDays'] = durationDays.toJson(); + } + return json; + } + + UpdateShiftVariables({ + required this.id, + required this.title, + required this.orderId, + required this.date, + required this.startTime, + required this.endTime, + required this.hours, + required this.cost, + required this.location, + required this.locationAddress, + required this.latitude, + required this.longitude, + required this.description, + required this.status, + required this.workersNeeded, + required this.filled, + required this.filledAt, + required this.managers, + required this.durationDays, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_shift_role.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_shift_role.dart new file mode 100644 index 00000000..e85ddb18 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_shift_role.dart @@ -0,0 +1,274 @@ +part of 'generated.dart'; + +class UpdateShiftRoleVariablesBuilder { + String shiftId; + String roleId; + Optional _count = Optional.optional(nativeFromJson, nativeToJson); + Optional _assigned = Optional.optional(nativeFromJson, nativeToJson); + Optional _startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + Optional _endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + Optional _hours = Optional.optional(nativeFromJson, nativeToJson); + Optional _department = Optional.optional(nativeFromJson, nativeToJson); + Optional _uniform = Optional.optional(nativeFromJson, nativeToJson); + Optional _breakType = Optional.optional((data) => BreakDuration.values.byName(data), enumSerializer); + Optional _totalValue = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateShiftRoleVariablesBuilder count(int? t) { + _count.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder assigned(int? t) { + _assigned.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder startTime(Timestamp? t) { + _startTime.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder endTime(Timestamp? t) { + _endTime.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder hours(double? t) { + _hours.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder uniform(String? t) { + _uniform.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder breakType(BreakDuration? t) { + _breakType.value = t; + return this; + } + UpdateShiftRoleVariablesBuilder totalValue(double? t) { + _totalValue.value = t; + return this; + } + + UpdateShiftRoleVariablesBuilder(this._dataConnect, {required this.shiftId,required this.roleId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateShiftRoleData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateShiftRoleVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateShiftRoleVariables vars= UpdateShiftRoleVariables(shiftId: shiftId,roleId: roleId,count: _count,assigned: _assigned,startTime: _startTime,endTime: _endTime,hours: _hours,department: _department,uniform: _uniform,breakType: _breakType,totalValue: _totalValue,); + return _dataConnect.mutation("updateShiftRole", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateShiftRoleShiftRoleUpdate { + final String shiftId; + final String roleId; + UpdateShiftRoleShiftRoleUpdate.fromJson(dynamic json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateShiftRoleShiftRoleUpdate otherTyped = other as UpdateShiftRoleShiftRoleUpdate; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + return json; + } + + UpdateShiftRoleShiftRoleUpdate({ + required this.shiftId, + required this.roleId, + }); +} + +@immutable +class UpdateShiftRoleData { + final UpdateShiftRoleShiftRoleUpdate? shiftRole_update; + UpdateShiftRoleData.fromJson(dynamic json): + + shiftRole_update = json['shiftRole_update'] == null ? null : UpdateShiftRoleShiftRoleUpdate.fromJson(json['shiftRole_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateShiftRoleData otherTyped = other as UpdateShiftRoleData; + return shiftRole_update == otherTyped.shiftRole_update; + + } + @override + int get hashCode => shiftRole_update.hashCode; + + + Map toJson() { + Map json = {}; + if (shiftRole_update != null) { + json['shiftRole_update'] = shiftRole_update!.toJson(); + } + return json; + } + + UpdateShiftRoleData({ + this.shiftRole_update, + }); +} + +@immutable +class UpdateShiftRoleVariables { + final String shiftId; + final String roleId; + late final Optionalcount; + late final Optionalassigned; + late final OptionalstartTime; + late final OptionalendTime; + late final Optionalhours; + late final Optionaldepartment; + late final Optionaluniform; + late final OptionalbreakType; + late final OptionaltotalValue; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateShiftRoleVariables.fromJson(Map json): + + shiftId = nativeFromJson(json['shiftId']), + roleId = nativeFromJson(json['roleId']) { + + + + + count = Optional.optional(nativeFromJson, nativeToJson); + count.value = json['count'] == null ? null : nativeFromJson(json['count']); + + + assigned = Optional.optional(nativeFromJson, nativeToJson); + assigned.value = json['assigned'] == null ? null : nativeFromJson(json['assigned']); + + + startTime = Optional.optional((json) => json['startTime'] = Timestamp.fromJson(json['startTime']), defaultSerializer); + startTime.value = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']); + + + endTime = Optional.optional((json) => json['endTime'] = Timestamp.fromJson(json['endTime']), defaultSerializer); + endTime.value = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']); + + + hours = Optional.optional(nativeFromJson, nativeToJson); + hours.value = json['hours'] == null ? null : nativeFromJson(json['hours']); + + + department = Optional.optional(nativeFromJson, nativeToJson); + department.value = json['department'] == null ? null : nativeFromJson(json['department']); + + + uniform = Optional.optional(nativeFromJson, nativeToJson); + uniform.value = json['uniform'] == null ? null : nativeFromJson(json['uniform']); + + + breakType = Optional.optional((data) => BreakDuration.values.byName(data), enumSerializer); + breakType.value = json['breakType'] == null ? null : BreakDuration.values.byName(json['breakType']); + + + totalValue = Optional.optional(nativeFromJson, nativeToJson); + totalValue.value = json['totalValue'] == null ? null : nativeFromJson(json['totalValue']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateShiftRoleVariables otherTyped = other as UpdateShiftRoleVariables; + return shiftId == otherTyped.shiftId && + roleId == otherTyped.roleId && + count == otherTyped.count && + assigned == otherTyped.assigned && + startTime == otherTyped.startTime && + endTime == otherTyped.endTime && + hours == otherTyped.hours && + department == otherTyped.department && + uniform == otherTyped.uniform && + breakType == otherTyped.breakType && + totalValue == otherTyped.totalValue; + + } + @override + int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, department.hashCode, uniform.hashCode, breakType.hashCode, totalValue.hashCode]); + + + Map toJson() { + Map json = {}; + json['shiftId'] = nativeToJson(shiftId); + json['roleId'] = nativeToJson(roleId); + if(count.state == OptionalState.set) { + json['count'] = count.toJson(); + } + if(assigned.state == OptionalState.set) { + json['assigned'] = assigned.toJson(); + } + if(startTime.state == OptionalState.set) { + json['startTime'] = startTime.toJson(); + } + if(endTime.state == OptionalState.set) { + json['endTime'] = endTime.toJson(); + } + if(hours.state == OptionalState.set) { + json['hours'] = hours.toJson(); + } + if(department.state == OptionalState.set) { + json['department'] = department.toJson(); + } + if(uniform.state == OptionalState.set) { + json['uniform'] = uniform.toJson(); + } + if(breakType.state == OptionalState.set) { + json['breakType'] = breakType.toJson(); + } + if(totalValue.state == OptionalState.set) { + json['totalValue'] = totalValue.toJson(); + } + return json; + } + + UpdateShiftRoleVariables({ + required this.shiftId, + required this.roleId, + required this.count, + required this.assigned, + required this.startTime, + required this.endTime, + required this.hours, + required this.department, + required this.uniform, + required this.breakType, + required this.totalValue, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff.dart new file mode 100644 index 00000000..2c7a7a26 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff.dart @@ -0,0 +1,622 @@ +part of 'generated.dart'; + +class UpdateStaffVariablesBuilder { + String id; + Optional _userId = Optional.optional(nativeFromJson, nativeToJson); + Optional _fullName = Optional.optional(nativeFromJson, nativeToJson); + Optional _level = Optional.optional(nativeFromJson, nativeToJson); + Optional _role = Optional.optional(nativeFromJson, nativeToJson); + Optional _phone = Optional.optional(nativeFromJson, nativeToJson); + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _photoUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalShifts = Optional.optional(nativeFromJson, nativeToJson); + Optional _averageRating = Optional.optional(nativeFromJson, nativeToJson); + Optional _onTimeRate = Optional.optional(nativeFromJson, nativeToJson); + Optional _noShowCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _cancellationCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _reliabilityScore = Optional.optional(nativeFromJson, nativeToJson); + Optional _bio = Optional.optional(nativeFromJson, nativeToJson); + Optional _industries = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _preferredLocations = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson); + Optional _languages = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _itemsAttire = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _xp = Optional.optional(nativeFromJson, nativeToJson); + Optional _badges = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _isRecommended = Optional.optional(nativeFromJson, nativeToJson); + Optional _ownerId = Optional.optional(nativeFromJson, nativeToJson); + Optional _department = Optional.optional((data) => DepartmentType.values.byName(data), enumSerializer); + Optional _hubId = Optional.optional(nativeFromJson, nativeToJson); + Optional _manager = Optional.optional(nativeFromJson, nativeToJson); + Optional _english = Optional.optional((data) => EnglishProficiency.values.byName(data), enumSerializer); + Optional _backgroundCheckStatus = Optional.optional((data) => BackgroundCheckStatus.values.byName(data), enumSerializer); + Optional _employmentType = Optional.optional((data) => EmploymentType.values.byName(data), enumSerializer); + Optional _initial = Optional.optional(nativeFromJson, nativeToJson); + Optional _englishRequired = Optional.optional(nativeFromJson, nativeToJson); + Optional _city = Optional.optional(nativeFromJson, nativeToJson); + Optional _addres = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateStaffVariablesBuilder userId(String? t) { + _userId.value = t; + return this; + } + UpdateStaffVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + UpdateStaffVariablesBuilder level(String? t) { + _level.value = t; + return this; + } + UpdateStaffVariablesBuilder role(String? t) { + _role.value = t; + return this; + } + UpdateStaffVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateStaffVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateStaffVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + UpdateStaffVariablesBuilder totalShifts(int? t) { + _totalShifts.value = t; + return this; + } + UpdateStaffVariablesBuilder averageRating(double? t) { + _averageRating.value = t; + return this; + } + UpdateStaffVariablesBuilder onTimeRate(int? t) { + _onTimeRate.value = t; + return this; + } + UpdateStaffVariablesBuilder noShowCount(int? t) { + _noShowCount.value = t; + return this; + } + UpdateStaffVariablesBuilder cancellationCount(int? t) { + _cancellationCount.value = t; + return this; + } + UpdateStaffVariablesBuilder reliabilityScore(int? t) { + _reliabilityScore.value = t; + return this; + } + UpdateStaffVariablesBuilder bio(String? t) { + _bio.value = t; + return this; + } + UpdateStaffVariablesBuilder industries(AnyValue? t) { + _industries.value = t; + return this; + } + UpdateStaffVariablesBuilder preferredLocations(AnyValue? t) { + _preferredLocations.value = t; + return this; + } + UpdateStaffVariablesBuilder maxDistanceMiles(int? t) { + _maxDistanceMiles.value = t; + return this; + } + UpdateStaffVariablesBuilder languages(AnyValue? t) { + _languages.value = t; + return this; + } + UpdateStaffVariablesBuilder itemsAttire(AnyValue? t) { + _itemsAttire.value = t; + return this; + } + UpdateStaffVariablesBuilder xp(int? t) { + _xp.value = t; + return this; + } + UpdateStaffVariablesBuilder badges(AnyValue? t) { + _badges.value = t; + return this; + } + UpdateStaffVariablesBuilder isRecommended(bool? t) { + _isRecommended.value = t; + return this; + } + UpdateStaffVariablesBuilder ownerId(String? t) { + _ownerId.value = t; + return this; + } + UpdateStaffVariablesBuilder department(DepartmentType? t) { + _department.value = t; + return this; + } + UpdateStaffVariablesBuilder hubId(String? t) { + _hubId.value = t; + return this; + } + UpdateStaffVariablesBuilder manager(String? t) { + _manager.value = t; + return this; + } + UpdateStaffVariablesBuilder english(EnglishProficiency? t) { + _english.value = t; + return this; + } + UpdateStaffVariablesBuilder backgroundCheckStatus(BackgroundCheckStatus? t) { + _backgroundCheckStatus.value = t; + return this; + } + UpdateStaffVariablesBuilder employmentType(EmploymentType? t) { + _employmentType.value = t; + return this; + } + UpdateStaffVariablesBuilder initial(String? t) { + _initial.value = t; + return this; + } + UpdateStaffVariablesBuilder englishRequired(bool? t) { + _englishRequired.value = t; + return this; + } + UpdateStaffVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateStaffVariablesBuilder addres(String? t) { + _addres.value = t; + return this; + } + + UpdateStaffVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateStaffData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateStaffVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateStaffVariables vars= UpdateStaffVariables(id: id,userId: _userId,fullName: _fullName,level: _level,role: _role,phone: _phone,email: _email,photoUrl: _photoUrl,totalShifts: _totalShifts,averageRating: _averageRating,onTimeRate: _onTimeRate,noShowCount: _noShowCount,cancellationCount: _cancellationCount,reliabilityScore: _reliabilityScore,bio: _bio,industries: _industries,preferredLocations: _preferredLocations,maxDistanceMiles: _maxDistanceMiles,languages: _languages,itemsAttire: _itemsAttire,xp: _xp,badges: _badges,isRecommended: _isRecommended,ownerId: _ownerId,department: _department,hubId: _hubId,manager: _manager,english: _english,backgroundCheckStatus: _backgroundCheckStatus,employmentType: _employmentType,initial: _initial,englishRequired: _englishRequired,city: _city,addres: _addres,); + return _dataConnect.mutation("UpdateStaff", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateStaffStaffUpdate { + final String id; + UpdateStaffStaffUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffStaffUpdate otherTyped = other as UpdateStaffStaffUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateStaffStaffUpdate({ + required this.id, + }); +} + +@immutable +class UpdateStaffData { + final UpdateStaffStaffUpdate? staff_update; + UpdateStaffData.fromJson(dynamic json): + + staff_update = json['staff_update'] == null ? null : UpdateStaffStaffUpdate.fromJson(json['staff_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffData otherTyped = other as UpdateStaffData; + return staff_update == otherTyped.staff_update; + + } + @override + int get hashCode => staff_update.hashCode; + + + Map toJson() { + Map json = {}; + if (staff_update != null) { + json['staff_update'] = staff_update!.toJson(); + } + return json; + } + + UpdateStaffData({ + this.staff_update, + }); +} + +@immutable +class UpdateStaffVariables { + final String id; + late final OptionaluserId; + late final OptionalfullName; + late final Optionallevel; + late final Optionalrole; + late final Optionalphone; + late final Optionalemail; + late final OptionalphotoUrl; + late final OptionaltotalShifts; + late final OptionalaverageRating; + late final OptionalonTimeRate; + late final OptionalnoShowCount; + late final OptionalcancellationCount; + late final OptionalreliabilityScore; + late final Optionalbio; + late final Optionalindustries; + late final OptionalpreferredLocations; + late final OptionalmaxDistanceMiles; + late final Optionallanguages; + late final OptionalitemsAttire; + late final Optionalxp; + late final Optionalbadges; + late final OptionalisRecommended; + late final OptionalownerId; + late final Optionaldepartment; + late final OptionalhubId; + late final Optionalmanager; + late final Optionalenglish; + late final OptionalbackgroundCheckStatus; + late final OptionalemploymentType; + late final Optionalinitial; + late final OptionalenglishRequired; + late final Optionalcity; + late final Optionaladdres; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateStaffVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + userId = Optional.optional(nativeFromJson, nativeToJson); + userId.value = json['userId'] == null ? null : nativeFromJson(json['userId']); + + + fullName = Optional.optional(nativeFromJson, nativeToJson); + fullName.value = json['fullName'] == null ? null : nativeFromJson(json['fullName']); + + + level = Optional.optional(nativeFromJson, nativeToJson); + level.value = json['level'] == null ? null : nativeFromJson(json['level']); + + + role = Optional.optional(nativeFromJson, nativeToJson); + role.value = json['role'] == null ? null : nativeFromJson(json['role']); + + + phone = Optional.optional(nativeFromJson, nativeToJson); + phone.value = json['phone'] == null ? null : nativeFromJson(json['phone']); + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + photoUrl = Optional.optional(nativeFromJson, nativeToJson); + photoUrl.value = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + + + totalShifts = Optional.optional(nativeFromJson, nativeToJson); + totalShifts.value = json['totalShifts'] == null ? null : nativeFromJson(json['totalShifts']); + + + averageRating = Optional.optional(nativeFromJson, nativeToJson); + averageRating.value = json['averageRating'] == null ? null : nativeFromJson(json['averageRating']); + + + onTimeRate = Optional.optional(nativeFromJson, nativeToJson); + onTimeRate.value = json['onTimeRate'] == null ? null : nativeFromJson(json['onTimeRate']); + + + noShowCount = Optional.optional(nativeFromJson, nativeToJson); + noShowCount.value = json['noShowCount'] == null ? null : nativeFromJson(json['noShowCount']); + + + cancellationCount = Optional.optional(nativeFromJson, nativeToJson); + cancellationCount.value = json['cancellationCount'] == null ? null : nativeFromJson(json['cancellationCount']); + + + reliabilityScore = Optional.optional(nativeFromJson, nativeToJson); + reliabilityScore.value = json['reliabilityScore'] == null ? null : nativeFromJson(json['reliabilityScore']); + + + bio = Optional.optional(nativeFromJson, nativeToJson); + bio.value = json['bio'] == null ? null : nativeFromJson(json['bio']); + + + industries = Optional.optional(AnyValue.fromJson, defaultSerializer); + industries.value = json['industries'] == null ? null : AnyValue.fromJson(json['industries']); + + + preferredLocations = Optional.optional(AnyValue.fromJson, defaultSerializer); + preferredLocations.value = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']); + + + maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson); + maxDistanceMiles.value = json['maxDistanceMiles'] == null ? null : nativeFromJson(json['maxDistanceMiles']); + + + languages = Optional.optional(AnyValue.fromJson, defaultSerializer); + languages.value = json['languages'] == null ? null : AnyValue.fromJson(json['languages']); + + + itemsAttire = Optional.optional(AnyValue.fromJson, defaultSerializer); + itemsAttire.value = json['itemsAttire'] == null ? null : AnyValue.fromJson(json['itemsAttire']); + + + xp = Optional.optional(nativeFromJson, nativeToJson); + xp.value = json['xp'] == null ? null : nativeFromJson(json['xp']); + + + badges = Optional.optional(AnyValue.fromJson, defaultSerializer); + badges.value = json['badges'] == null ? null : AnyValue.fromJson(json['badges']); + + + isRecommended = Optional.optional(nativeFromJson, nativeToJson); + isRecommended.value = json['isRecommended'] == null ? null : nativeFromJson(json['isRecommended']); + + + ownerId = Optional.optional(nativeFromJson, nativeToJson); + ownerId.value = json['ownerId'] == null ? null : nativeFromJson(json['ownerId']); + + + department = Optional.optional((data) => DepartmentType.values.byName(data), enumSerializer); + department.value = json['department'] == null ? null : DepartmentType.values.byName(json['department']); + + + hubId = Optional.optional(nativeFromJson, nativeToJson); + hubId.value = json['hubId'] == null ? null : nativeFromJson(json['hubId']); + + + manager = Optional.optional(nativeFromJson, nativeToJson); + manager.value = json['manager'] == null ? null : nativeFromJson(json['manager']); + + + english = Optional.optional((data) => EnglishProficiency.values.byName(data), enumSerializer); + english.value = json['english'] == null ? null : EnglishProficiency.values.byName(json['english']); + + + backgroundCheckStatus = Optional.optional((data) => BackgroundCheckStatus.values.byName(data), enumSerializer); + backgroundCheckStatus.value = json['backgroundCheckStatus'] == null ? null : BackgroundCheckStatus.values.byName(json['backgroundCheckStatus']); + + + employmentType = Optional.optional((data) => EmploymentType.values.byName(data), enumSerializer); + employmentType.value = json['employmentType'] == null ? null : EmploymentType.values.byName(json['employmentType']); + + + initial = Optional.optional(nativeFromJson, nativeToJson); + initial.value = json['initial'] == null ? null : nativeFromJson(json['initial']); + + + englishRequired = Optional.optional(nativeFromJson, nativeToJson); + englishRequired.value = json['englishRequired'] == null ? null : nativeFromJson(json['englishRequired']); + + + city = Optional.optional(nativeFromJson, nativeToJson); + city.value = json['city'] == null ? null : nativeFromJson(json['city']); + + + addres = Optional.optional(nativeFromJson, nativeToJson); + addres.value = json['addres'] == null ? null : nativeFromJson(json['addres']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffVariables otherTyped = other as UpdateStaffVariables; + return id == otherTyped.id && + userId == otherTyped.userId && + fullName == otherTyped.fullName && + level == otherTyped.level && + role == otherTyped.role && + phone == otherTyped.phone && + email == otherTyped.email && + photoUrl == otherTyped.photoUrl && + totalShifts == otherTyped.totalShifts && + averageRating == otherTyped.averageRating && + onTimeRate == otherTyped.onTimeRate && + noShowCount == otherTyped.noShowCount && + cancellationCount == otherTyped.cancellationCount && + reliabilityScore == otherTyped.reliabilityScore && + bio == otherTyped.bio && + industries == otherTyped.industries && + preferredLocations == otherTyped.preferredLocations && + maxDistanceMiles == otherTyped.maxDistanceMiles && + languages == otherTyped.languages && + itemsAttire == otherTyped.itemsAttire && + xp == otherTyped.xp && + badges == otherTyped.badges && + isRecommended == otherTyped.isRecommended && + ownerId == otherTyped.ownerId && + department == otherTyped.department && + hubId == otherTyped.hubId && + manager == otherTyped.manager && + english == otherTyped.english && + backgroundCheckStatus == otherTyped.backgroundCheckStatus && + employmentType == otherTyped.employmentType && + initial == otherTyped.initial && + englishRequired == otherTyped.englishRequired && + city == otherTyped.city && + addres == otherTyped.addres; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, ownerId.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(userId.state == OptionalState.set) { + json['userId'] = userId.toJson(); + } + if(fullName.state == OptionalState.set) { + json['fullName'] = fullName.toJson(); + } + if(level.state == OptionalState.set) { + json['level'] = level.toJson(); + } + if(role.state == OptionalState.set) { + json['role'] = role.toJson(); + } + if(phone.state == OptionalState.set) { + json['phone'] = phone.toJson(); + } + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(photoUrl.state == OptionalState.set) { + json['photoUrl'] = photoUrl.toJson(); + } + if(totalShifts.state == OptionalState.set) { + json['totalShifts'] = totalShifts.toJson(); + } + if(averageRating.state == OptionalState.set) { + json['averageRating'] = averageRating.toJson(); + } + if(onTimeRate.state == OptionalState.set) { + json['onTimeRate'] = onTimeRate.toJson(); + } + if(noShowCount.state == OptionalState.set) { + json['noShowCount'] = noShowCount.toJson(); + } + if(cancellationCount.state == OptionalState.set) { + json['cancellationCount'] = cancellationCount.toJson(); + } + if(reliabilityScore.state == OptionalState.set) { + json['reliabilityScore'] = reliabilityScore.toJson(); + } + if(bio.state == OptionalState.set) { + json['bio'] = bio.toJson(); + } + if(industries.state == OptionalState.set) { + json['industries'] = industries.toJson(); + } + if(preferredLocations.state == OptionalState.set) { + json['preferredLocations'] = preferredLocations.toJson(); + } + if(maxDistanceMiles.state == OptionalState.set) { + json['maxDistanceMiles'] = maxDistanceMiles.toJson(); + } + if(languages.state == OptionalState.set) { + json['languages'] = languages.toJson(); + } + if(itemsAttire.state == OptionalState.set) { + json['itemsAttire'] = itemsAttire.toJson(); + } + if(xp.state == OptionalState.set) { + json['xp'] = xp.toJson(); + } + if(badges.state == OptionalState.set) { + json['badges'] = badges.toJson(); + } + if(isRecommended.state == OptionalState.set) { + json['isRecommended'] = isRecommended.toJson(); + } + if(ownerId.state == OptionalState.set) { + json['ownerId'] = ownerId.toJson(); + } + if(department.state == OptionalState.set) { + json['department'] = department.toJson(); + } + if(hubId.state == OptionalState.set) { + json['hubId'] = hubId.toJson(); + } + if(manager.state == OptionalState.set) { + json['manager'] = manager.toJson(); + } + if(english.state == OptionalState.set) { + json['english'] = english.toJson(); + } + if(backgroundCheckStatus.state == OptionalState.set) { + json['backgroundCheckStatus'] = backgroundCheckStatus.toJson(); + } + if(employmentType.state == OptionalState.set) { + json['employmentType'] = employmentType.toJson(); + } + if(initial.state == OptionalState.set) { + json['initial'] = initial.toJson(); + } + if(englishRequired.state == OptionalState.set) { + json['englishRequired'] = englishRequired.toJson(); + } + if(city.state == OptionalState.set) { + json['city'] = city.toJson(); + } + if(addres.state == OptionalState.set) { + json['addres'] = addres.toJson(); + } + return json; + } + + UpdateStaffVariables({ + required this.id, + required this.userId, + required this.fullName, + required this.level, + required this.role, + required this.phone, + required this.email, + required this.photoUrl, + required this.totalShifts, + required this.averageRating, + required this.onTimeRate, + required this.noShowCount, + required this.cancellationCount, + required this.reliabilityScore, + required this.bio, + required this.industries, + required this.preferredLocations, + required this.maxDistanceMiles, + required this.languages, + required this.itemsAttire, + required this.xp, + required this.badges, + required this.isRecommended, + required this.ownerId, + required this.department, + required this.hubId, + required this.manager, + required this.english, + required this.backgroundCheckStatus, + required this.employmentType, + required this.initial, + required this.englishRequired, + required this.city, + required this.addres, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_availability.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_availability.dart new file mode 100644 index 00000000..d8d4009a --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_availability.dart @@ -0,0 +1,189 @@ +part of 'generated.dart'; + +class UpdateStaffAvailabilityVariablesBuilder { + String staffId; + DayOfWeek day; + AvailabilitySlot slot; + Optional _status = Optional.optional((data) => AvailabilityStatus.values.byName(data), enumSerializer); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateStaffAvailabilityVariablesBuilder status(AvailabilityStatus? t) { + _status.value = t; + return this; + } + UpdateStaffAvailabilityVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + UpdateStaffAvailabilityVariablesBuilder(this._dataConnect, {required this.staffId,required this.day,required this.slot,}); + Deserializer dataDeserializer = (dynamic json) => UpdateStaffAvailabilityData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateStaffAvailabilityVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateStaffAvailabilityVariables vars= UpdateStaffAvailabilityVariables(staffId: staffId,day: day,slot: slot,status: _status,notes: _notes,); + return _dataConnect.mutation("updateStaffAvailability", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateStaffAvailabilityStaffAvailabilityUpdate { + final String staffId; + final EnumValue day; + final EnumValue slot; + UpdateStaffAvailabilityStaffAvailabilityUpdate.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + day = dayOfWeekDeserializer(json['day']), + slot = availabilitySlotDeserializer(json['slot']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffAvailabilityStaffAvailabilityUpdate otherTyped = other as UpdateStaffAvailabilityStaffAvailabilityUpdate; + return staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, day.hashCode, slot.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['day'] = + dayOfWeekSerializer(day) + ; + json['slot'] = + availabilitySlotSerializer(slot) + ; + return json; + } + + UpdateStaffAvailabilityStaffAvailabilityUpdate({ + required this.staffId, + required this.day, + required this.slot, + }); +} + +@immutable +class UpdateStaffAvailabilityData { + final UpdateStaffAvailabilityStaffAvailabilityUpdate? staffAvailability_update; + UpdateStaffAvailabilityData.fromJson(dynamic json): + + staffAvailability_update = json['staffAvailability_update'] == null ? null : UpdateStaffAvailabilityStaffAvailabilityUpdate.fromJson(json['staffAvailability_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffAvailabilityData otherTyped = other as UpdateStaffAvailabilityData; + return staffAvailability_update == otherTyped.staffAvailability_update; + + } + @override + int get hashCode => staffAvailability_update.hashCode; + + + Map toJson() { + Map json = {}; + if (staffAvailability_update != null) { + json['staffAvailability_update'] = staffAvailability_update!.toJson(); + } + return json; + } + + UpdateStaffAvailabilityData({ + this.staffAvailability_update, + }); +} + +@immutable +class UpdateStaffAvailabilityVariables { + final String staffId; + final DayOfWeek day; + final AvailabilitySlot slot; + late final Optionalstatus; + late final Optionalnotes; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateStaffAvailabilityVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + day = DayOfWeek.values.byName(json['day']), + slot = AvailabilitySlot.values.byName(json['slot']) { + + + + + + status = Optional.optional((data) => AvailabilityStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : AvailabilityStatus.values.byName(json['status']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffAvailabilityVariables otherTyped = other as UpdateStaffAvailabilityVariables; + return staffId == otherTyped.staffId && + day == otherTyped.day && + slot == otherTyped.slot && + status == otherTyped.status && + notes == otherTyped.notes; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, day.hashCode, slot.hashCode, status.hashCode, notes.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['day'] = + day.name + ; + json['slot'] = + slot.name + ; + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + return json; + } + + UpdateStaffAvailabilityVariables({ + required this.staffId, + required this.day, + required this.slot, + required this.status, + required this.notes, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_availability_stats.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_availability_stats.dart new file mode 100644 index 00000000..860769a1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_availability_stats.dart @@ -0,0 +1,232 @@ +part of 'generated.dart'; + +class UpdateStaffAvailabilityStatsVariablesBuilder { + String staffId; + Optional _needWorkIndex = Optional.optional(nativeFromJson, nativeToJson); + Optional _utilizationPercentage = Optional.optional(nativeFromJson, nativeToJson); + Optional _predictedAvailabilityScore = Optional.optional(nativeFromJson, nativeToJson); + Optional _scheduledHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + Optional _desiredHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastShiftDate = Optional.optional((json) => json['lastShiftDate'] = Timestamp.fromJson(json['lastShiftDate']), defaultSerializer); + Optional _acceptanceRate = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateStaffAvailabilityStatsVariablesBuilder needWorkIndex(int? t) { + _needWorkIndex.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder utilizationPercentage(int? t) { + _utilizationPercentage.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder predictedAvailabilityScore(int? t) { + _predictedAvailabilityScore.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder scheduledHoursThisPeriod(int? t) { + _scheduledHoursThisPeriod.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder desiredHoursThisPeriod(int? t) { + _desiredHoursThisPeriod.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder lastShiftDate(Timestamp? t) { + _lastShiftDate.value = t; + return this; + } + UpdateStaffAvailabilityStatsVariablesBuilder acceptanceRate(int? t) { + _acceptanceRate.value = t; + return this; + } + + UpdateStaffAvailabilityStatsVariablesBuilder(this._dataConnect, {required this.staffId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateStaffAvailabilityStatsData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateStaffAvailabilityStatsVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateStaffAvailabilityStatsVariables vars= UpdateStaffAvailabilityStatsVariables(staffId: staffId,needWorkIndex: _needWorkIndex,utilizationPercentage: _utilizationPercentage,predictedAvailabilityScore: _predictedAvailabilityScore,scheduledHoursThisPeriod: _scheduledHoursThisPeriod,desiredHoursThisPeriod: _desiredHoursThisPeriod,lastShiftDate: _lastShiftDate,acceptanceRate: _acceptanceRate,); + return _dataConnect.mutation("updateStaffAvailabilityStats", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateStaffAvailabilityStatsStaffAvailabilityStatsUpdate { + final String staffId; + UpdateStaffAvailabilityStatsStaffAvailabilityStatsUpdate.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffAvailabilityStatsStaffAvailabilityStatsUpdate otherTyped = other as UpdateStaffAvailabilityStatsStaffAvailabilityStatsUpdate; + return staffId == otherTyped.staffId; + + } + @override + int get hashCode => staffId.hashCode; + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + return json; + } + + UpdateStaffAvailabilityStatsStaffAvailabilityStatsUpdate({ + required this.staffId, + }); +} + +@immutable +class UpdateStaffAvailabilityStatsData { + final UpdateStaffAvailabilityStatsStaffAvailabilityStatsUpdate? staffAvailabilityStats_update; + UpdateStaffAvailabilityStatsData.fromJson(dynamic json): + + staffAvailabilityStats_update = json['staffAvailabilityStats_update'] == null ? null : UpdateStaffAvailabilityStatsStaffAvailabilityStatsUpdate.fromJson(json['staffAvailabilityStats_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffAvailabilityStatsData otherTyped = other as UpdateStaffAvailabilityStatsData; + return staffAvailabilityStats_update == otherTyped.staffAvailabilityStats_update; + + } + @override + int get hashCode => staffAvailabilityStats_update.hashCode; + + + Map toJson() { + Map json = {}; + if (staffAvailabilityStats_update != null) { + json['staffAvailabilityStats_update'] = staffAvailabilityStats_update!.toJson(); + } + return json; + } + + UpdateStaffAvailabilityStatsData({ + this.staffAvailabilityStats_update, + }); +} + +@immutable +class UpdateStaffAvailabilityStatsVariables { + final String staffId; + late final OptionalneedWorkIndex; + late final OptionalutilizationPercentage; + late final OptionalpredictedAvailabilityScore; + late final OptionalscheduledHoursThisPeriod; + late final OptionaldesiredHoursThisPeriod; + late final OptionallastShiftDate; + late final OptionalacceptanceRate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateStaffAvailabilityStatsVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']) { + + + + needWorkIndex = Optional.optional(nativeFromJson, nativeToJson); + needWorkIndex.value = json['needWorkIndex'] == null ? null : nativeFromJson(json['needWorkIndex']); + + + utilizationPercentage = Optional.optional(nativeFromJson, nativeToJson); + utilizationPercentage.value = json['utilizationPercentage'] == null ? null : nativeFromJson(json['utilizationPercentage']); + + + predictedAvailabilityScore = Optional.optional(nativeFromJson, nativeToJson); + predictedAvailabilityScore.value = json['predictedAvailabilityScore'] == null ? null : nativeFromJson(json['predictedAvailabilityScore']); + + + scheduledHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + scheduledHoursThisPeriod.value = json['scheduledHoursThisPeriod'] == null ? null : nativeFromJson(json['scheduledHoursThisPeriod']); + + + desiredHoursThisPeriod = Optional.optional(nativeFromJson, nativeToJson); + desiredHoursThisPeriod.value = json['desiredHoursThisPeriod'] == null ? null : nativeFromJson(json['desiredHoursThisPeriod']); + + + lastShiftDate = Optional.optional((json) => json['lastShiftDate'] = Timestamp.fromJson(json['lastShiftDate']), defaultSerializer); + lastShiftDate.value = json['lastShiftDate'] == null ? null : Timestamp.fromJson(json['lastShiftDate']); + + + acceptanceRate = Optional.optional(nativeFromJson, nativeToJson); + acceptanceRate.value = json['acceptanceRate'] == null ? null : nativeFromJson(json['acceptanceRate']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffAvailabilityStatsVariables otherTyped = other as UpdateStaffAvailabilityStatsVariables; + return staffId == otherTyped.staffId && + needWorkIndex == otherTyped.needWorkIndex && + utilizationPercentage == otherTyped.utilizationPercentage && + predictedAvailabilityScore == otherTyped.predictedAvailabilityScore && + scheduledHoursThisPeriod == otherTyped.scheduledHoursThisPeriod && + desiredHoursThisPeriod == otherTyped.desiredHoursThisPeriod && + lastShiftDate == otherTyped.lastShiftDate && + acceptanceRate == otherTyped.acceptanceRate; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, needWorkIndex.hashCode, utilizationPercentage.hashCode, predictedAvailabilityScore.hashCode, scheduledHoursThisPeriod.hashCode, desiredHoursThisPeriod.hashCode, lastShiftDate.hashCode, acceptanceRate.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + if(needWorkIndex.state == OptionalState.set) { + json['needWorkIndex'] = needWorkIndex.toJson(); + } + if(utilizationPercentage.state == OptionalState.set) { + json['utilizationPercentage'] = utilizationPercentage.toJson(); + } + if(predictedAvailabilityScore.state == OptionalState.set) { + json['predictedAvailabilityScore'] = predictedAvailabilityScore.toJson(); + } + if(scheduledHoursThisPeriod.state == OptionalState.set) { + json['scheduledHoursThisPeriod'] = scheduledHoursThisPeriod.toJson(); + } + if(desiredHoursThisPeriod.state == OptionalState.set) { + json['desiredHoursThisPeriod'] = desiredHoursThisPeriod.toJson(); + } + if(lastShiftDate.state == OptionalState.set) { + json['lastShiftDate'] = lastShiftDate.toJson(); + } + if(acceptanceRate.state == OptionalState.set) { + json['acceptanceRate'] = acceptanceRate.toJson(); + } + return json; + } + + UpdateStaffAvailabilityStatsVariables({ + required this.staffId, + required this.needWorkIndex, + required this.utilizationPercentage, + required this.predictedAvailabilityScore, + required this.scheduledHoursThisPeriod, + required this.desiredHoursThisPeriod, + required this.lastShiftDate, + required this.acceptanceRate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_course.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_course.dart new file mode 100644 index 00000000..69ac6b65 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_course.dart @@ -0,0 +1,202 @@ +part of 'generated.dart'; + +class UpdateStaffCourseVariablesBuilder { + String id; + Optional _progressPercent = Optional.optional(nativeFromJson, nativeToJson); + Optional _completed = Optional.optional(nativeFromJson, nativeToJson); + Optional _completedAt = Optional.optional((json) => json['completedAt'] = Timestamp.fromJson(json['completedAt']), defaultSerializer); + Optional _startedAt = Optional.optional((json) => json['startedAt'] = Timestamp.fromJson(json['startedAt']), defaultSerializer); + Optional _lastAccessedAt = Optional.optional((json) => json['lastAccessedAt'] = Timestamp.fromJson(json['lastAccessedAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateStaffCourseVariablesBuilder progressPercent(int? t) { + _progressPercent.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder completed(bool? t) { + _completed.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder completedAt(Timestamp? t) { + _completedAt.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder startedAt(Timestamp? t) { + _startedAt.value = t; + return this; + } + UpdateStaffCourseVariablesBuilder lastAccessedAt(Timestamp? t) { + _lastAccessedAt.value = t; + return this; + } + + UpdateStaffCourseVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateStaffCourseData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateStaffCourseVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateStaffCourseVariables vars= UpdateStaffCourseVariables(id: id,progressPercent: _progressPercent,completed: _completed,completedAt: _completedAt,startedAt: _startedAt,lastAccessedAt: _lastAccessedAt,); + return _dataConnect.mutation("updateStaffCourse", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateStaffCourseStaffCourseUpdate { + final String id; + UpdateStaffCourseStaffCourseUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffCourseStaffCourseUpdate otherTyped = other as UpdateStaffCourseStaffCourseUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateStaffCourseStaffCourseUpdate({ + required this.id, + }); +} + +@immutable +class UpdateStaffCourseData { + final UpdateStaffCourseStaffCourseUpdate? staffCourse_update; + UpdateStaffCourseData.fromJson(dynamic json): + + staffCourse_update = json['staffCourse_update'] == null ? null : UpdateStaffCourseStaffCourseUpdate.fromJson(json['staffCourse_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffCourseData otherTyped = other as UpdateStaffCourseData; + return staffCourse_update == otherTyped.staffCourse_update; + + } + @override + int get hashCode => staffCourse_update.hashCode; + + + Map toJson() { + Map json = {}; + if (staffCourse_update != null) { + json['staffCourse_update'] = staffCourse_update!.toJson(); + } + return json; + } + + UpdateStaffCourseData({ + this.staffCourse_update, + }); +} + +@immutable +class UpdateStaffCourseVariables { + final String id; + late final OptionalprogressPercent; + late final Optionalcompleted; + late final OptionalcompletedAt; + late final OptionalstartedAt; + late final OptionallastAccessedAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateStaffCourseVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + progressPercent = Optional.optional(nativeFromJson, nativeToJson); + progressPercent.value = json['progressPercent'] == null ? null : nativeFromJson(json['progressPercent']); + + + completed = Optional.optional(nativeFromJson, nativeToJson); + completed.value = json['completed'] == null ? null : nativeFromJson(json['completed']); + + + completedAt = Optional.optional((json) => json['completedAt'] = Timestamp.fromJson(json['completedAt']), defaultSerializer); + completedAt.value = json['completedAt'] == null ? null : Timestamp.fromJson(json['completedAt']); + + + startedAt = Optional.optional((json) => json['startedAt'] = Timestamp.fromJson(json['startedAt']), defaultSerializer); + startedAt.value = json['startedAt'] == null ? null : Timestamp.fromJson(json['startedAt']); + + + lastAccessedAt = Optional.optional((json) => json['lastAccessedAt'] = Timestamp.fromJson(json['lastAccessedAt']), defaultSerializer); + lastAccessedAt.value = json['lastAccessedAt'] == null ? null : Timestamp.fromJson(json['lastAccessedAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffCourseVariables otherTyped = other as UpdateStaffCourseVariables; + return id == otherTyped.id && + progressPercent == otherTyped.progressPercent && + completed == otherTyped.completed && + completedAt == otherTyped.completedAt && + startedAt == otherTyped.startedAt && + lastAccessedAt == otherTyped.lastAccessedAt; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, progressPercent.hashCode, completed.hashCode, completedAt.hashCode, startedAt.hashCode, lastAccessedAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(progressPercent.state == OptionalState.set) { + json['progressPercent'] = progressPercent.toJson(); + } + if(completed.state == OptionalState.set) { + json['completed'] = completed.toJson(); + } + if(completedAt.state == OptionalState.set) { + json['completedAt'] = completedAt.toJson(); + } + if(startedAt.state == OptionalState.set) { + json['startedAt'] = startedAt.toJson(); + } + if(lastAccessedAt.state == OptionalState.set) { + json['lastAccessedAt'] = lastAccessedAt.toJson(); + } + return json; + } + + UpdateStaffCourseVariables({ + required this.id, + required this.progressPercent, + required this.completed, + required this.completedAt, + required this.startedAt, + required this.lastAccessedAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_document.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_document.dart new file mode 100644 index 00000000..df83921b --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_staff_document.dart @@ -0,0 +1,184 @@ +part of 'generated.dart'; + +class UpdateStaffDocumentVariablesBuilder { + String staffId; + String documentId; + Optional _status = Optional.optional((data) => DocumentStatus.values.byName(data), enumSerializer); + Optional _documentUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _expiryDate = Optional.optional((json) => json['expiryDate'] = Timestamp.fromJson(json['expiryDate']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateStaffDocumentVariablesBuilder status(DocumentStatus? t) { + _status.value = t; + return this; + } + UpdateStaffDocumentVariablesBuilder documentUrl(String? t) { + _documentUrl.value = t; + return this; + } + UpdateStaffDocumentVariablesBuilder expiryDate(Timestamp? t) { + _expiryDate.value = t; + return this; + } + + UpdateStaffDocumentVariablesBuilder(this._dataConnect, {required this.staffId,required this.documentId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateStaffDocumentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateStaffDocumentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateStaffDocumentVariables vars= UpdateStaffDocumentVariables(staffId: staffId,documentId: documentId,status: _status,documentUrl: _documentUrl,expiryDate: _expiryDate,); + return _dataConnect.mutation("updateStaffDocument", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateStaffDocumentStaffDocumentUpdate { + final String staffId; + final String documentId; + UpdateStaffDocumentStaffDocumentUpdate.fromJson(dynamic json): + + staffId = nativeFromJson(json['staffId']), + documentId = nativeFromJson(json['documentId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffDocumentStaffDocumentUpdate otherTyped = other as UpdateStaffDocumentStaffDocumentUpdate; + return staffId == otherTyped.staffId && + documentId == otherTyped.documentId; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, documentId.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['documentId'] = nativeToJson(documentId); + return json; + } + + UpdateStaffDocumentStaffDocumentUpdate({ + required this.staffId, + required this.documentId, + }); +} + +@immutable +class UpdateStaffDocumentData { + final UpdateStaffDocumentStaffDocumentUpdate? staffDocument_update; + UpdateStaffDocumentData.fromJson(dynamic json): + + staffDocument_update = json['staffDocument_update'] == null ? null : UpdateStaffDocumentStaffDocumentUpdate.fromJson(json['staffDocument_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffDocumentData otherTyped = other as UpdateStaffDocumentData; + return staffDocument_update == otherTyped.staffDocument_update; + + } + @override + int get hashCode => staffDocument_update.hashCode; + + + Map toJson() { + Map json = {}; + if (staffDocument_update != null) { + json['staffDocument_update'] = staffDocument_update!.toJson(); + } + return json; + } + + UpdateStaffDocumentData({ + this.staffDocument_update, + }); +} + +@immutable +class UpdateStaffDocumentVariables { + final String staffId; + final String documentId; + late final Optionalstatus; + late final OptionaldocumentUrl; + late final OptionalexpiryDate; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateStaffDocumentVariables.fromJson(Map json): + + staffId = nativeFromJson(json['staffId']), + documentId = nativeFromJson(json['documentId']) { + + + + + status = Optional.optional((data) => DocumentStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : DocumentStatus.values.byName(json['status']); + + + documentUrl = Optional.optional(nativeFromJson, nativeToJson); + documentUrl.value = json['documentUrl'] == null ? null : nativeFromJson(json['documentUrl']); + + + expiryDate = Optional.optional((json) => json['expiryDate'] = Timestamp.fromJson(json['expiryDate']), defaultSerializer); + expiryDate.value = json['expiryDate'] == null ? null : Timestamp.fromJson(json['expiryDate']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateStaffDocumentVariables otherTyped = other as UpdateStaffDocumentVariables; + return staffId == otherTyped.staffId && + documentId == otherTyped.documentId && + status == otherTyped.status && + documentUrl == otherTyped.documentUrl && + expiryDate == otherTyped.expiryDate; + + } + @override + int get hashCode => Object.hashAll([staffId.hashCode, documentId.hashCode, status.hashCode, documentUrl.hashCode, expiryDate.hashCode]); + + + Map toJson() { + Map json = {}; + json['staffId'] = nativeToJson(staffId); + json['documentId'] = nativeToJson(documentId); + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(documentUrl.state == OptionalState.set) { + json['documentUrl'] = documentUrl.toJson(); + } + if(expiryDate.state == OptionalState.set) { + json['expiryDate'] = expiryDate.toJson(); + } + return json; + } + + UpdateStaffDocumentVariables({ + required this.staffId, + required this.documentId, + required this.status, + required this.documentUrl, + required this.expiryDate, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_task.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_task.dart new file mode 100644 index 00000000..465f12ed --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_task.dart @@ -0,0 +1,292 @@ +part of 'generated.dart'; + +class UpdateTaskVariablesBuilder { + String id; + Optional _taskName = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _priority = Optional.optional((data) => TaskPriority.values.byName(data), enumSerializer); + Optional _status = Optional.optional((data) => TaskStatus.values.byName(data), enumSerializer); + Optional _dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + Optional _progress = Optional.optional(nativeFromJson, nativeToJson); + Optional _assignedMembers = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _orderIndex = Optional.optional(nativeFromJson, nativeToJson); + Optional _commentCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _attachmentCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _files = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateTaskVariablesBuilder taskName(String? t) { + _taskName.value = t; + return this; + } + UpdateTaskVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateTaskVariablesBuilder priority(TaskPriority? t) { + _priority.value = t; + return this; + } + UpdateTaskVariablesBuilder status(TaskStatus? t) { + _status.value = t; + return this; + } + UpdateTaskVariablesBuilder dueDate(Timestamp? t) { + _dueDate.value = t; + return this; + } + UpdateTaskVariablesBuilder progress(int? t) { + _progress.value = t; + return this; + } + UpdateTaskVariablesBuilder assignedMembers(AnyValue? t) { + _assignedMembers.value = t; + return this; + } + UpdateTaskVariablesBuilder orderIndex(int? t) { + _orderIndex.value = t; + return this; + } + UpdateTaskVariablesBuilder commentCount(int? t) { + _commentCount.value = t; + return this; + } + UpdateTaskVariablesBuilder attachmentCount(int? t) { + _attachmentCount.value = t; + return this; + } + UpdateTaskVariablesBuilder files(AnyValue? t) { + _files.value = t; + return this; + } + + UpdateTaskVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTaskData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTaskVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTaskVariables vars= UpdateTaskVariables(id: id,taskName: _taskName,description: _description,priority: _priority,status: _status,dueDate: _dueDate,progress: _progress,assignedMembers: _assignedMembers,orderIndex: _orderIndex,commentCount: _commentCount,attachmentCount: _attachmentCount,files: _files,); + return _dataConnect.mutation("updateTask", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTaskTaskUpdate { + final String id; + UpdateTaskTaskUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaskTaskUpdate otherTyped = other as UpdateTaskTaskUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTaskTaskUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTaskData { + final UpdateTaskTaskUpdate? task_update; + UpdateTaskData.fromJson(dynamic json): + + task_update = json['task_update'] == null ? null : UpdateTaskTaskUpdate.fromJson(json['task_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaskData otherTyped = other as UpdateTaskData; + return task_update == otherTyped.task_update; + + } + @override + int get hashCode => task_update.hashCode; + + + Map toJson() { + Map json = {}; + if (task_update != null) { + json['task_update'] = task_update!.toJson(); + } + return json; + } + + UpdateTaskData({ + this.task_update, + }); +} + +@immutable +class UpdateTaskVariables { + final String id; + late final OptionaltaskName; + late final Optionaldescription; + late final Optionalpriority; + late final Optionalstatus; + late final OptionaldueDate; + late final Optionalprogress; + late final OptionalassignedMembers; + late final OptionalorderIndex; + late final OptionalcommentCount; + late final OptionalattachmentCount; + late final Optionalfiles; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTaskVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + taskName = Optional.optional(nativeFromJson, nativeToJson); + taskName.value = json['taskName'] == null ? null : nativeFromJson(json['taskName']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + priority = Optional.optional((data) => TaskPriority.values.byName(data), enumSerializer); + priority.value = json['priority'] == null ? null : TaskPriority.values.byName(json['priority']); + + + status = Optional.optional((data) => TaskStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : TaskStatus.values.byName(json['status']); + + + dueDate = Optional.optional((json) => json['dueDate'] = Timestamp.fromJson(json['dueDate']), defaultSerializer); + dueDate.value = json['dueDate'] == null ? null : Timestamp.fromJson(json['dueDate']); + + + progress = Optional.optional(nativeFromJson, nativeToJson); + progress.value = json['progress'] == null ? null : nativeFromJson(json['progress']); + + + assignedMembers = Optional.optional(AnyValue.fromJson, defaultSerializer); + assignedMembers.value = json['assignedMembers'] == null ? null : AnyValue.fromJson(json['assignedMembers']); + + + orderIndex = Optional.optional(nativeFromJson, nativeToJson); + orderIndex.value = json['orderIndex'] == null ? null : nativeFromJson(json['orderIndex']); + + + commentCount = Optional.optional(nativeFromJson, nativeToJson); + commentCount.value = json['commentCount'] == null ? null : nativeFromJson(json['commentCount']); + + + attachmentCount = Optional.optional(nativeFromJson, nativeToJson); + attachmentCount.value = json['attachmentCount'] == null ? null : nativeFromJson(json['attachmentCount']); + + + files = Optional.optional(AnyValue.fromJson, defaultSerializer); + files.value = json['files'] == null ? null : AnyValue.fromJson(json['files']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaskVariables otherTyped = other as UpdateTaskVariables; + return id == otherTyped.id && + taskName == otherTyped.taskName && + description == otherTyped.description && + priority == otherTyped.priority && + status == otherTyped.status && + dueDate == otherTyped.dueDate && + progress == otherTyped.progress && + assignedMembers == otherTyped.assignedMembers && + orderIndex == otherTyped.orderIndex && + commentCount == otherTyped.commentCount && + attachmentCount == otherTyped.attachmentCount && + files == otherTyped.files; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, taskName.hashCode, description.hashCode, priority.hashCode, status.hashCode, dueDate.hashCode, progress.hashCode, assignedMembers.hashCode, orderIndex.hashCode, commentCount.hashCode, attachmentCount.hashCode, files.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(taskName.state == OptionalState.set) { + json['taskName'] = taskName.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(priority.state == OptionalState.set) { + json['priority'] = priority.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(dueDate.state == OptionalState.set) { + json['dueDate'] = dueDate.toJson(); + } + if(progress.state == OptionalState.set) { + json['progress'] = progress.toJson(); + } + if(assignedMembers.state == OptionalState.set) { + json['assignedMembers'] = assignedMembers.toJson(); + } + if(orderIndex.state == OptionalState.set) { + json['orderIndex'] = orderIndex.toJson(); + } + if(commentCount.state == OptionalState.set) { + json['commentCount'] = commentCount.toJson(); + } + if(attachmentCount.state == OptionalState.set) { + json['attachmentCount'] = attachmentCount.toJson(); + } + if(files.state == OptionalState.set) { + json['files'] = files.toJson(); + } + return json; + } + + UpdateTaskVariables({ + required this.id, + required this.taskName, + required this.description, + required this.priority, + required this.status, + required this.dueDate, + required this.progress, + required this.assignedMembers, + required this.orderIndex, + required this.commentCount, + required this.attachmentCount, + required this.files, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_task_comment.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_task_comment.dart new file mode 100644 index 00000000..8e5b81c1 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_task_comment.dart @@ -0,0 +1,157 @@ +part of 'generated.dart'; + +class UpdateTaskCommentVariablesBuilder { + String id; + Optional _comment = Optional.optional(nativeFromJson, nativeToJson); + Optional _isSystem = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateTaskCommentVariablesBuilder comment(String? t) { + _comment.value = t; + return this; + } + UpdateTaskCommentVariablesBuilder isSystem(bool? t) { + _isSystem.value = t; + return this; + } + + UpdateTaskCommentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTaskCommentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTaskCommentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTaskCommentVariables vars= UpdateTaskCommentVariables(id: id,comment: _comment,isSystem: _isSystem,); + return _dataConnect.mutation("updateTaskComment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTaskCommentTaskCommentUpdate { + final String id; + UpdateTaskCommentTaskCommentUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaskCommentTaskCommentUpdate otherTyped = other as UpdateTaskCommentTaskCommentUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTaskCommentTaskCommentUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTaskCommentData { + final UpdateTaskCommentTaskCommentUpdate? taskComment_update; + UpdateTaskCommentData.fromJson(dynamic json): + + taskComment_update = json['taskComment_update'] == null ? null : UpdateTaskCommentTaskCommentUpdate.fromJson(json['taskComment_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaskCommentData otherTyped = other as UpdateTaskCommentData; + return taskComment_update == otherTyped.taskComment_update; + + } + @override + int get hashCode => taskComment_update.hashCode; + + + Map toJson() { + Map json = {}; + if (taskComment_update != null) { + json['taskComment_update'] = taskComment_update!.toJson(); + } + return json; + } + + UpdateTaskCommentData({ + this.taskComment_update, + }); +} + +@immutable +class UpdateTaskCommentVariables { + final String id; + late final Optionalcomment; + late final OptionalisSystem; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTaskCommentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + comment = Optional.optional(nativeFromJson, nativeToJson); + comment.value = json['comment'] == null ? null : nativeFromJson(json['comment']); + + + isSystem = Optional.optional(nativeFromJson, nativeToJson); + isSystem.value = json['isSystem'] == null ? null : nativeFromJson(json['isSystem']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaskCommentVariables otherTyped = other as UpdateTaskCommentVariables; + return id == otherTyped.id && + comment == otherTyped.comment && + isSystem == otherTyped.isSystem; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, comment.hashCode, isSystem.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(comment.state == OptionalState.set) { + json['comment'] = comment.toJson(); + } + if(isSystem.state == OptionalState.set) { + json['isSystem'] = isSystem.toJson(); + } + return json; + } + + UpdateTaskCommentVariables({ + required this.id, + required this.comment, + required this.isSystem, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_tax_form.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_tax_form.dart new file mode 100644 index 00000000..abef65fc --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_tax_form.dart @@ -0,0 +1,202 @@ +part of 'generated.dart'; + +class UpdateTaxFormVariablesBuilder { + String id; + Optional _status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer); + Optional _formData = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _subtitle = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateTaxFormVariablesBuilder status(TaxFormStatus? t) { + _status.value = t; + return this; + } + UpdateTaxFormVariablesBuilder formData(AnyValue? t) { + _formData.value = t; + return this; + } + UpdateTaxFormVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateTaxFormVariablesBuilder subtitle(String? t) { + _subtitle.value = t; + return this; + } + UpdateTaxFormVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + + UpdateTaxFormVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTaxFormData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTaxFormVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTaxFormVariables vars= UpdateTaxFormVariables(id: id,status: _status,formData: _formData,title: _title,subtitle: _subtitle,description: _description,); + return _dataConnect.mutation("updateTaxForm", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTaxFormTaxFormUpdate { + final String id; + UpdateTaxFormTaxFormUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaxFormTaxFormUpdate otherTyped = other as UpdateTaxFormTaxFormUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTaxFormTaxFormUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTaxFormData { + final UpdateTaxFormTaxFormUpdate? taxForm_update; + UpdateTaxFormData.fromJson(dynamic json): + + taxForm_update = json['taxForm_update'] == null ? null : UpdateTaxFormTaxFormUpdate.fromJson(json['taxForm_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaxFormData otherTyped = other as UpdateTaxFormData; + return taxForm_update == otherTyped.taxForm_update; + + } + @override + int get hashCode => taxForm_update.hashCode; + + + Map toJson() { + Map json = {}; + if (taxForm_update != null) { + json['taxForm_update'] = taxForm_update!.toJson(); + } + return json; + } + + UpdateTaxFormData({ + this.taxForm_update, + }); +} + +@immutable +class UpdateTaxFormVariables { + final String id; + late final Optionalstatus; + late final OptionalformData; + late final Optionaltitle; + late final Optionalsubtitle; + late final Optionaldescription; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTaxFormVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + status = Optional.optional((data) => TaxFormStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : TaxFormStatus.values.byName(json['status']); + + + formData = Optional.optional(AnyValue.fromJson, defaultSerializer); + formData.value = json['formData'] == null ? null : AnyValue.fromJson(json['formData']); + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + subtitle = Optional.optional(nativeFromJson, nativeToJson); + subtitle.value = json['subtitle'] == null ? null : nativeFromJson(json['subtitle']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTaxFormVariables otherTyped = other as UpdateTaxFormVariables; + return id == otherTyped.id && + status == otherTyped.status && + formData == otherTyped.formData && + title == otherTyped.title && + subtitle == otherTyped.subtitle && + description == otherTyped.description; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, status.hashCode, formData.hashCode, title.hashCode, subtitle.hashCode, description.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + if(formData.state == OptionalState.set) { + json['formData'] = formData.toJson(); + } + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(subtitle.state == OptionalState.set) { + json['subtitle'] = subtitle.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + return json; + } + + UpdateTaxFormVariables({ + required this.id, + required this.status, + required this.formData, + required this.title, + required this.subtitle, + required this.description, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_team.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team.dart new file mode 100644 index 00000000..9c13f057 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team.dart @@ -0,0 +1,307 @@ +part of 'generated.dart'; + +class UpdateTeamVariablesBuilder { + String id; + Optional _teamName = Optional.optional(nativeFromJson, nativeToJson); + Optional _ownerName = Optional.optional(nativeFromJson, nativeToJson); + Optional _ownerRole = Optional.optional(nativeFromJson, nativeToJson); + Optional _companyLogo = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalMembers = Optional.optional(nativeFromJson, nativeToJson); + Optional _activeMembers = Optional.optional(nativeFromJson, nativeToJson); + Optional _totalHubs = Optional.optional(nativeFromJson, nativeToJson); + Optional _departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _favoriteStaffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _blockedStaffCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _favoriteStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + Optional _blockedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateTeamVariablesBuilder teamName(String? t) { + _teamName.value = t; + return this; + } + UpdateTeamVariablesBuilder ownerName(String? t) { + _ownerName.value = t; + return this; + } + UpdateTeamVariablesBuilder ownerRole(String? t) { + _ownerRole.value = t; + return this; + } + UpdateTeamVariablesBuilder companyLogo(String? t) { + _companyLogo.value = t; + return this; + } + UpdateTeamVariablesBuilder totalMembers(int? t) { + _totalMembers.value = t; + return this; + } + UpdateTeamVariablesBuilder activeMembers(int? t) { + _activeMembers.value = t; + return this; + } + UpdateTeamVariablesBuilder totalHubs(int? t) { + _totalHubs.value = t; + return this; + } + UpdateTeamVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + UpdateTeamVariablesBuilder favoriteStaffCount(int? t) { + _favoriteStaffCount.value = t; + return this; + } + UpdateTeamVariablesBuilder blockedStaffCount(int? t) { + _blockedStaffCount.value = t; + return this; + } + UpdateTeamVariablesBuilder favoriteStaff(AnyValue? t) { + _favoriteStaff.value = t; + return this; + } + UpdateTeamVariablesBuilder blockedStaff(AnyValue? t) { + _blockedStaff.value = t; + return this; + } + + UpdateTeamVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTeamData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTeamVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTeamVariables vars= UpdateTeamVariables(id: id,teamName: _teamName,ownerName: _ownerName,ownerRole: _ownerRole,companyLogo: _companyLogo,totalMembers: _totalMembers,activeMembers: _activeMembers,totalHubs: _totalHubs,departments: _departments,favoriteStaffCount: _favoriteStaffCount,blockedStaffCount: _blockedStaffCount,favoriteStaff: _favoriteStaff,blockedStaff: _blockedStaff,); + return _dataConnect.mutation("updateTeam", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTeamTeamUpdate { + final String id; + UpdateTeamTeamUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamTeamUpdate otherTyped = other as UpdateTeamTeamUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTeamTeamUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTeamData { + final UpdateTeamTeamUpdate? team_update; + UpdateTeamData.fromJson(dynamic json): + + team_update = json['team_update'] == null ? null : UpdateTeamTeamUpdate.fromJson(json['team_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamData otherTyped = other as UpdateTeamData; + return team_update == otherTyped.team_update; + + } + @override + int get hashCode => team_update.hashCode; + + + Map toJson() { + Map json = {}; + if (team_update != null) { + json['team_update'] = team_update!.toJson(); + } + return json; + } + + UpdateTeamData({ + this.team_update, + }); +} + +@immutable +class UpdateTeamVariables { + final String id; + late final OptionalteamName; + late final OptionalownerName; + late final OptionalownerRole; + late final OptionalcompanyLogo; + late final OptionaltotalMembers; + late final OptionalactiveMembers; + late final OptionaltotalHubs; + late final Optionaldepartments; + late final OptionalfavoriteStaffCount; + late final OptionalblockedStaffCount; + late final OptionalfavoriteStaff; + late final OptionalblockedStaff; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTeamVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + teamName = Optional.optional(nativeFromJson, nativeToJson); + teamName.value = json['teamName'] == null ? null : nativeFromJson(json['teamName']); + + + ownerName = Optional.optional(nativeFromJson, nativeToJson); + ownerName.value = json['ownerName'] == null ? null : nativeFromJson(json['ownerName']); + + + ownerRole = Optional.optional(nativeFromJson, nativeToJson); + ownerRole.value = json['ownerRole'] == null ? null : nativeFromJson(json['ownerRole']); + + + companyLogo = Optional.optional(nativeFromJson, nativeToJson); + companyLogo.value = json['companyLogo'] == null ? null : nativeFromJson(json['companyLogo']); + + + totalMembers = Optional.optional(nativeFromJson, nativeToJson); + totalMembers.value = json['totalMembers'] == null ? null : nativeFromJson(json['totalMembers']); + + + activeMembers = Optional.optional(nativeFromJson, nativeToJson); + activeMembers.value = json['activeMembers'] == null ? null : nativeFromJson(json['activeMembers']); + + + totalHubs = Optional.optional(nativeFromJson, nativeToJson); + totalHubs.value = json['totalHubs'] == null ? null : nativeFromJson(json['totalHubs']); + + + departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + departments.value = json['departments'] == null ? null : AnyValue.fromJson(json['departments']); + + + favoriteStaffCount = Optional.optional(nativeFromJson, nativeToJson); + favoriteStaffCount.value = json['favoriteStaffCount'] == null ? null : nativeFromJson(json['favoriteStaffCount']); + + + blockedStaffCount = Optional.optional(nativeFromJson, nativeToJson); + blockedStaffCount.value = json['blockedStaffCount'] == null ? null : nativeFromJson(json['blockedStaffCount']); + + + favoriteStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + favoriteStaff.value = json['favoriteStaff'] == null ? null : AnyValue.fromJson(json['favoriteStaff']); + + + blockedStaff = Optional.optional(AnyValue.fromJson, defaultSerializer); + blockedStaff.value = json['blockedStaff'] == null ? null : AnyValue.fromJson(json['blockedStaff']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamVariables otherTyped = other as UpdateTeamVariables; + return id == otherTyped.id && + teamName == otherTyped.teamName && + ownerName == otherTyped.ownerName && + ownerRole == otherTyped.ownerRole && + companyLogo == otherTyped.companyLogo && + totalMembers == otherTyped.totalMembers && + activeMembers == otherTyped.activeMembers && + totalHubs == otherTyped.totalHubs && + departments == otherTyped.departments && + favoriteStaffCount == otherTyped.favoriteStaffCount && + blockedStaffCount == otherTyped.blockedStaffCount && + favoriteStaff == otherTyped.favoriteStaff && + blockedStaff == otherTyped.blockedStaff; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, teamName.hashCode, ownerName.hashCode, ownerRole.hashCode, companyLogo.hashCode, totalMembers.hashCode, activeMembers.hashCode, totalHubs.hashCode, departments.hashCode, favoriteStaffCount.hashCode, blockedStaffCount.hashCode, favoriteStaff.hashCode, blockedStaff.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(teamName.state == OptionalState.set) { + json['teamName'] = teamName.toJson(); + } + if(ownerName.state == OptionalState.set) { + json['ownerName'] = ownerName.toJson(); + } + if(ownerRole.state == OptionalState.set) { + json['ownerRole'] = ownerRole.toJson(); + } + if(companyLogo.state == OptionalState.set) { + json['companyLogo'] = companyLogo.toJson(); + } + if(totalMembers.state == OptionalState.set) { + json['totalMembers'] = totalMembers.toJson(); + } + if(activeMembers.state == OptionalState.set) { + json['activeMembers'] = activeMembers.toJson(); + } + if(totalHubs.state == OptionalState.set) { + json['totalHubs'] = totalHubs.toJson(); + } + if(departments.state == OptionalState.set) { + json['departments'] = departments.toJson(); + } + if(favoriteStaffCount.state == OptionalState.set) { + json['favoriteStaffCount'] = favoriteStaffCount.toJson(); + } + if(blockedStaffCount.state == OptionalState.set) { + json['blockedStaffCount'] = blockedStaffCount.toJson(); + } + if(favoriteStaff.state == OptionalState.set) { + json['favoriteStaff'] = favoriteStaff.toJson(); + } + if(blockedStaff.state == OptionalState.set) { + json['blockedStaff'] = blockedStaff.toJson(); + } + return json; + } + + UpdateTeamVariables({ + required this.id, + required this.teamName, + required this.ownerName, + required this.ownerRole, + required this.companyLogo, + required this.totalMembers, + required this.activeMembers, + required this.totalHubs, + required this.departments, + required this.favoriteStaffCount, + required this.blockedStaffCount, + required this.favoriteStaff, + required this.blockedStaff, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_hub.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_hub.dart new file mode 100644 index 00000000..a1b41ac2 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_hub.dart @@ -0,0 +1,247 @@ +part of 'generated.dart'; + +class UpdateTeamHubVariablesBuilder { + String id; + Optional _hubName = Optional.optional(nativeFromJson, nativeToJson); + Optional _address = Optional.optional(nativeFromJson, nativeToJson); + Optional _city = Optional.optional(nativeFromJson, nativeToJson); + Optional _state = Optional.optional(nativeFromJson, nativeToJson); + Optional _zipCode = Optional.optional(nativeFromJson, nativeToJson); + Optional _managerName = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateTeamHubVariablesBuilder hubName(String? t) { + _hubName.value = t; + return this; + } + UpdateTeamHubVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateTeamHubVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateTeamHubVariablesBuilder state(String? t) { + _state.value = t; + return this; + } + UpdateTeamHubVariablesBuilder zipCode(String? t) { + _zipCode.value = t; + return this; + } + UpdateTeamHubVariablesBuilder managerName(String? t) { + _managerName.value = t; + return this; + } + UpdateTeamHubVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateTeamHubVariablesBuilder departments(AnyValue? t) { + _departments.value = t; + return this; + } + + UpdateTeamHubVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTeamHubData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTeamHubVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTeamHubVariables vars= UpdateTeamHubVariables(id: id,hubName: _hubName,address: _address,city: _city,state: _state,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,); + return _dataConnect.mutation("updateTeamHub", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTeamHubTeamHubUpdate { + final String id; + UpdateTeamHubTeamHubUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamHubTeamHubUpdate otherTyped = other as UpdateTeamHubTeamHubUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTeamHubTeamHubUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTeamHubData { + final UpdateTeamHubTeamHubUpdate? teamHub_update; + UpdateTeamHubData.fromJson(dynamic json): + + teamHub_update = json['teamHub_update'] == null ? null : UpdateTeamHubTeamHubUpdate.fromJson(json['teamHub_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamHubData otherTyped = other as UpdateTeamHubData; + return teamHub_update == otherTyped.teamHub_update; + + } + @override + int get hashCode => teamHub_update.hashCode; + + + Map toJson() { + Map json = {}; + if (teamHub_update != null) { + json['teamHub_update'] = teamHub_update!.toJson(); + } + return json; + } + + UpdateTeamHubData({ + this.teamHub_update, + }); +} + +@immutable +class UpdateTeamHubVariables { + final String id; + late final OptionalhubName; + late final Optionaladdress; + late final Optionalcity; + late final Optionalstate; + late final OptionalzipCode; + late final OptionalmanagerName; + late final OptionalisActive; + late final Optionaldepartments; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTeamHubVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + hubName = Optional.optional(nativeFromJson, nativeToJson); + hubName.value = json['hubName'] == null ? null : nativeFromJson(json['hubName']); + + + address = Optional.optional(nativeFromJson, nativeToJson); + address.value = json['address'] == null ? null : nativeFromJson(json['address']); + + + city = Optional.optional(nativeFromJson, nativeToJson); + city.value = json['city'] == null ? null : nativeFromJson(json['city']); + + + state = Optional.optional(nativeFromJson, nativeToJson); + state.value = json['state'] == null ? null : nativeFromJson(json['state']); + + + zipCode = Optional.optional(nativeFromJson, nativeToJson); + zipCode.value = json['zipCode'] == null ? null : nativeFromJson(json['zipCode']); + + + managerName = Optional.optional(nativeFromJson, nativeToJson); + managerName.value = json['managerName'] == null ? null : nativeFromJson(json['managerName']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + departments = Optional.optional(AnyValue.fromJson, defaultSerializer); + departments.value = json['departments'] == null ? null : AnyValue.fromJson(json['departments']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamHubVariables otherTyped = other as UpdateTeamHubVariables; + return id == otherTyped.id && + hubName == otherTyped.hubName && + address == otherTyped.address && + city == otherTyped.city && + state == otherTyped.state && + zipCode == otherTyped.zipCode && + managerName == otherTyped.managerName && + isActive == otherTyped.isActive && + departments == otherTyped.departments; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(hubName.state == OptionalState.set) { + json['hubName'] = hubName.toJson(); + } + if(address.state == OptionalState.set) { + json['address'] = address.toJson(); + } + if(city.state == OptionalState.set) { + json['city'] = city.toJson(); + } + if(state.state == OptionalState.set) { + json['state'] = state.toJson(); + } + if(zipCode.state == OptionalState.set) { + json['zipCode'] = zipCode.toJson(); + } + if(managerName.state == OptionalState.set) { + json['managerName'] = managerName.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(departments.state == OptionalState.set) { + json['departments'] = departments.toJson(); + } + return json; + } + + UpdateTeamHubVariables({ + required this.id, + required this.hubName, + required this.address, + required this.city, + required this.state, + required this.zipCode, + required this.managerName, + required this.isActive, + required this.departments, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_hud_department.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_hud_department.dart new file mode 100644 index 00000000..618bc4ef --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_hud_department.dart @@ -0,0 +1,172 @@ +part of 'generated.dart'; + +class UpdateTeamHudDepartmentVariablesBuilder { + String id; + Optional _name = Optional.optional(nativeFromJson, nativeToJson); + Optional _costCenter = Optional.optional(nativeFromJson, nativeToJson); + Optional _teamHubId = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateTeamHudDepartmentVariablesBuilder name(String? t) { + _name.value = t; + return this; + } + UpdateTeamHudDepartmentVariablesBuilder costCenter(String? t) { + _costCenter.value = t; + return this; + } + UpdateTeamHudDepartmentVariablesBuilder teamHubId(String? t) { + _teamHubId.value = t; + return this; + } + + UpdateTeamHudDepartmentVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTeamHudDepartmentData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTeamHudDepartmentVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTeamHudDepartmentVariables vars= UpdateTeamHudDepartmentVariables(id: id,name: _name,costCenter: _costCenter,teamHubId: _teamHubId,); + return _dataConnect.mutation("updateTeamHudDepartment", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTeamHudDepartmentTeamHudDepartmentUpdate { + final String id; + UpdateTeamHudDepartmentTeamHudDepartmentUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamHudDepartmentTeamHudDepartmentUpdate otherTyped = other as UpdateTeamHudDepartmentTeamHudDepartmentUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTeamHudDepartmentTeamHudDepartmentUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTeamHudDepartmentData { + final UpdateTeamHudDepartmentTeamHudDepartmentUpdate? teamHudDepartment_update; + UpdateTeamHudDepartmentData.fromJson(dynamic json): + + teamHudDepartment_update = json['teamHudDepartment_update'] == null ? null : UpdateTeamHudDepartmentTeamHudDepartmentUpdate.fromJson(json['teamHudDepartment_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamHudDepartmentData otherTyped = other as UpdateTeamHudDepartmentData; + return teamHudDepartment_update == otherTyped.teamHudDepartment_update; + + } + @override + int get hashCode => teamHudDepartment_update.hashCode; + + + Map toJson() { + Map json = {}; + if (teamHudDepartment_update != null) { + json['teamHudDepartment_update'] = teamHudDepartment_update!.toJson(); + } + return json; + } + + UpdateTeamHudDepartmentData({ + this.teamHudDepartment_update, + }); +} + +@immutable +class UpdateTeamHudDepartmentVariables { + final String id; + late final Optionalname; + late final OptionalcostCenter; + late final OptionalteamHubId; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTeamHudDepartmentVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + name = Optional.optional(nativeFromJson, nativeToJson); + name.value = json['name'] == null ? null : nativeFromJson(json['name']); + + + costCenter = Optional.optional(nativeFromJson, nativeToJson); + costCenter.value = json['costCenter'] == null ? null : nativeFromJson(json['costCenter']); + + + teamHubId = Optional.optional(nativeFromJson, nativeToJson); + teamHubId.value = json['teamHubId'] == null ? null : nativeFromJson(json['teamHubId']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamHudDepartmentVariables otherTyped = other as UpdateTeamHudDepartmentVariables; + return id == otherTyped.id && + name == otherTyped.name && + costCenter == otherTyped.costCenter && + teamHubId == otherTyped.teamHubId; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costCenter.hashCode, teamHubId.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(name.state == OptionalState.set) { + json['name'] = name.toJson(); + } + if(costCenter.state == OptionalState.set) { + json['costCenter'] = costCenter.toJson(); + } + if(teamHubId.state == OptionalState.set) { + json['teamHubId'] = teamHubId.toJson(); + } + return json; + } + + UpdateTeamHudDepartmentVariables({ + required this.id, + required this.name, + required this.costCenter, + required this.teamHubId, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_member.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_member.dart new file mode 100644 index 00000000..e58f0dd0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_member.dart @@ -0,0 +1,217 @@ +part of 'generated.dart'; + +class UpdateTeamMemberVariablesBuilder { + String id; + Optional _role = Optional.optional((data) => TeamMemberRole.values.byName(data), enumSerializer); + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _department = Optional.optional(nativeFromJson, nativeToJson); + Optional _teamHubId = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _inviteStatus = Optional.optional((data) => TeamMemberInviteStatus.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; UpdateTeamMemberVariablesBuilder role(TeamMemberRole? t) { + _role.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder department(String? t) { + _department.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder teamHubId(String? t) { + _teamHubId.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateTeamMemberVariablesBuilder inviteStatus(TeamMemberInviteStatus? t) { + _inviteStatus.value = t; + return this; + } + + UpdateTeamMemberVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTeamMemberData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTeamMemberVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTeamMemberVariables vars= UpdateTeamMemberVariables(id: id,role: _role,title: _title,department: _department,teamHubId: _teamHubId,isActive: _isActive,inviteStatus: _inviteStatus,); + return _dataConnect.mutation("updateTeamMember", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTeamMemberTeamMemberUpdate { + final String id; + UpdateTeamMemberTeamMemberUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamMemberTeamMemberUpdate otherTyped = other as UpdateTeamMemberTeamMemberUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTeamMemberTeamMemberUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTeamMemberData { + final UpdateTeamMemberTeamMemberUpdate? teamMember_update; + UpdateTeamMemberData.fromJson(dynamic json): + + teamMember_update = json['teamMember_update'] == null ? null : UpdateTeamMemberTeamMemberUpdate.fromJson(json['teamMember_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamMemberData otherTyped = other as UpdateTeamMemberData; + return teamMember_update == otherTyped.teamMember_update; + + } + @override + int get hashCode => teamMember_update.hashCode; + + + Map toJson() { + Map json = {}; + if (teamMember_update != null) { + json['teamMember_update'] = teamMember_update!.toJson(); + } + return json; + } + + UpdateTeamMemberData({ + this.teamMember_update, + }); +} + +@immutable +class UpdateTeamMemberVariables { + final String id; + late final Optionalrole; + late final Optionaltitle; + late final Optionaldepartment; + late final OptionalteamHubId; + late final OptionalisActive; + late final OptionalinviteStatus; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTeamMemberVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + role = Optional.optional((data) => TeamMemberRole.values.byName(data), enumSerializer); + role.value = json['role'] == null ? null : TeamMemberRole.values.byName(json['role']); + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + department = Optional.optional(nativeFromJson, nativeToJson); + department.value = json['department'] == null ? null : nativeFromJson(json['department']); + + + teamHubId = Optional.optional(nativeFromJson, nativeToJson); + teamHubId.value = json['teamHubId'] == null ? null : nativeFromJson(json['teamHubId']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + inviteStatus = Optional.optional((data) => TeamMemberInviteStatus.values.byName(data), enumSerializer); + inviteStatus.value = json['inviteStatus'] == null ? null : TeamMemberInviteStatus.values.byName(json['inviteStatus']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamMemberVariables otherTyped = other as UpdateTeamMemberVariables; + return id == otherTyped.id && + role == otherTyped.role && + title == otherTyped.title && + department == otherTyped.department && + teamHubId == otherTyped.teamHubId && + isActive == otherTyped.isActive && + inviteStatus == otherTyped.inviteStatus; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, inviteStatus.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(role.state == OptionalState.set) { + json['role'] = role.toJson(); + } + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(department.state == OptionalState.set) { + json['department'] = department.toJson(); + } + if(teamHubId.state == OptionalState.set) { + json['teamHubId'] = teamHubId.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(inviteStatus.state == OptionalState.set) { + json['inviteStatus'] = inviteStatus.toJson(); + } + return json; + } + + UpdateTeamMemberVariables({ + required this.id, + required this.role, + required this.title, + required this.department, + required this.teamHubId, + required this.isActive, + required this.inviteStatus, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_member_invite_status.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_member_invite_status.dart new file mode 100644 index 00000000..02178b04 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_team_member_invite_status.dart @@ -0,0 +1,132 @@ +part of 'generated.dart'; + +class UpdateTeamMemberInviteStatusVariablesBuilder { + String id; + TeamMemberInviteStatus inviteStatus; + + final FirebaseDataConnect _dataConnect; + UpdateTeamMemberInviteStatusVariablesBuilder(this._dataConnect, {required this.id,required this.inviteStatus,}); + Deserializer dataDeserializer = (dynamic json) => UpdateTeamMemberInviteStatusData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateTeamMemberInviteStatusVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateTeamMemberInviteStatusVariables vars= UpdateTeamMemberInviteStatusVariables(id: id,inviteStatus: inviteStatus,); + return _dataConnect.mutation("updateTeamMemberInviteStatus", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateTeamMemberInviteStatusTeamMemberUpdate { + final String id; + UpdateTeamMemberInviteStatusTeamMemberUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamMemberInviteStatusTeamMemberUpdate otherTyped = other as UpdateTeamMemberInviteStatusTeamMemberUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateTeamMemberInviteStatusTeamMemberUpdate({ + required this.id, + }); +} + +@immutable +class UpdateTeamMemberInviteStatusData { + final UpdateTeamMemberInviteStatusTeamMemberUpdate? teamMember_update; + UpdateTeamMemberInviteStatusData.fromJson(dynamic json): + + teamMember_update = json['teamMember_update'] == null ? null : UpdateTeamMemberInviteStatusTeamMemberUpdate.fromJson(json['teamMember_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamMemberInviteStatusData otherTyped = other as UpdateTeamMemberInviteStatusData; + return teamMember_update == otherTyped.teamMember_update; + + } + @override + int get hashCode => teamMember_update.hashCode; + + + Map toJson() { + Map json = {}; + if (teamMember_update != null) { + json['teamMember_update'] = teamMember_update!.toJson(); + } + return json; + } + + UpdateTeamMemberInviteStatusData({ + this.teamMember_update, + }); +} + +@immutable +class UpdateTeamMemberInviteStatusVariables { + final String id; + final TeamMemberInviteStatus inviteStatus; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateTeamMemberInviteStatusVariables.fromJson(Map json): + + id = nativeFromJson(json['id']), + inviteStatus = TeamMemberInviteStatus.values.byName(json['inviteStatus']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateTeamMemberInviteStatusVariables otherTyped = other as UpdateTeamMemberInviteStatusVariables; + return id == otherTyped.id && + inviteStatus == otherTyped.inviteStatus; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, inviteStatus.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + json['inviteStatus'] = + inviteStatus.name + ; + return json; + } + + UpdateTeamMemberInviteStatusVariables({ + required this.id, + required this.inviteStatus, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_user.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_user.dart new file mode 100644 index 00000000..b1cf739c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_user.dart @@ -0,0 +1,202 @@ +part of 'generated.dart'; + +class UpdateUserVariablesBuilder { + String id; + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _fullName = Optional.optional(nativeFromJson, nativeToJson); + Optional _role = Optional.optional((data) => UserBaseRole.values.byName(data), enumSerializer); + Optional _userRole = Optional.optional(nativeFromJson, nativeToJson); + Optional _photoUrl = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateUserVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateUserVariablesBuilder fullName(String? t) { + _fullName.value = t; + return this; + } + UpdateUserVariablesBuilder role(UserBaseRole? t) { + _role.value = t; + return this; + } + UpdateUserVariablesBuilder userRole(String? t) { + _userRole.value = t; + return this; + } + UpdateUserVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + + UpdateUserVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateUserData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateUserVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateUserVariables vars= UpdateUserVariables(id: id,email: _email,fullName: _fullName,role: _role,userRole: _userRole,photoUrl: _photoUrl,); + return _dataConnect.mutation("UpdateUser", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateUserUserUpdate { + final String id; + UpdateUserUserUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateUserUserUpdate otherTyped = other as UpdateUserUserUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateUserUserUpdate({ + required this.id, + }); +} + +@immutable +class UpdateUserData { + final UpdateUserUserUpdate? user_update; + UpdateUserData.fromJson(dynamic json): + + user_update = json['user_update'] == null ? null : UpdateUserUserUpdate.fromJson(json['user_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateUserData otherTyped = other as UpdateUserData; + return user_update == otherTyped.user_update; + + } + @override + int get hashCode => user_update.hashCode; + + + Map toJson() { + Map json = {}; + if (user_update != null) { + json['user_update'] = user_update!.toJson(); + } + return json; + } + + UpdateUserData({ + this.user_update, + }); +} + +@immutable +class UpdateUserVariables { + final String id; + late final Optionalemail; + late final OptionalfullName; + late final Optionalrole; + late final OptionaluserRole; + late final OptionalphotoUrl; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateUserVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + fullName = Optional.optional(nativeFromJson, nativeToJson); + fullName.value = json['fullName'] == null ? null : nativeFromJson(json['fullName']); + + + role = Optional.optional((data) => UserBaseRole.values.byName(data), enumSerializer); + role.value = json['role'] == null ? null : UserBaseRole.values.byName(json['role']); + + + userRole = Optional.optional(nativeFromJson, nativeToJson); + userRole.value = json['userRole'] == null ? null : nativeFromJson(json['userRole']); + + + photoUrl = Optional.optional(nativeFromJson, nativeToJson); + photoUrl.value = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateUserVariables otherTyped = other as UpdateUserVariables; + return id == otherTyped.id && + email == otherTyped.email && + fullName == otherTyped.fullName && + role == otherTyped.role && + userRole == otherTyped.userRole && + photoUrl == otherTyped.photoUrl; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, email.hashCode, fullName.hashCode, role.hashCode, userRole.hashCode, photoUrl.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(fullName.state == OptionalState.set) { + json['fullName'] = fullName.toJson(); + } + if(role.state == OptionalState.set) { + json['role'] = role.toJson(); + } + if(userRole.state == OptionalState.set) { + json['userRole'] = userRole.toJson(); + } + if(photoUrl.state == OptionalState.set) { + json['photoUrl'] = photoUrl.toJson(); + } + return json; + } + + UpdateUserVariables({ + required this.id, + required this.email, + required this.fullName, + required this.role, + required this.userRole, + required this.photoUrl, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_user_conversation.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_user_conversation.dart new file mode 100644 index 00000000..997f92a0 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_user_conversation.dart @@ -0,0 +1,169 @@ +part of 'generated.dart'; + +class UpdateUserConversationVariablesBuilder { + String conversationId; + String userId; + Optional _unreadCount = Optional.optional(nativeFromJson, nativeToJson); + Optional _lastReadAt = Optional.optional((json) => json['lastReadAt'] = Timestamp.fromJson(json['lastReadAt']), defaultSerializer); + + final FirebaseDataConnect _dataConnect; UpdateUserConversationVariablesBuilder unreadCount(int? t) { + _unreadCount.value = t; + return this; + } + UpdateUserConversationVariablesBuilder lastReadAt(Timestamp? t) { + _lastReadAt.value = t; + return this; + } + + UpdateUserConversationVariablesBuilder(this._dataConnect, {required this.conversationId,required this.userId,}); + Deserializer dataDeserializer = (dynamic json) => UpdateUserConversationData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateUserConversationVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateUserConversationVariables vars= UpdateUserConversationVariables(conversationId: conversationId,userId: userId,unreadCount: _unreadCount,lastReadAt: _lastReadAt,); + return _dataConnect.mutation("updateUserConversation", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateUserConversationUserConversationUpdate { + final String conversationId; + final String userId; + UpdateUserConversationUserConversationUpdate.fromJson(dynamic json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateUserConversationUserConversationUpdate otherTyped = other as UpdateUserConversationUserConversationUpdate; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + return json; + } + + UpdateUserConversationUserConversationUpdate({ + required this.conversationId, + required this.userId, + }); +} + +@immutable +class UpdateUserConversationData { + final UpdateUserConversationUserConversationUpdate? userConversation_update; + UpdateUserConversationData.fromJson(dynamic json): + + userConversation_update = json['userConversation_update'] == null ? null : UpdateUserConversationUserConversationUpdate.fromJson(json['userConversation_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateUserConversationData otherTyped = other as UpdateUserConversationData; + return userConversation_update == otherTyped.userConversation_update; + + } + @override + int get hashCode => userConversation_update.hashCode; + + + Map toJson() { + Map json = {}; + if (userConversation_update != null) { + json['userConversation_update'] = userConversation_update!.toJson(); + } + return json; + } + + UpdateUserConversationData({ + this.userConversation_update, + }); +} + +@immutable +class UpdateUserConversationVariables { + final String conversationId; + final String userId; + late final OptionalunreadCount; + late final OptionallastReadAt; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateUserConversationVariables.fromJson(Map json): + + conversationId = nativeFromJson(json['conversationId']), + userId = nativeFromJson(json['userId']) { + + + + + unreadCount = Optional.optional(nativeFromJson, nativeToJson); + unreadCount.value = json['unreadCount'] == null ? null : nativeFromJson(json['unreadCount']); + + + lastReadAt = Optional.optional((json) => json['lastReadAt'] = Timestamp.fromJson(json['lastReadAt']), defaultSerializer); + lastReadAt.value = json['lastReadAt'] == null ? null : Timestamp.fromJson(json['lastReadAt']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateUserConversationVariables otherTyped = other as UpdateUserConversationVariables; + return conversationId == otherTyped.conversationId && + userId == otherTyped.userId && + unreadCount == otherTyped.unreadCount && + lastReadAt == otherTyped.lastReadAt; + + } + @override + int get hashCode => Object.hashAll([conversationId.hashCode, userId.hashCode, unreadCount.hashCode, lastReadAt.hashCode]); + + + Map toJson() { + Map json = {}; + json['conversationId'] = nativeToJson(conversationId); + json['userId'] = nativeToJson(userId); + if(unreadCount.state == OptionalState.set) { + json['unreadCount'] = unreadCount.toJson(); + } + if(lastReadAt.state == OptionalState.set) { + json['lastReadAt'] = lastReadAt.toJson(); + } + return json; + } + + UpdateUserConversationVariables({ + required this.conversationId, + required this.userId, + required this.unreadCount, + required this.lastReadAt, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor.dart new file mode 100644 index 00000000..307a6c4c --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor.dart @@ -0,0 +1,412 @@ +part of 'generated.dart'; + +class UpdateVendorVariablesBuilder { + String id; + Optional _companyName = Optional.optional(nativeFromJson, nativeToJson); + Optional _email = Optional.optional(nativeFromJson, nativeToJson); + Optional _phone = Optional.optional(nativeFromJson, nativeToJson); + Optional _photoUrl = Optional.optional(nativeFromJson, nativeToJson); + Optional _address = Optional.optional(nativeFromJson, nativeToJson); + Optional _billingAddress = Optional.optional(nativeFromJson, nativeToJson); + Optional _timezone = Optional.optional(nativeFromJson, nativeToJson); + Optional _legalName = Optional.optional(nativeFromJson, nativeToJson); + Optional _doingBusinessAs = Optional.optional(nativeFromJson, nativeToJson); + Optional _region = Optional.optional(nativeFromJson, nativeToJson); + Optional _state = Optional.optional(nativeFromJson, nativeToJson); + Optional _city = Optional.optional(nativeFromJson, nativeToJson); + Optional _serviceSpecialty = Optional.optional(nativeFromJson, nativeToJson); + Optional _approvalStatus = Optional.optional((data) => ApprovalStatus.values.byName(data), enumSerializer); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _markup = Optional.optional(nativeFromJson, nativeToJson); + Optional _fee = Optional.optional(nativeFromJson, nativeToJson); + Optional _csat = Optional.optional(nativeFromJson, nativeToJson); + Optional _tier = Optional.optional((data) => VendorTier.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; UpdateVendorVariablesBuilder companyName(String? t) { + _companyName.value = t; + return this; + } + UpdateVendorVariablesBuilder email(String? t) { + _email.value = t; + return this; + } + UpdateVendorVariablesBuilder phone(String? t) { + _phone.value = t; + return this; + } + UpdateVendorVariablesBuilder photoUrl(String? t) { + _photoUrl.value = t; + return this; + } + UpdateVendorVariablesBuilder address(String? t) { + _address.value = t; + return this; + } + UpdateVendorVariablesBuilder billingAddress(String? t) { + _billingAddress.value = t; + return this; + } + UpdateVendorVariablesBuilder timezone(String? t) { + _timezone.value = t; + return this; + } + UpdateVendorVariablesBuilder legalName(String? t) { + _legalName.value = t; + return this; + } + UpdateVendorVariablesBuilder doingBusinessAs(String? t) { + _doingBusinessAs.value = t; + return this; + } + UpdateVendorVariablesBuilder region(String? t) { + _region.value = t; + return this; + } + UpdateVendorVariablesBuilder state(String? t) { + _state.value = t; + return this; + } + UpdateVendorVariablesBuilder city(String? t) { + _city.value = t; + return this; + } + UpdateVendorVariablesBuilder serviceSpecialty(String? t) { + _serviceSpecialty.value = t; + return this; + } + UpdateVendorVariablesBuilder approvalStatus(ApprovalStatus? t) { + _approvalStatus.value = t; + return this; + } + UpdateVendorVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateVendorVariablesBuilder markup(double? t) { + _markup.value = t; + return this; + } + UpdateVendorVariablesBuilder fee(double? t) { + _fee.value = t; + return this; + } + UpdateVendorVariablesBuilder csat(double? t) { + _csat.value = t; + return this; + } + UpdateVendorVariablesBuilder tier(VendorTier? t) { + _tier.value = t; + return this; + } + + UpdateVendorVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateVendorData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateVendorVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateVendorVariables vars= UpdateVendorVariables(id: id,companyName: _companyName,email: _email,phone: _phone,photoUrl: _photoUrl,address: _address,billingAddress: _billingAddress,timezone: _timezone,legalName: _legalName,doingBusinessAs: _doingBusinessAs,region: _region,state: _state,city: _city,serviceSpecialty: _serviceSpecialty,approvalStatus: _approvalStatus,isActive: _isActive,markup: _markup,fee: _fee,csat: _csat,tier: _tier,); + return _dataConnect.mutation("updateVendor", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateVendorVendorUpdate { + final String id; + UpdateVendorVendorUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorVendorUpdate otherTyped = other as UpdateVendorVendorUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateVendorVendorUpdate({ + required this.id, + }); +} + +@immutable +class UpdateVendorData { + final UpdateVendorVendorUpdate? vendor_update; + UpdateVendorData.fromJson(dynamic json): + + vendor_update = json['vendor_update'] == null ? null : UpdateVendorVendorUpdate.fromJson(json['vendor_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorData otherTyped = other as UpdateVendorData; + return vendor_update == otherTyped.vendor_update; + + } + @override + int get hashCode => vendor_update.hashCode; + + + Map toJson() { + Map json = {}; + if (vendor_update != null) { + json['vendor_update'] = vendor_update!.toJson(); + } + return json; + } + + UpdateVendorData({ + this.vendor_update, + }); +} + +@immutable +class UpdateVendorVariables { + final String id; + late final OptionalcompanyName; + late final Optionalemail; + late final Optionalphone; + late final OptionalphotoUrl; + late final Optionaladdress; + late final OptionalbillingAddress; + late final Optionaltimezone; + late final OptionallegalName; + late final OptionaldoingBusinessAs; + late final Optionalregion; + late final Optionalstate; + late final Optionalcity; + late final OptionalserviceSpecialty; + late final OptionalapprovalStatus; + late final OptionalisActive; + late final Optionalmarkup; + late final Optionalfee; + late final Optionalcsat; + late final Optionaltier; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateVendorVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + companyName = Optional.optional(nativeFromJson, nativeToJson); + companyName.value = json['companyName'] == null ? null : nativeFromJson(json['companyName']); + + + email = Optional.optional(nativeFromJson, nativeToJson); + email.value = json['email'] == null ? null : nativeFromJson(json['email']); + + + phone = Optional.optional(nativeFromJson, nativeToJson); + phone.value = json['phone'] == null ? null : nativeFromJson(json['phone']); + + + photoUrl = Optional.optional(nativeFromJson, nativeToJson); + photoUrl.value = json['photoUrl'] == null ? null : nativeFromJson(json['photoUrl']); + + + address = Optional.optional(nativeFromJson, nativeToJson); + address.value = json['address'] == null ? null : nativeFromJson(json['address']); + + + billingAddress = Optional.optional(nativeFromJson, nativeToJson); + billingAddress.value = json['billingAddress'] == null ? null : nativeFromJson(json['billingAddress']); + + + timezone = Optional.optional(nativeFromJson, nativeToJson); + timezone.value = json['timezone'] == null ? null : nativeFromJson(json['timezone']); + + + legalName = Optional.optional(nativeFromJson, nativeToJson); + legalName.value = json['legalName'] == null ? null : nativeFromJson(json['legalName']); + + + doingBusinessAs = Optional.optional(nativeFromJson, nativeToJson); + doingBusinessAs.value = json['doingBusinessAs'] == null ? null : nativeFromJson(json['doingBusinessAs']); + + + region = Optional.optional(nativeFromJson, nativeToJson); + region.value = json['region'] == null ? null : nativeFromJson(json['region']); + + + state = Optional.optional(nativeFromJson, nativeToJson); + state.value = json['state'] == null ? null : nativeFromJson(json['state']); + + + city = Optional.optional(nativeFromJson, nativeToJson); + city.value = json['city'] == null ? null : nativeFromJson(json['city']); + + + serviceSpecialty = Optional.optional(nativeFromJson, nativeToJson); + serviceSpecialty.value = json['serviceSpecialty'] == null ? null : nativeFromJson(json['serviceSpecialty']); + + + approvalStatus = Optional.optional((data) => ApprovalStatus.values.byName(data), enumSerializer); + approvalStatus.value = json['approvalStatus'] == null ? null : ApprovalStatus.values.byName(json['approvalStatus']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + markup = Optional.optional(nativeFromJson, nativeToJson); + markup.value = json['markup'] == null ? null : nativeFromJson(json['markup']); + + + fee = Optional.optional(nativeFromJson, nativeToJson); + fee.value = json['fee'] == null ? null : nativeFromJson(json['fee']); + + + csat = Optional.optional(nativeFromJson, nativeToJson); + csat.value = json['csat'] == null ? null : nativeFromJson(json['csat']); + + + tier = Optional.optional((data) => VendorTier.values.byName(data), enumSerializer); + tier.value = json['tier'] == null ? null : VendorTier.values.byName(json['tier']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorVariables otherTyped = other as UpdateVendorVariables; + return id == otherTyped.id && + companyName == otherTyped.companyName && + email == otherTyped.email && + phone == otherTyped.phone && + photoUrl == otherTyped.photoUrl && + address == otherTyped.address && + billingAddress == otherTyped.billingAddress && + timezone == otherTyped.timezone && + legalName == otherTyped.legalName && + doingBusinessAs == otherTyped.doingBusinessAs && + region == otherTyped.region && + state == otherTyped.state && + city == otherTyped.city && + serviceSpecialty == otherTyped.serviceSpecialty && + approvalStatus == otherTyped.approvalStatus && + isActive == otherTyped.isActive && + markup == otherTyped.markup && + fee == otherTyped.fee && + csat == otherTyped.csat && + tier == otherTyped.tier; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode, address.hashCode, billingAddress.hashCode, timezone.hashCode, legalName.hashCode, doingBusinessAs.hashCode, region.hashCode, state.hashCode, city.hashCode, serviceSpecialty.hashCode, approvalStatus.hashCode, isActive.hashCode, markup.hashCode, fee.hashCode, csat.hashCode, tier.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(companyName.state == OptionalState.set) { + json['companyName'] = companyName.toJson(); + } + if(email.state == OptionalState.set) { + json['email'] = email.toJson(); + } + if(phone.state == OptionalState.set) { + json['phone'] = phone.toJson(); + } + if(photoUrl.state == OptionalState.set) { + json['photoUrl'] = photoUrl.toJson(); + } + if(address.state == OptionalState.set) { + json['address'] = address.toJson(); + } + if(billingAddress.state == OptionalState.set) { + json['billingAddress'] = billingAddress.toJson(); + } + if(timezone.state == OptionalState.set) { + json['timezone'] = timezone.toJson(); + } + if(legalName.state == OptionalState.set) { + json['legalName'] = legalName.toJson(); + } + if(doingBusinessAs.state == OptionalState.set) { + json['doingBusinessAs'] = doingBusinessAs.toJson(); + } + if(region.state == OptionalState.set) { + json['region'] = region.toJson(); + } + if(state.state == OptionalState.set) { + json['state'] = state.toJson(); + } + if(city.state == OptionalState.set) { + json['city'] = city.toJson(); + } + if(serviceSpecialty.state == OptionalState.set) { + json['serviceSpecialty'] = serviceSpecialty.toJson(); + } + if(approvalStatus.state == OptionalState.set) { + json['approvalStatus'] = approvalStatus.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(markup.state == OptionalState.set) { + json['markup'] = markup.toJson(); + } + if(fee.state == OptionalState.set) { + json['fee'] = fee.toJson(); + } + if(csat.state == OptionalState.set) { + json['csat'] = csat.toJson(); + } + if(tier.state == OptionalState.set) { + json['tier'] = tier.toJson(); + } + return json; + } + + UpdateVendorVariables({ + required this.id, + required this.companyName, + required this.email, + required this.phone, + required this.photoUrl, + required this.address, + required this.billingAddress, + required this.timezone, + required this.legalName, + required this.doingBusinessAs, + required this.region, + required this.state, + required this.city, + required this.serviceSpecialty, + required this.approvalStatus, + required this.isActive, + required this.markup, + required this.fee, + required this.csat, + required this.tier, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor_benefit_plan.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor_benefit_plan.dart new file mode 100644 index 00000000..1701bb78 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor_benefit_plan.dart @@ -0,0 +1,232 @@ +part of 'generated.dart'; + +class UpdateVendorBenefitPlanVariablesBuilder { + String id; + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _title = Optional.optional(nativeFromJson, nativeToJson); + Optional _description = Optional.optional(nativeFromJson, nativeToJson); + Optional _requestLabel = Optional.optional(nativeFromJson, nativeToJson); + Optional _total = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _createdBy = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateVendorBenefitPlanVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder title(String? t) { + _title.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder description(String? t) { + _description.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder requestLabel(String? t) { + _requestLabel.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder total(int? t) { + _total.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateVendorBenefitPlanVariablesBuilder createdBy(String? t) { + _createdBy.value = t; + return this; + } + + UpdateVendorBenefitPlanVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateVendorBenefitPlanData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateVendorBenefitPlanVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateVendorBenefitPlanVariables vars= UpdateVendorBenefitPlanVariables(id: id,vendorId: _vendorId,title: _title,description: _description,requestLabel: _requestLabel,total: _total,isActive: _isActive,createdBy: _createdBy,); + return _dataConnect.mutation("updateVendorBenefitPlan", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateVendorBenefitPlanVendorBenefitPlanUpdate { + final String id; + UpdateVendorBenefitPlanVendorBenefitPlanUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorBenefitPlanVendorBenefitPlanUpdate otherTyped = other as UpdateVendorBenefitPlanVendorBenefitPlanUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateVendorBenefitPlanVendorBenefitPlanUpdate({ + required this.id, + }); +} + +@immutable +class UpdateVendorBenefitPlanData { + final UpdateVendorBenefitPlanVendorBenefitPlanUpdate? vendorBenefitPlan_update; + UpdateVendorBenefitPlanData.fromJson(dynamic json): + + vendorBenefitPlan_update = json['vendorBenefitPlan_update'] == null ? null : UpdateVendorBenefitPlanVendorBenefitPlanUpdate.fromJson(json['vendorBenefitPlan_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorBenefitPlanData otherTyped = other as UpdateVendorBenefitPlanData; + return vendorBenefitPlan_update == otherTyped.vendorBenefitPlan_update; + + } + @override + int get hashCode => vendorBenefitPlan_update.hashCode; + + + Map toJson() { + Map json = {}; + if (vendorBenefitPlan_update != null) { + json['vendorBenefitPlan_update'] = vendorBenefitPlan_update!.toJson(); + } + return json; + } + + UpdateVendorBenefitPlanData({ + this.vendorBenefitPlan_update, + }); +} + +@immutable +class UpdateVendorBenefitPlanVariables { + final String id; + late final OptionalvendorId; + late final Optionaltitle; + late final Optionaldescription; + late final OptionalrequestLabel; + late final Optionaltotal; + late final OptionalisActive; + late final OptionalcreatedBy; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateVendorBenefitPlanVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + title = Optional.optional(nativeFromJson, nativeToJson); + title.value = json['title'] == null ? null : nativeFromJson(json['title']); + + + description = Optional.optional(nativeFromJson, nativeToJson); + description.value = json['description'] == null ? null : nativeFromJson(json['description']); + + + requestLabel = Optional.optional(nativeFromJson, nativeToJson); + requestLabel.value = json['requestLabel'] == null ? null : nativeFromJson(json['requestLabel']); + + + total = Optional.optional(nativeFromJson, nativeToJson); + total.value = json['total'] == null ? null : nativeFromJson(json['total']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + createdBy = Optional.optional(nativeFromJson, nativeToJson); + createdBy.value = json['createdBy'] == null ? null : nativeFromJson(json['createdBy']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorBenefitPlanVariables otherTyped = other as UpdateVendorBenefitPlanVariables; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + title == otherTyped.title && + description == otherTyped.description && + requestLabel == otherTyped.requestLabel && + total == otherTyped.total && + isActive == otherTyped.isActive && + createdBy == otherTyped.createdBy; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, title.hashCode, description.hashCode, requestLabel.hashCode, total.hashCode, isActive.hashCode, createdBy.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(title.state == OptionalState.set) { + json['title'] = title.toJson(); + } + if(description.state == OptionalState.set) { + json['description'] = description.toJson(); + } + if(requestLabel.state == OptionalState.set) { + json['requestLabel'] = requestLabel.toJson(); + } + if(total.state == OptionalState.set) { + json['total'] = total.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(createdBy.state == OptionalState.set) { + json['createdBy'] = createdBy.toJson(); + } + return json; + } + + UpdateVendorBenefitPlanVariables({ + required this.id, + required this.vendorId, + required this.title, + required this.description, + required this.requestLabel, + required this.total, + required this.isActive, + required this.createdBy, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor_rate.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor_rate.dart new file mode 100644 index 00000000..882c840d --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_vendor_rate.dart @@ -0,0 +1,262 @@ +part of 'generated.dart'; + +class UpdateVendorRateVariablesBuilder { + String id; + Optional _vendorId = Optional.optional(nativeFromJson, nativeToJson); + Optional _roleName = Optional.optional(nativeFromJson, nativeToJson); + Optional _category = Optional.optional((data) => CategoryType.values.byName(data), enumSerializer); + Optional _clientRate = Optional.optional(nativeFromJson, nativeToJson); + Optional _employeeWage = Optional.optional(nativeFromJson, nativeToJson); + Optional _markupPercentage = Optional.optional(nativeFromJson, nativeToJson); + Optional _vendorFeePercentage = Optional.optional(nativeFromJson, nativeToJson); + Optional _isActive = Optional.optional(nativeFromJson, nativeToJson); + Optional _notes = Optional.optional(nativeFromJson, nativeToJson); + + final FirebaseDataConnect _dataConnect; UpdateVendorRateVariablesBuilder vendorId(String? t) { + _vendorId.value = t; + return this; + } + UpdateVendorRateVariablesBuilder roleName(String? t) { + _roleName.value = t; + return this; + } + UpdateVendorRateVariablesBuilder category(CategoryType? t) { + _category.value = t; + return this; + } + UpdateVendorRateVariablesBuilder clientRate(double? t) { + _clientRate.value = t; + return this; + } + UpdateVendorRateVariablesBuilder employeeWage(double? t) { + _employeeWage.value = t; + return this; + } + UpdateVendorRateVariablesBuilder markupPercentage(double? t) { + _markupPercentage.value = t; + return this; + } + UpdateVendorRateVariablesBuilder vendorFeePercentage(double? t) { + _vendorFeePercentage.value = t; + return this; + } + UpdateVendorRateVariablesBuilder isActive(bool? t) { + _isActive.value = t; + return this; + } + UpdateVendorRateVariablesBuilder notes(String? t) { + _notes.value = t; + return this; + } + + UpdateVendorRateVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateVendorRateData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateVendorRateVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateVendorRateVariables vars= UpdateVendorRateVariables(id: id,vendorId: _vendorId,roleName: _roleName,category: _category,clientRate: _clientRate,employeeWage: _employeeWage,markupPercentage: _markupPercentage,vendorFeePercentage: _vendorFeePercentage,isActive: _isActive,notes: _notes,); + return _dataConnect.mutation("updateVendorRate", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateVendorRateVendorRateUpdate { + final String id; + UpdateVendorRateVendorRateUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorRateVendorRateUpdate otherTyped = other as UpdateVendorRateVendorRateUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateVendorRateVendorRateUpdate({ + required this.id, + }); +} + +@immutable +class UpdateVendorRateData { + final UpdateVendorRateVendorRateUpdate? vendorRate_update; + UpdateVendorRateData.fromJson(dynamic json): + + vendorRate_update = json['vendorRate_update'] == null ? null : UpdateVendorRateVendorRateUpdate.fromJson(json['vendorRate_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorRateData otherTyped = other as UpdateVendorRateData; + return vendorRate_update == otherTyped.vendorRate_update; + + } + @override + int get hashCode => vendorRate_update.hashCode; + + + Map toJson() { + Map json = {}; + if (vendorRate_update != null) { + json['vendorRate_update'] = vendorRate_update!.toJson(); + } + return json; + } + + UpdateVendorRateData({ + this.vendorRate_update, + }); +} + +@immutable +class UpdateVendorRateVariables { + final String id; + late final OptionalvendorId; + late final OptionalroleName; + late final Optionalcategory; + late final OptionalclientRate; + late final OptionalemployeeWage; + late final OptionalmarkupPercentage; + late final OptionalvendorFeePercentage; + late final OptionalisActive; + late final Optionalnotes; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateVendorRateVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + vendorId = Optional.optional(nativeFromJson, nativeToJson); + vendorId.value = json['vendorId'] == null ? null : nativeFromJson(json['vendorId']); + + + roleName = Optional.optional(nativeFromJson, nativeToJson); + roleName.value = json['roleName'] == null ? null : nativeFromJson(json['roleName']); + + + category = Optional.optional((data) => CategoryType.values.byName(data), enumSerializer); + category.value = json['category'] == null ? null : CategoryType.values.byName(json['category']); + + + clientRate = Optional.optional(nativeFromJson, nativeToJson); + clientRate.value = json['clientRate'] == null ? null : nativeFromJson(json['clientRate']); + + + employeeWage = Optional.optional(nativeFromJson, nativeToJson); + employeeWage.value = json['employeeWage'] == null ? null : nativeFromJson(json['employeeWage']); + + + markupPercentage = Optional.optional(nativeFromJson, nativeToJson); + markupPercentage.value = json['markupPercentage'] == null ? null : nativeFromJson(json['markupPercentage']); + + + vendorFeePercentage = Optional.optional(nativeFromJson, nativeToJson); + vendorFeePercentage.value = json['vendorFeePercentage'] == null ? null : nativeFromJson(json['vendorFeePercentage']); + + + isActive = Optional.optional(nativeFromJson, nativeToJson); + isActive.value = json['isActive'] == null ? null : nativeFromJson(json['isActive']); + + + notes = Optional.optional(nativeFromJson, nativeToJson); + notes.value = json['notes'] == null ? null : nativeFromJson(json['notes']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateVendorRateVariables otherTyped = other as UpdateVendorRateVariables; + return id == otherTyped.id && + vendorId == otherTyped.vendorId && + roleName == otherTyped.roleName && + category == otherTyped.category && + clientRate == otherTyped.clientRate && + employeeWage == otherTyped.employeeWage && + markupPercentage == otherTyped.markupPercentage && + vendorFeePercentage == otherTyped.vendorFeePercentage && + isActive == otherTyped.isActive && + notes == otherTyped.notes; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, roleName.hashCode, category.hashCode, clientRate.hashCode, employeeWage.hashCode, markupPercentage.hashCode, vendorFeePercentage.hashCode, isActive.hashCode, notes.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(vendorId.state == OptionalState.set) { + json['vendorId'] = vendorId.toJson(); + } + if(roleName.state == OptionalState.set) { + json['roleName'] = roleName.toJson(); + } + if(category.state == OptionalState.set) { + json['category'] = category.toJson(); + } + if(clientRate.state == OptionalState.set) { + json['clientRate'] = clientRate.toJson(); + } + if(employeeWage.state == OptionalState.set) { + json['employeeWage'] = employeeWage.toJson(); + } + if(markupPercentage.state == OptionalState.set) { + json['markupPercentage'] = markupPercentage.toJson(); + } + if(vendorFeePercentage.state == OptionalState.set) { + json['vendorFeePercentage'] = vendorFeePercentage.toJson(); + } + if(isActive.state == OptionalState.set) { + json['isActive'] = isActive.toJson(); + } + if(notes.state == OptionalState.set) { + json['notes'] = notes.toJson(); + } + return json; + } + + UpdateVendorRateVariables({ + required this.id, + required this.vendorId, + required this.roleName, + required this.category, + required this.clientRate, + required this.employeeWage, + required this.markupPercentage, + required this.vendorFeePercentage, + required this.isActive, + required this.notes, + }); +} + diff --git a/apps/packages/data_connect/lib/src/dataconnect_generated/update_workforce.dart b/apps/packages/data_connect/lib/src/dataconnect_generated/update_workforce.dart new file mode 100644 index 00000000..7a5e9354 --- /dev/null +++ b/apps/packages/data_connect/lib/src/dataconnect_generated/update_workforce.dart @@ -0,0 +1,172 @@ +part of 'generated.dart'; + +class UpdateWorkforceVariablesBuilder { + String id; + Optional _workforceNumber = Optional.optional(nativeFromJson, nativeToJson); + Optional _employmentType = Optional.optional((data) => WorkforceEmploymentType.values.byName(data), enumSerializer); + Optional _status = Optional.optional((data) => WorkforceStatus.values.byName(data), enumSerializer); + + final FirebaseDataConnect _dataConnect; UpdateWorkforceVariablesBuilder workforceNumber(String? t) { + _workforceNumber.value = t; + return this; + } + UpdateWorkforceVariablesBuilder employmentType(WorkforceEmploymentType? t) { + _employmentType.value = t; + return this; + } + UpdateWorkforceVariablesBuilder status(WorkforceStatus? t) { + _status.value = t; + return this; + } + + UpdateWorkforceVariablesBuilder(this._dataConnect, {required this.id,}); + Deserializer dataDeserializer = (dynamic json) => UpdateWorkforceData.fromJson(jsonDecode(json)); + Serializer varsSerializer = (UpdateWorkforceVariables vars) => jsonEncode(vars.toJson()); + Future> execute() { + return ref().execute(); + } + + MutationRef ref() { + UpdateWorkforceVariables vars= UpdateWorkforceVariables(id: id,workforceNumber: _workforceNumber,employmentType: _employmentType,status: _status,); + return _dataConnect.mutation("updateWorkforce", dataDeserializer, varsSerializer, vars); + } +} + +@immutable +class UpdateWorkforceWorkforceUpdate { + final String id; + UpdateWorkforceWorkforceUpdate.fromJson(dynamic json): + + id = nativeFromJson(json['id']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateWorkforceWorkforceUpdate otherTyped = other as UpdateWorkforceWorkforceUpdate; + return id == otherTyped.id; + + } + @override + int get hashCode => id.hashCode; + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + return json; + } + + UpdateWorkforceWorkforceUpdate({ + required this.id, + }); +} + +@immutable +class UpdateWorkforceData { + final UpdateWorkforceWorkforceUpdate? workforce_update; + UpdateWorkforceData.fromJson(dynamic json): + + workforce_update = json['workforce_update'] == null ? null : UpdateWorkforceWorkforceUpdate.fromJson(json['workforce_update']); + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateWorkforceData otherTyped = other as UpdateWorkforceData; + return workforce_update == otherTyped.workforce_update; + + } + @override + int get hashCode => workforce_update.hashCode; + + + Map toJson() { + Map json = {}; + if (workforce_update != null) { + json['workforce_update'] = workforce_update!.toJson(); + } + return json; + } + + UpdateWorkforceData({ + this.workforce_update, + }); +} + +@immutable +class UpdateWorkforceVariables { + final String id; + late final OptionalworkforceNumber; + late final OptionalemploymentType; + late final Optionalstatus; + @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.') + UpdateWorkforceVariables.fromJson(Map json): + + id = nativeFromJson(json['id']) { + + + + workforceNumber = Optional.optional(nativeFromJson, nativeToJson); + workforceNumber.value = json['workforceNumber'] == null ? null : nativeFromJson(json['workforceNumber']); + + + employmentType = Optional.optional((data) => WorkforceEmploymentType.values.byName(data), enumSerializer); + employmentType.value = json['employmentType'] == null ? null : WorkforceEmploymentType.values.byName(json['employmentType']); + + + status = Optional.optional((data) => WorkforceStatus.values.byName(data), enumSerializer); + status.value = json['status'] == null ? null : WorkforceStatus.values.byName(json['status']); + + } + @override + bool operator ==(Object other) { + if(identical(this, other)) { + return true; + } + if(other.runtimeType != runtimeType) { + return false; + } + + final UpdateWorkforceVariables otherTyped = other as UpdateWorkforceVariables; + return id == otherTyped.id && + workforceNumber == otherTyped.workforceNumber && + employmentType == otherTyped.employmentType && + status == otherTyped.status; + + } + @override + int get hashCode => Object.hashAll([id.hashCode, workforceNumber.hashCode, employmentType.hashCode, status.hashCode]); + + + Map toJson() { + Map json = {}; + json['id'] = nativeToJson(id); + if(workforceNumber.state == OptionalState.set) { + json['workforceNumber'] = workforceNumber.toJson(); + } + if(employmentType.state == OptionalState.set) { + json['employmentType'] = employmentType.toJson(); + } + if(status.state == OptionalState.set) { + json['status'] = status.toJson(); + } + return json; + } + + UpdateWorkforceVariables({ + required this.id, + required this.workforceNumber, + required this.employmentType, + required this.status, + }); +} + diff --git a/apps/packages/features/client/authentication/lib/client_authentication.dart b/apps/packages/features/client/authentication/lib/client_authentication.dart index 268a1dc7..2a5b3cde 100644 --- a/apps/packages/features/client/authentication/lib/client_authentication.dart +++ b/apps/packages/features/client/authentication/lib/client_authentication.dart @@ -1,5 +1,6 @@ library client_authentication; +import 'package:firebase_auth/firebase_auth.dart' as firebase; import 'package:flutter_modular/flutter_modular.dart'; import 'package:krow_data_connect/krow_data_connect.dart'; import 'src/data/repositories_impl/auth_repository_impl.dart'; @@ -28,7 +29,10 @@ class ClientAuthenticationModule extends Module { void binds(Injector i) { // Repositories i.addLazySingleton( - () => AuthRepositoryImpl(dataSource: i.get()), + () => AuthRepositoryImpl( + firebaseAuth: firebase.FirebaseAuth.instance, + dataConnect: ExampleConnector.instance, + ), ); // UseCases diff --git a/apps/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart b/apps/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart index 176f6a64..ede79873 100644 --- a/apps/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart +++ b/apps/packages/features/client/authentication/lib/src/data/repositories_impl/auth_repository_impl.dart @@ -1,43 +1,156 @@ -import 'package:krow_data_connect/krow_data_connect.dart'; -import 'package:krow_domain/krow_domain.dart'; - +import 'package:firebase_auth/firebase_auth.dart' as firebase; +import 'package:krow_data_connect/krow_data_connect.dart' as dc; +import 'package:krow_domain/krow_domain.dart' as domain; import '../../domain/repositories/auth_repository_interface.dart'; -/// Production-ready implementation of the [AuthRepositoryInterface]. +/// Production-ready implementation of the [AuthRepositoryInterface] for the client app. /// -/// This implementation integrates with the [krow_data_connect] package to provide -/// authentication services. It delegates actual data operations to the -/// [AuthRepositoryMock] (or eventually the real implementation) injected from the app layer. +/// This implementation integrates with Firebase Authentication for user +/// identity management and Krow's Data Connect SDK for storing user profile data. class AuthRepositoryImpl implements AuthRepositoryInterface { - /// The data source used for authentication operations. - final AuthRepositoryMock _dataSource; + final firebase.FirebaseAuth _firebaseAuth; + final dc.ExampleConnector _dataConnect; - /// Creates an [AuthRepositoryImpl] with the injected [dataSource] dependency. - AuthRepositoryImpl({required AuthRepositoryMock dataSource}) - : _dataSource = dataSource; + /// Creates an [AuthRepositoryImpl] with the real dependencies. + AuthRepositoryImpl({ + required firebase.FirebaseAuth firebaseAuth, + required dc.ExampleConnector dataConnect, + }) : _firebaseAuth = firebaseAuth, + _dataConnect = dataConnect; @override - Future signInWithEmail({ + Future signInWithEmail({ required String email, required String password, - }) { - return _dataSource.signInWithEmail(email, password); + }) async { + try { + final credential = await _firebaseAuth.signInWithEmailAndPassword( + email: email, + password: password, + ); + + final firebaseUser = credential.user; + if (firebaseUser == null) { + throw Exception('Sign-in failed, no Firebase user received.'); + } + + return _getUserProfile( + firebaseUserId: firebaseUser.uid, + fallbackEmail: firebaseUser.email ?? email, + ); + + //TO-DO: validate that user is business role and has business account + + } on firebase.FirebaseAuthException catch (e) { + if (e.code == 'invalid-credential' || e.code == 'wrong-password') { + throw Exception('Incorrect email or password.'); + } else { + throw Exception('Authentication error: ${e.message}'); + } + } catch (e) { + throw Exception('Failed to sign in and fetch user data: ${e.toString()}'); + } } @override - Future signUpWithEmail({ + Future signUpWithEmail({ required String companyName, required String email, required String password, - }) { - return _dataSource.signUpWithEmail(email, password, companyName); + }) async { + try { + final credential = await _firebaseAuth.createUserWithEmailAndPassword( + email: email, + password: password, + ); + + final firebaseUser = credential.user; + if (firebaseUser == null) { + throw Exception('Sign-up failed, Firebase user could not be created.'); + } + + // Client-specific business logic: + // 1. Create a `Business` entity. + // 2. Create a `User` entity associated with the business. + final createBusinessResponse = await _dataConnect.createBusiness( + businessName: companyName, + userId: firebaseUser.uid, + rateGroup: dc.BusinessRateGroup.STANDARD, + status: dc.BusinessStatus.PENDING, + ).execute(); + + final businessData = createBusinessResponse.data?.business_insert; + if (businessData == null) { + await firebaseUser.delete(); // Rollback if business creation fails + throw Exception('Business creation failed after Firebase user registration.'); + } + + final createUserResponse = await _dataConnect.createUser( + id: firebaseUser.uid, + role: dc.UserBaseRole.USER, + ) + .email(email) + .userRole('BUSINESS') + .execute(); + + final newUserData = createUserResponse.data?.user_insert; + if (newUserData == null) { + await firebaseUser.delete(); // Rollback if user profile creation fails + // TO-DO: Also delete the created Business if this fails + throw Exception('User profile creation failed after Firebase user registration.'); + } + + return _getUserProfile( + firebaseUserId: firebaseUser.uid, + fallbackEmail: firebaseUser.email ?? email, + ); + + } on firebase.FirebaseAuthException catch (e) { + if (e.code == 'weak-password') { + throw Exception('The password provided is too weak.'); + } else if (e.code == 'email-already-in-use') { + throw Exception('An account already exists for that email address.'); + } else { + throw Exception('Sign-up error: ${e.message}'); + } + } catch (e) { + throw Exception('Failed to sign up and create user data: ${e.toString()}'); + } } @override - Future signInWithSocial({required String provider}) { - return _dataSource.signInWithSocial(provider); + Future signOut() async { + try { + await _firebaseAuth.signOut(); + } catch (e) { + throw Exception('Error signing out: ${e.toString()}'); + } } @override - Future signOut() => _dataSource.signOut(); + Future signInWithSocial({required String provider}) { + throw UnimplementedError('Social authentication with $provider is not yet implemented.'); + } + + Future _getUserProfile({ + required String firebaseUserId, + required String? fallbackEmail, + }) async { + final response = await _dataConnect.getUserById(id: firebaseUserId).execute(); + final user = response.data?.user; + if (user == null) { + throw Exception('Authenticated user profile not found in database.'); + } + + final email = user.email ?? fallbackEmail; + if (email == null || email.isEmpty) { + throw Exception('User email is missing in profile data.'); + } + + return domain.User( + id: user.id, + email: email, + role: user.role.stringValue, + ); + } } diff --git a/apps/packages/features/client/authentication/pubspec.yaml b/apps/packages/features/client/authentication/pubspec.yaml index 781d6f07..590bcf27 100644 --- a/apps/packages/features/client/authentication/pubspec.yaml +++ b/apps/packages/features/client/authentication/pubspec.yaml @@ -14,6 +14,9 @@ dependencies: flutter_bloc: ^8.1.0 flutter_modular: ^6.3.0 equatable: ^2.0.5 + firebase_core: ^4.2.1 + firebase_auth: ^6.1.2 # Updated for compatibility + firebase_data_connect: ^0.2.2+1 # Architecture Packages design_system: diff --git a/apps/packages/features/staff/authentication/pubspec.yaml b/apps/packages/features/staff/authentication/pubspec.yaml index ec275da3..f7dded13 100644 --- a/apps/packages/features/staff/authentication/pubspec.yaml +++ b/apps/packages/features/staff/authentication/pubspec.yaml @@ -15,6 +15,9 @@ dependencies: flutter_modular: ^6.3.0 equatable: ^2.0.5 lucide_icons: ^0.257.0 + firebase_core: ^4.2.1 + firebase_auth: ^6.1.2 # Updated for compatibility + firebase_data_connect: ^0.2.2+1 # Architecture Packages krow_domain: diff --git a/apps/pubspec.lock b/apps/pubspec.lock index a3f8c48f..792e68eb 100644 --- a/apps/pubspec.lock +++ b/apps/pubspec.lock @@ -9,6 +9,14 @@ packages: url: "https://pub.dev" source: hosted version: "91.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + sha256: cd83f7d6bd4e4c0b0b4fef802e8796784032e1cc23d7b0e982cf5d05d9bbe182 + url: "https://pub.dev" + source: hosted + version: "1.3.66" analyzer: dependency: transitive description: @@ -25,6 +33,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.2+1" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" args: dependency: transitive description: @@ -297,6 +313,86 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" + firebase_app_check: + dependency: transitive + description: + name: firebase_app_check + sha256: "45f0d279ea7ae4eac1867a4c85aa225761e3ac0ccf646386a860b2bc16581f76" + url: "https://pub.dev" + source: hosted + version: "0.4.1+4" + firebase_app_check_platform_interface: + dependency: transitive + description: + name: firebase_app_check_platform_interface + sha256: e32b4e6adeaac207a6f7afe0906d97c0811de42fb200d9b6317a09155de65e2b + url: "https://pub.dev" + source: hosted + version: "0.2.1+4" + firebase_app_check_web: + dependency: transitive + description: + name: firebase_app_check_web + sha256: "2cbc8a18a34813a7e31d7b30f989973087421cd5d0e397b4dd88a90289aa2bed" + url: "https://pub.dev" + source: hosted + version: "0.2.2+2" + firebase_auth: + dependency: transitive + description: + name: firebase_auth + sha256: b20d1540460814c5984474c1e9dd833bdbcff6ecd8d6ad86cc9da8cfd581c172 + url: "https://pub.dev" + source: hosted + version: "6.1.4" + firebase_auth_platform_interface: + dependency: transitive + description: + name: firebase_auth_platform_interface + sha256: fd0225320b6bbc92460c86352d16b60aea15f9ef88292774cca97b0522ea9f72 + url: "https://pub.dev" + source: hosted + version: "8.1.6" + firebase_auth_web: + dependency: transitive + description: + name: firebase_auth_web + sha256: be7dccb263b89fbda2a564de9d8193118196e8481ffb937222a025cdfdf82c40 + url: "https://pub.dev" + source: hosted + version: "6.1.2" + firebase_core: + dependency: transitive + description: + name: firebase_core + sha256: "923085c881663ef685269b013e241b428e1fb03cdd0ebde265d9b40ff18abf80" + url: "https://pub.dev" + source: hosted + version: "4.4.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + sha256: cccb4f572325dc14904c02fcc7db6323ad62ba02536833dddb5c02cac7341c64 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + sha256: "83e7356c704131ca4d8d8dd57e360d8acecbca38b1a3705c7ae46cc34c708084" + url: "https://pub.dev" + source: hosted + version: "3.4.0" + firebase_data_connect: + dependency: transitive + description: + name: firebase_data_connect + sha256: "01d0f8e33c520a6e6f59cf5ac6ff281d1927f7837f094fa8eb5fdb0b1b328ad8" + url: "https://pub.dev" + source: hosted + version: "0.2.2+2" fixnum: dependency: transitive description: @@ -381,6 +477,22 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.2" + google_identity_services_web: + dependency: transitive + description: + name: google_identity_services_web + sha256: "5d187c46dc59e02646e10fe82665fc3884a9b71bc1c90c2b8b749316d33ee454" + url: "https://pub.dev" + source: hosted + version: "0.3.3+1" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: befd71383a955535060acde8792e7efc11d2fccd03dd1d3ec434e85b68775938 + url: "https://pub.dev" + source: hosted + version: "1.6.0" graphs: dependency: transitive description: @@ -389,6 +501,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + grpc: + dependency: transitive + description: + name: grpc + sha256: e93ee3bce45c134bf44e9728119102358c7cd69de7832d9a874e2e74eb8cab40 + url: "https://pub.dev" + source: hosted + version: "3.2.4" hooks: dependency: transitive description: @@ -405,6 +525,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.6.0" + http2: + dependency: transitive + description: + name: http2 + sha256: "382d3aefc5bd6dc68c6b892d7664f29b5beb3251611ae946a98d35158a82bbfa" + url: "https://pub.dev" + source: hosted + version: "2.3.1" http_multi_server: dependency: transitive description: @@ -717,6 +845,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" provider: dependency: transitive description: diff --git a/backend/dataconnect/connector/connector.yaml b/backend/dataconnect/connector/connector.yaml index a2aae747..c467ce2b 100644 --- a/backend/dataconnect/connector/connector.yaml +++ b/backend/dataconnect/connector/connector.yaml @@ -1,7 +1,5 @@ connectorId: example generate: dartSdk: - - outputDir: ../../../apps/mobile-client/lib/dataconnect_generated - package: dataconnect_generated/generated.dart - - outputDir: ../../../apps/mobile-staff/lib/dataconnect_generated + - outputDir: ../../../apps/packages/data_connect/lib/src/dataconnect_generated package: dataconnect_generated/generated.dart