diff --git a/tfserving-flutter/codelab2/finished/.gitignore b/tfserving-flutter/codelab2/finished/.gitignore index 0fa6b675c0..79c113f9b5 100644 --- a/tfserving-flutter/codelab2/finished/.gitignore +++ b/tfserving-flutter/codelab2/finished/.gitignore @@ -5,9 +5,12 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ +migrate_working_dir/ # IntelliJ related *.iml @@ -26,14 +29,10 @@ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies -.packages .pub-cache/ .pub/ /build/ -# Web related -lib/generated_plugin_registrant.dart - # Symbolication related app.*.symbols diff --git a/tfserving-flutter/codelab2/finished/android/.gitignore b/tfserving-flutter/codelab2/finished/android/.gitignore index 6f568019d3..be3943c96d 100644 --- a/tfserving-flutter/codelab2/finished/android/.gitignore +++ b/tfserving-flutter/codelab2/finished/android/.gitignore @@ -5,9 +5,10 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx/ # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/tfserving-flutter/codelab2/finished/android/app/build.gradle b/tfserving-flutter/codelab2/finished/android/app/build.gradle deleted file mode 100644 index 0e32cc9601..0000000000 --- a/tfserving-flutter/codelab2/finished/android/app/build.gradle +++ /dev/null @@ -1,68 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion flutter.compileSdkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.tfserving_flutter" - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/tfserving-flutter/codelab2/finished/android/app/build.gradle.kts b/tfserving-flutter/codelab2/finished/android/app/build.gradle.kts new file mode 100644 index 0000000000..39e675eee2 --- /dev/null +++ b/tfserving-flutter/codelab2/finished/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.tfserving_flutter" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.tfserving_flutter" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/tfserving-flutter/codelab2/finished/android/app/src/debug/AndroidManifest.xml b/tfserving-flutter/codelab2/finished/android/app/src/debug/AndroidManifest.xml index f65eeb5a36..399f6981d5 100644 --- a/tfserving-flutter/codelab2/finished/android/app/src/debug/AndroidManifest.xml +++ b/tfserving-flutter/codelab2/finished/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/tfserving-flutter/codelab2/finished/android/app/src/main/AndroidManifest.xml b/tfserving-flutter/codelab2/finished/android/app/src/main/AndroidManifest.xml index 3b7fbb49d9..d272ac21c2 100644 --- a/tfserving-flutter/codelab2/finished/android/app/src/main/AndroidManifest.xml +++ b/tfserving-flutter/codelab2/finished/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - - + @@ -8,6 +7,7 @@ android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" + android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" @@ -31,4 +31,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/tfserving-flutter/codelab2/finished/android/app/src/main/kotlin/com/example/tfserving_flutter/MainActivity.kt b/tfserving-flutter/codelab2/finished/android/app/src/main/kotlin/com/example/tfserving_flutter/MainActivity.kt index ecbfe07a3c..c333f84670 100644 --- a/tfserving-flutter/codelab2/finished/android/app/src/main/kotlin/com/example/tfserving_flutter/MainActivity.kt +++ b/tfserving-flutter/codelab2/finished/android/app/src/main/kotlin/com/example/tfserving_flutter/MainActivity.kt @@ -2,5 +2,4 @@ package com.example.tfserving_flutter import io.flutter.embedding.android.FlutterActivity -class MainActivity: FlutterActivity() { -} +class MainActivity : FlutterActivity() diff --git a/tfserving-flutter/codelab2/finished/android/app/src/main/res/values-night/styles.xml b/tfserving-flutter/codelab2/finished/android/app/src/main/res/values-night/styles.xml index 3db14bb539..06952be745 100644 --- a/tfserving-flutter/codelab2/finished/android/app/src/main/res/values-night/styles.xml +++ b/tfserving-flutter/codelab2/finished/android/app/src/main/res/values-night/styles.xml @@ -3,7 +3,7 @@ diff --git a/tfserving-flutter/codelab2/finished/android/build.gradle b/tfserving-flutter/codelab2/finished/android/build.gradle deleted file mode 100644 index 18261f3ab5..0000000000 --- a/tfserving-flutter/codelab2/finished/android/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -buildscript { - ext.kotlin_version = '1.3.50' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/tfserving-flutter/codelab2/finished/android/build.gradle.kts b/tfserving-flutter/codelab2/finished/android/build.gradle.kts new file mode 100644 index 0000000000..89176ef44e --- /dev/null +++ b/tfserving-flutter/codelab2/finished/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/tfserving-flutter/codelab2/finished/android/gradle.properties b/tfserving-flutter/codelab2/finished/android/gradle.properties index 94adc3a3f9..f018a61817 100644 --- a/tfserving-flutter/codelab2/finished/android/gradle.properties +++ b/tfserving-flutter/codelab2/finished/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/tfserving-flutter/codelab2/finished/android/gradle/wrapper/gradle-wrapper.properties b/tfserving-flutter/codelab2/finished/android/gradle/wrapper/gradle-wrapper.properties index 752ce5bc4a..afa1e8eb0a 100644 --- a/tfserving-flutter/codelab2/finished/android/gradle/wrapper/gradle-wrapper.properties +++ b/tfserving-flutter/codelab2/finished/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/tfserving-flutter/codelab2/finished/android/settings.gradle b/tfserving-flutter/codelab2/finished/android/settings.gradle deleted file mode 100644 index 44e62bcf06..0000000000 --- a/tfserving-flutter/codelab2/finished/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/tfserving-flutter/codelab2/finished/android/settings.gradle.kts b/tfserving-flutter/codelab2/finished/android/settings.gradle.kts new file mode 100644 index 0000000000..a439442c20 --- /dev/null +++ b/tfserving-flutter/codelab2/finished/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/tfserving-flutter/codelab2/finished/ios/Flutter/AppFrameworkInfo.plist b/tfserving-flutter/codelab2/finished/ios/Flutter/AppFrameworkInfo.plist index 8d4492f977..7c56964006 100644 --- a/tfserving-flutter/codelab2/finished/ios/Flutter/AppFrameworkInfo.plist +++ b/tfserving-flutter/codelab2/finished/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 12.0 diff --git a/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/project.pbxproj b/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/project.pbxproj index 38f4a189e0..4ab8908f07 100644 --- a/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/project.pbxproj +++ b/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/project.pbxproj @@ -3,11 +3,12 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -15,6 +16,16 @@ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -31,6 +42,8 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -55,6 +68,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +93,7 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, ); sourceTree = ""; }; @@ -79,6 +101,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, ); name = Products; sourceTree = ""; @@ -101,6 +124,23 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; @@ -127,9 +167,14 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; LastSwiftMigration = 1100; @@ -150,11 +195,19 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -171,10 +224,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -185,6 +240,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -200,6 +256,14 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -211,6 +275,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -235,6 +307,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -264,6 +337,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -272,7 +346,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -302,10 +376,58 @@ }; name = Profile; }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.tfservingFlutter.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.tfservingFlutter.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.tfservingFlutter.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -335,6 +457,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -349,7 +472,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -361,6 +484,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -390,6 +514,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -398,7 +523,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -455,6 +580,16 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a335..15cada4838 100644 --- a/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/tfserving-flutter/codelab2/finished/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + + + diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/AppDelegate.swift b/tfserving-flutter/codelab2/finished/ios/Runner/AppDelegate.swift index 70693e4a8c..626664468b 100644 --- a/tfserving-flutter/codelab2/finished/ios/Runner/AppDelegate.swift +++ b/tfserving-flutter/codelab2/finished/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ -import UIKit import Flutter +import UIKit -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 28c6bf0301..7353c41ecf 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2ccbfd967d..797d452e45 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index f091b6b0bc..6ed2d933e1 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cde12118d..4cd7b0099c 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index d0ef06e7ed..fe730945a0 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index dcdc2306c2..321773cd85 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd967d..797d452e45 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index c8f9ed8f5c..502f463a9b 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index a6d6b8609d..0ec3034392 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b8609d..0ec3034392 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 75b2d164a5..e9f5fea27c 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d39d..84ac32ae7d 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 6a84f41e14..8953cba090 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d0e1f58536..0467bf12aa 100644 Binary files a/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/tfserving-flutter/codelab2/finished/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/tfserving-flutter/codelab2/finished/ios/Runner/Info.plist b/tfserving-flutter/codelab2/finished/ios/Runner/Info.plist index 3647874c70..312815e797 100644 --- a/tfserving-flutter/codelab2/finished/ios/Runner/Info.plist +++ b/tfserving-flutter/codelab2/finished/ios/Runner/Info.plist @@ -41,7 +41,9 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIViewControllerBasedStatusBarAppearance - + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/tfserving-flutter/codelab2/finished/ios/RunnerTests/RunnerTests.swift b/tfserving-flutter/codelab2/finished/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000000..86a7c3b1b6 --- /dev/null +++ b/tfserving-flutter/codelab2/finished/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/tfserving-flutter/codelab2/finished/lib/main.dart b/tfserving-flutter/codelab2/finished/lib/main.dart index 808050c829..0fb19acc4c 100644 --- a/tfserving-flutter/codelab2/finished/lib/main.dart +++ b/tfserving-flutter/codelab2/finished/lib/main.dart @@ -64,88 +64,92 @@ class _TFServingDemoState extends State { colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), ), home: Scaffold( - appBar: AppBar( - title: const Text('TF Serving Flutter Demo'), - ), + appBar: AppBar(title: const Text('TF Serving Flutter Demo')), body: Center( child: Container( padding: const EdgeInsets.fromLTRB(20, 30, 20, 20), child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - TextField( - controller: _inputSentenceController, - decoration: const InputDecoration( - border: UnderlineInputBorder(), - hintText: 'Enter a sentence here'), + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextField( + controller: _inputSentenceController, + decoration: const InputDecoration( + border: UnderlineInputBorder(), + hintText: 'Enter a sentence here', ), - Column( - children: [ - ListTile( - title: const Text('gRPC'), - leading: Radio( - value: ConnectionModeType.grpc, - groupValue: _connectionMode, - onChanged: (value) { - setState(() { - _connectionMode = value; - }); - }, - ), + ), + Column( + children: [ + ListTile( + title: const Text('gRPC'), + leading: Radio( + value: ConnectionModeType.grpc, + groupValue: _connectionMode, + onChanged: (value) { + setState(() { + _connectionMode = value; + }); + }, ), - ListTile( - title: const Text('REST'), - leading: Radio( - value: ConnectionModeType.rest, - groupValue: _connectionMode, - onChanged: (value) { - setState(() { - _connectionMode = value; - }); - }, - ), + ), + ListTile( + title: const Text('REST'), + leading: Radio( + value: ConnectionModeType.rest, + groupValue: _connectionMode, + onChanged: (value) { + setState(() { + _connectionMode = value; + }); + }, ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - FilledButton( - style: FilledButton.styleFrom( - textStyle: const TextStyle(fontSize: 18), - ), - onPressed: () { - setState(() { - _futurePrediction = predict(); - }); - }, - child: const Text('Classify')), - FilledButton( - style: FilledButton.styleFrom( - textStyle: const TextStyle(fontSize: 18), - ), - onPressed: () { - setState(() { - _futurePrediction = - Future.value(initialPrompt); - _inputSentenceController.clear(); - }); - }, - child: const Text('Reset')) - ]), - FutureBuilder( - future: _futurePrediction, - builder: (context, snapshot) { - if (snapshot.hasData) { - return Text(snapshot.data!); - } else if (snapshot.hasError) { - return Text('${snapshot.error}'); - } - // By default, show a loading spinner. - return const CircularProgressIndicator(); - }, - ), - ]), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + FilledButton( + style: FilledButton.styleFrom( + textStyle: const TextStyle(fontSize: 18), + ), + onPressed: () { + setState(() { + _futurePrediction = predict(); + }); + }, + child: const Text('Classify'), + ), + FilledButton( + style: FilledButton.styleFrom( + textStyle: const TextStyle(fontSize: 18), + ), + onPressed: () { + setState(() { + _futurePrediction = Future.value( + initialPrompt, + ); + _inputSentenceController.clear(); + }); + }, + child: const Text('Reset'), + ), + ], + ), + FutureBuilder( + future: _futurePrediction, + builder: (context, snapshot) { + if (snapshot.hasData) { + return Text(snapshot.data!); + } else if (snapshot.hasError) { + return Text('${snapshot.error}'); + } + // By default, show a loading spinner. + return const CircularProgressIndicator(); + }, + ), + ], + ), ), ), ), @@ -212,12 +216,17 @@ class _TFServingDemoState extends State { throw Exception('Error response'); } } else { - final channel = ClientChannel(_server, - port: grpcPort, - options: - const ChannelOptions(credentials: ChannelCredentials.insecure())); - _stub = PredictionServiceClient(channel, - options: CallOptions(timeout: const Duration(seconds: 10))); + final channel = ClientChannel( + _server, + port: grpcPort, + options: const ChannelOptions( + credentials: ChannelCredentials.insecure(), + ), + ); + _stub = PredictionServiceClient( + channel, + options: CallOptions(timeout: const Duration(seconds: 10)), + ); ModelSpec modelSpec = ModelSpec( name: 'spam-detection', @@ -225,21 +234,24 @@ class _TFServingDemoState extends State { ); TensorShapeProto_Dim batchDim = TensorShapeProto_Dim(size: Int64(1)); - TensorShapeProto_Dim inputDim = - TensorShapeProto_Dim(size: Int64(maxSentenceLength)); - TensorShapeProto inputTensorShape = - TensorShapeProto(dim: [batchDim, inputDim]); + TensorShapeProto_Dim inputDim = TensorShapeProto_Dim( + size: Int64(maxSentenceLength), + ); + TensorShapeProto inputTensorShape = TensorShapeProto( + dim: [batchDim, inputDim], + ); TensorProto inputTensor = TensorProto( - dtype: DataType.DT_INT32, - tensorShape: inputTensorShape, - intVal: _tokenIndices); + dtype: DataType.DT_INT32, + tensorShape: inputTensorShape, + intVal: _tokenIndices, + ); // If you train your own model, make sure to update the input and output // tensor names. const inputTensorName = 'input_3'; const outputTensorName = 'dense_5'; - PredictRequest request = PredictRequest( - modelSpec: modelSpec, inputs: {inputTensorName: inputTensor}); + PredictRequest request = PredictRequest(modelSpec: modelSpec) + ..inputs.addAll({inputTensorName: inputTensor}); PredictResponse response = await _stub.predict(request); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generate_grpc_stub_dart.sh b/tfserving-flutter/codelab2/finished/lib/proto/generate_grpc_stub_dart.sh deleted file mode 100755 index c5d636cc6b..0000000000 --- a/tfserving-flutter/codelab2/finished/lib/proto/generate_grpc_stub_dart.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# This script generates the client stub for TF Serving - -touch generated -rm -rf generated -mkdir generated - -protoc -I./ ./tensorflow_serving/apis/input.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow_serving/apis/regression.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow_serving/apis/predict.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow_serving/apis/prediction_service.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow_serving/apis/get_model_metadata.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow_serving/apis/inference.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow_serving/apis/model.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow_serving/apis/classification.proto --dart_out=grpc:./generated - -protoc -I./ ./tensorflow/core/framework/graph.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/tensor_shape.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/function.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/variable.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/types.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/full_type.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/versions.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/attr_value.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/op_def.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/node_def.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/tensor.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/framework/resource_handle.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/example/feature.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/example/example.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/protobuf/struct.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/protobuf/meta_graph.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/protobuf/saver.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/protobuf/trackable_object_graph.proto --dart_out=grpc:./generated -protoc -I./ ./tensorflow/core/protobuf/saved_object_graph.proto --dart_out=grpc:./generated - -protoc -I./ ./google/protobuf/any.proto --dart_out=grpc:./generated -protoc -I./ ./google/protobuf/wrappers.proto --dart_out=grpc:./generated diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pb.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pb.dart index 81fcf7267f..42bade07ee 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pb.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pb.dart @@ -1,61 +1,137 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; - import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; -class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Any', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.AnyMixin.toProto3JsonHelper, - fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'typeUrl') - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - Any._() : super(); +/// `Any` contains an arbitrary serialized protocol buffer message along with a +/// URL that describes the type of the serialized message. +/// +/// Protobuf library provides support to pack/unpack Any values in the form +/// of utility functions or additional generated methods of the Any type. +/// +/// Example 1: Pack and unpack a message in C++. +/// +/// Foo foo = ...; +/// Any any; +/// any.PackFrom(foo); +/// ... +/// if (any.UnpackTo(&foo)) { +/// ... +/// } +/// +/// Example 2: Pack and unpack a message in Java. +/// +/// Foo foo = ...; +/// Any any = Any.pack(foo); +/// ... +/// if (any.is(Foo.class)) { +/// foo = any.unpack(Foo.class); +/// } +/// +/// Example 3: Pack and unpack a message in Python. +/// +/// foo = Foo(...) +/// any = Any() +/// any.Pack(foo) +/// ... +/// if any.Is(Foo.DESCRIPTOR): +/// any.Unpack(foo) +/// ... +/// +/// Example 4: Pack and unpack a message in Go +/// +/// foo := &pb.Foo{...} +/// any, err := anypb.New(foo) +/// if err != nil { +/// ... +/// } +/// ... +/// foo := &pb.Foo{} +/// if err := any.UnmarshalTo(foo); err != nil { +/// ... +/// } +/// +/// The pack methods provided by protobuf library will by default use +/// 'type.googleapis.com/full.type.name' as the type URL and the unpack +/// methods only use the fully qualified type name after the last '/' +/// in the type URL, for example "foo.bar.com/x/y.z" will yield type +/// name "y.z". +/// +/// +/// JSON +/// +/// The JSON representation of an `Any` value uses the regular +/// representation of the deserialized, embedded message, with an +/// additional field `@type` which contains the type URL. Example: +/// +/// package google.profile; +/// message Person { +/// string first_name = 1; +/// string last_name = 2; +/// } +/// +/// { +/// "@type": "type.googleapis.com/google.profile.Person", +/// "firstName": , +/// "lastName": +/// } +/// +/// If the embedded message type is well-known and has a custom JSON +/// representation, that representation will be embedded adding a field +/// `value` which holds the custom JSON in addition to the `@type` +/// field. Example (for message [google.protobuf.Duration][]): +/// +/// { +/// "@type": "type.googleapis.com/google.protobuf.Duration", +/// "value": "1.212s" +/// } +class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { factory Any({ $core.String? typeUrl, $core.List<$core.int>? value, }) { - final _result = create(); + final $result = create(); if (typeUrl != null) { - _result.typeUrl = typeUrl; + $result.typeUrl = typeUrl; } if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + Any._() : super(); factory Any.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Any.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Any', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.AnyMixin.toProto3JsonHelper, + fromProto3Json: $mixin.AnyMixin.fromProto3JsonHelper) + ..aOS(1, _omitFieldNames ? '' : 'typeUrl') + ..a<$core.List<$core.int>>( + 2, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -64,9 +140,10 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Any copyWith(void Function(Any) updates) => - super.copyWith((message) => updates(message as Any)) - as Any; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Any)) as Any; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Any create() => Any._(); Any createEmptyInstance() => create(); @@ -76,6 +153,33 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Any? _defaultInstance; + /// A URL/resource name that uniquely identifies the type of the serialized + /// protocol buffer message. This string must contain at least + /// one "/" character. The last segment of the URL's path must represent + /// the fully qualified name of the type (as in + /// `path/google.protobuf.Duration`). The name should be in a canonical form + /// (e.g., leading "." is not accepted). + /// + /// In practice, teams usually precompile into the binary all types that they + /// expect it to use in the context of Any. However, for URLs which use the + /// scheme `http`, `https`, or no scheme, one can optionally set up a type + /// server that maps type URLs to message definitions as follows: + /// + /// * If no scheme is provided, `https` is assumed. + /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] + /// value in binary format, or produce an error. + /// * Applications are allowed to cache lookup results based on the + /// URL, or have them precompiled into a binary to avoid any + /// lookup. Therefore, binary compatibility needs to be preserved + /// on changes to types. (Use versioned type names to manage + /// breaking changes.) + /// + /// Note: this functionality is not currently available in the official + /// protobuf release, and it is not used for type URLs beginning with + /// type.googleapis.com. + /// + /// Schemes other than `http`, `https` (or the empty scheme) might be + /// used with implementation specific semantics. @$pb.TagNumber(1) $core.String get typeUrl => $_getSZ(0); @$pb.TagNumber(1) @@ -86,8 +190,9 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { @$pb.TagNumber(1) $core.bool hasTypeUrl() => $_has(0); @$pb.TagNumber(1) - void clearTypeUrl() => clearField(1); + void clearTypeUrl() => $_clearField(1); + /// Must be a valid serialized protocol buffer of the above specified type. @$pb.TagNumber(2) $core.List<$core.int> get value => $_getN(1); @$pb.TagNumber(2) @@ -98,7 +203,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { @$pb.TagNumber(2) $core.bool hasValue() => $_has(1); @$pb.TagNumber(2) - void clearValue() => clearField(2); + void clearValue() => $_clearField(2); /// Creates a new [Any] encoding [message]. /// @@ -111,3 +216,7 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin { return result; } } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbenum.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbenum.dart index e03f029c8e..ac5242a943 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbenum.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbjson.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbjson.dart index 1ad2e301d6..dd4ad488e9 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbjson.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/any.pbjson.dart @@ -1,20 +1,24 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/any.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:core' as $core; import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use anyDescriptor instead') -const Any$json = const { +const Any$json = { '1': 'Any', - '2': const [ - const {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, - const {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, + '2': [ + {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, + {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, ], }; diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pb.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pb.dart index 556f0fe9da..e2acb74e94 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pb.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pb.dart @@ -1,53 +1,53 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/wrappers.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; - import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin; -class DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'DoubleValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.DoubleValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.DoubleValueMixin.fromProto3JsonHelper) - ..a<$core.double>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OD) - ..hasRequiredFields = false; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - DoubleValue._() : super(); +/// Wrapper message for `double`. +/// +/// The JSON representation for `DoubleValue` is JSON number. +class DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin { factory DoubleValue({ $core.double? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + DoubleValue._() : super(); factory DoubleValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory DoubleValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'DoubleValue', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.DoubleValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.DoubleValueMixin.fromProto3JsonHelper) + ..a<$core.double>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OD) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -57,8 +57,10 @@ class DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin { 'Will be removed in next major version') DoubleValue copyWith(void Function(DoubleValue) updates) => super.copyWith((message) => updates(message as DoubleValue)) - as DoubleValue; // ignore: deprecated_member_use + as DoubleValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static DoubleValue create() => DoubleValue._(); DoubleValue createEmptyInstance() => create(); @@ -68,6 +70,7 @@ class DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static DoubleValue? _defaultInstance; + /// The double value. @$pb.TagNumber(1) $core.double get value => $_getN(0); @$pb.TagNumber(1) @@ -78,45 +81,40 @@ class DoubleValue extends $pb.GeneratedMessage with $mixin.DoubleValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `float`. +/// +/// The JSON representation for `FloatValue` is JSON number. class FloatValue extends $pb.GeneratedMessage with $mixin.FloatValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'FloatValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.FloatValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.FloatValueMixin.fromProto3JsonHelper) - ..a<$core.double>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OF) - ..hasRequiredFields = false; - - FloatValue._() : super(); factory FloatValue({ $core.double? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + FloatValue._() : super(); factory FloatValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FloatValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'FloatValue', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.FloatValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.FloatValueMixin.fromProto3JsonHelper) + ..a<$core.double>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OF) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -125,9 +123,10 @@ class FloatValue extends $pb.GeneratedMessage with $mixin.FloatValueMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') FloatValue copyWith(void Function(FloatValue) updates) => - super.copyWith((message) => updates(message as FloatValue)) - as FloatValue; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as FloatValue)) as FloatValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static FloatValue create() => FloatValue._(); FloatValue createEmptyInstance() => create(); @@ -137,6 +136,7 @@ class FloatValue extends $pb.GeneratedMessage with $mixin.FloatValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static FloatValue? _defaultInstance; + /// The float value. @$pb.TagNumber(1) $core.double get value => $_getN(0); @$pb.TagNumber(1) @@ -147,44 +147,40 @@ class FloatValue extends $pb.GeneratedMessage with $mixin.FloatValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `int64`. +/// +/// The JSON representation for `Int64Value` is JSON string. class Int64Value extends $pb.GeneratedMessage with $mixin.Int64ValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Int64Value', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.Int64ValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.Int64ValueMixin.fromProto3JsonHelper) - ..aInt64( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value') - ..hasRequiredFields = false; - - Int64Value._() : super(); factory Int64Value({ $fixnum.Int64? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + Int64Value._() : super(); factory Int64Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Int64Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Int64Value', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.Int64ValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.Int64ValueMixin.fromProto3JsonHelper) + ..aInt64(1, _omitFieldNames ? '' : 'value') + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -193,9 +189,10 @@ class Int64Value extends $pb.GeneratedMessage with $mixin.Int64ValueMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Int64Value copyWith(void Function(Int64Value) updates) => - super.copyWith((message) => updates(message as Int64Value)) - as Int64Value; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Int64Value)) as Int64Value; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Int64Value create() => Int64Value._(); Int64Value createEmptyInstance() => create(); @@ -205,6 +202,7 @@ class Int64Value extends $pb.GeneratedMessage with $mixin.Int64ValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static Int64Value? _defaultInstance; + /// The int64 value. @$pb.TagNumber(1) $fixnum.Int64 get value => $_getI64(0); @$pb.TagNumber(1) @@ -215,46 +213,41 @@ class Int64Value extends $pb.GeneratedMessage with $mixin.Int64ValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `uint64`. +/// +/// The JSON representation for `UInt64Value` is JSON string. class UInt64Value extends $pb.GeneratedMessage with $mixin.UInt64ValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'UInt64Value', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.UInt64ValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.UInt64ValueMixin.fromProto3JsonHelper) - ..a<$fixnum.Int64>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OU6, - defaultOrMaker: $fixnum.Int64.ZERO) - ..hasRequiredFields = false; - - UInt64Value._() : super(); factory UInt64Value({ $fixnum.Int64? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + UInt64Value._() : super(); factory UInt64Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory UInt64Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UInt64Value', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.UInt64ValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.UInt64ValueMixin.fromProto3JsonHelper) + ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OU6, + defaultOrMaker: $fixnum.Int64.ZERO) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -264,8 +257,10 @@ class UInt64Value extends $pb.GeneratedMessage with $mixin.UInt64ValueMixin { 'Will be removed in next major version') UInt64Value copyWith(void Function(UInt64Value) updates) => super.copyWith((message) => updates(message as UInt64Value)) - as UInt64Value; // ignore: deprecated_member_use + as UInt64Value; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static UInt64Value create() => UInt64Value._(); UInt64Value createEmptyInstance() => create(); @@ -275,6 +270,7 @@ class UInt64Value extends $pb.GeneratedMessage with $mixin.UInt64ValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static UInt64Value? _defaultInstance; + /// The uint64 value. @$pb.TagNumber(1) $fixnum.Int64 get value => $_getI64(0); @$pb.TagNumber(1) @@ -285,45 +281,40 @@ class UInt64Value extends $pb.GeneratedMessage with $mixin.UInt64ValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `int32`. +/// +/// The JSON representation for `Int32Value` is JSON number. class Int32Value extends $pb.GeneratedMessage with $mixin.Int32ValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Int32Value', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.Int32ValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.Int32ValueMixin.fromProto3JsonHelper) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.O3) - ..hasRequiredFields = false; - - Int32Value._() : super(); factory Int32Value({ $core.int? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + Int32Value._() : super(); factory Int32Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Int32Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Int32Value', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.Int32ValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.Int32ValueMixin.fromProto3JsonHelper) + ..a<$core.int>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.O3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -332,9 +323,10 @@ class Int32Value extends $pb.GeneratedMessage with $mixin.Int32ValueMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Int32Value copyWith(void Function(Int32Value) updates) => - super.copyWith((message) => updates(message as Int32Value)) - as Int32Value; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Int32Value)) as Int32Value; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Int32Value create() => Int32Value._(); Int32Value createEmptyInstance() => create(); @@ -344,6 +336,7 @@ class Int32Value extends $pb.GeneratedMessage with $mixin.Int32ValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static Int32Value? _defaultInstance; + /// The int32 value. @$pb.TagNumber(1) $core.int get value => $_getIZ(0); @$pb.TagNumber(1) @@ -354,45 +347,40 @@ class Int32Value extends $pb.GeneratedMessage with $mixin.Int32ValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `uint32`. +/// +/// The JSON representation for `UInt32Value` is JSON number. class UInt32Value extends $pb.GeneratedMessage with $mixin.UInt32ValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'UInt32Value', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.UInt32ValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.UInt32ValueMixin.fromProto3JsonHelper) - ..a<$core.int>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OU3) - ..hasRequiredFields = false; - - UInt32Value._() : super(); factory UInt32Value({ $core.int? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + UInt32Value._() : super(); factory UInt32Value.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory UInt32Value.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'UInt32Value', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.UInt32ValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.UInt32ValueMixin.fromProto3JsonHelper) + ..a<$core.int>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OU3) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -402,8 +390,10 @@ class UInt32Value extends $pb.GeneratedMessage with $mixin.UInt32ValueMixin { 'Will be removed in next major version') UInt32Value copyWith(void Function(UInt32Value) updates) => super.copyWith((message) => updates(message as UInt32Value)) - as UInt32Value; // ignore: deprecated_member_use + as UInt32Value; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static UInt32Value create() => UInt32Value._(); UInt32Value createEmptyInstance() => create(); @@ -413,6 +403,7 @@ class UInt32Value extends $pb.GeneratedMessage with $mixin.UInt32ValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static UInt32Value? _defaultInstance; + /// The uint32 value. @$pb.TagNumber(1) $core.int get value => $_getIZ(0); @$pb.TagNumber(1) @@ -423,44 +414,40 @@ class UInt32Value extends $pb.GeneratedMessage with $mixin.UInt32ValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `bool`. +/// +/// The JSON representation for `BoolValue` is JSON `true` and `false`. class BoolValue extends $pb.GeneratedMessage with $mixin.BoolValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'BoolValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.BoolValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.BoolValueMixin.fromProto3JsonHelper) - ..aOB( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value') - ..hasRequiredFields = false; - - BoolValue._() : super(); factory BoolValue({ $core.bool? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + BoolValue._() : super(); factory BoolValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory BoolValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'BoolValue', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.BoolValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.BoolValueMixin.fromProto3JsonHelper) + ..aOB(1, _omitFieldNames ? '' : 'value') + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -469,9 +456,10 @@ class BoolValue extends $pb.GeneratedMessage with $mixin.BoolValueMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') BoolValue copyWith(void Function(BoolValue) updates) => - super.copyWith((message) => updates(message as BoolValue)) - as BoolValue; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as BoolValue)) as BoolValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static BoolValue create() => BoolValue._(); BoolValue createEmptyInstance() => create(); @@ -481,6 +469,7 @@ class BoolValue extends $pb.GeneratedMessage with $mixin.BoolValueMixin { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static BoolValue? _defaultInstance; + /// The bool value. @$pb.TagNumber(1) $core.bool get value => $_getBF(0); @$pb.TagNumber(1) @@ -491,44 +480,40 @@ class BoolValue extends $pb.GeneratedMessage with $mixin.BoolValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `string`. +/// +/// The JSON representation for `StringValue` is JSON string. class StringValue extends $pb.GeneratedMessage with $mixin.StringValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'StringValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.StringValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.StringValueMixin.fromProto3JsonHelper) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value') - ..hasRequiredFields = false; - - StringValue._() : super(); factory StringValue({ $core.String? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + StringValue._() : super(); factory StringValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory StringValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'StringValue', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.StringValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.StringValueMixin.fromProto3JsonHelper) + ..aOS(1, _omitFieldNames ? '' : 'value') + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -538,8 +523,10 @@ class StringValue extends $pb.GeneratedMessage with $mixin.StringValueMixin { 'Will be removed in next major version') StringValue copyWith(void Function(StringValue) updates) => super.copyWith((message) => updates(message as StringValue)) - as StringValue; // ignore: deprecated_member_use + as StringValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static StringValue create() => StringValue._(); StringValue createEmptyInstance() => create(); @@ -549,6 +536,7 @@ class StringValue extends $pb.GeneratedMessage with $mixin.StringValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static StringValue? _defaultInstance; + /// The string value. @$pb.TagNumber(1) $core.String get value => $_getSZ(0); @$pb.TagNumber(1) @@ -559,45 +547,41 @@ class StringValue extends $pb.GeneratedMessage with $mixin.StringValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } +/// Wrapper message for `bytes`. +/// +/// The JSON representation for `BytesValue` is JSON string. class BytesValue extends $pb.GeneratedMessage with $mixin.BytesValueMixin { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'BytesValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'google.protobuf'), - createEmptyInstance: create, - toProto3Json: $mixin.BytesValueMixin.toProto3JsonHelper, - fromProto3Json: $mixin.BytesValueMixin.fromProto3JsonHelper) - ..a<$core.List<$core.int>>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - BytesValue._() : super(); factory BytesValue({ $core.List<$core.int>? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value = value; + $result.value = value; } - return _result; + return $result; } + BytesValue._() : super(); factory BytesValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory BytesValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'BytesValue', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), + createEmptyInstance: create, + toProto3Json: $mixin.BytesValueMixin.toProto3JsonHelper, + fromProto3Json: $mixin.BytesValueMixin.fromProto3JsonHelper) + ..a<$core.List<$core.int>>( + 1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.OY) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -606,9 +590,10 @@ class BytesValue extends $pb.GeneratedMessage with $mixin.BytesValueMixin { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') BytesValue copyWith(void Function(BytesValue) updates) => - super.copyWith((message) => updates(message as BytesValue)) - as BytesValue; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as BytesValue)) as BytesValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static BytesValue create() => BytesValue._(); BytesValue createEmptyInstance() => create(); @@ -618,6 +603,7 @@ class BytesValue extends $pb.GeneratedMessage with $mixin.BytesValueMixin { $pb.GeneratedMessage.$_defaultFor(create); static BytesValue? _defaultInstance; + /// The bytes value. @$pb.TagNumber(1) $core.List<$core.int> get value => $_getN(0); @$pb.TagNumber(1) @@ -628,5 +614,9 @@ class BytesValue extends $pb.GeneratedMessage with $mixin.BytesValueMixin { @$pb.TagNumber(1) $core.bool hasValue() => $_has(0); @$pb.TagNumber(1) - void clearValue() => clearField(1); + void clearValue() => $_clearField(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbenum.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbenum.dart index 0b4c1c7fc2..85394f52df 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbenum.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/wrappers.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbjson.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbjson.dart index 35be59a958..bd5e356bad 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbjson.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/google/protobuf/wrappers.pbjson.dart @@ -1,107 +1,119 @@ -/// +// // Generated code. Do not modify. // source: google/protobuf/wrappers.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:core' as $core; import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use doubleValueDescriptor instead') -const DoubleValue$json = const { +const DoubleValue$json = { '1': 'DoubleValue', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 1, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 1, '10': 'value'}, ], }; /// Descriptor for `DoubleValue`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List doubleValueDescriptor = $convert.base64Decode('CgtEb3VibGVWYWx1ZRIUCgV2YWx1ZRgBIAEoAVIFdmFsdWU='); + @$core.Deprecated('Use floatValueDescriptor instead') -const FloatValue$json = const { +const FloatValue$json = { '1': 'FloatValue', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 2, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 2, '10': 'value'}, ], }; /// Descriptor for `FloatValue`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List floatValueDescriptor = $convert.base64Decode('CgpGbG9hdFZhbHVlEhQKBXZhbHVlGAEgASgCUgV2YWx1ZQ=='); + @$core.Deprecated('Use int64ValueDescriptor instead') -const Int64Value$json = const { +const Int64Value$json = { '1': 'Int64Value', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 3, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 3, '10': 'value'}, ], }; /// Descriptor for `Int64Value`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List int64ValueDescriptor = $convert.base64Decode('CgpJbnQ2NFZhbHVlEhQKBXZhbHVlGAEgASgDUgV2YWx1ZQ=='); + @$core.Deprecated('Use uInt64ValueDescriptor instead') -const UInt64Value$json = const { +const UInt64Value$json = { '1': 'UInt64Value', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 4, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 4, '10': 'value'}, ], }; /// Descriptor for `UInt64Value`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List uInt64ValueDescriptor = $convert.base64Decode('CgtVSW50NjRWYWx1ZRIUCgV2YWx1ZRgBIAEoBFIFdmFsdWU='); + @$core.Deprecated('Use int32ValueDescriptor instead') -const Int32Value$json = const { +const Int32Value$json = { '1': 'Int32Value', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 5, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 5, '10': 'value'}, ], }; /// Descriptor for `Int32Value`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List int32ValueDescriptor = $convert.base64Decode('CgpJbnQzMlZhbHVlEhQKBXZhbHVlGAEgASgFUgV2YWx1ZQ=='); + @$core.Deprecated('Use uInt32ValueDescriptor instead') -const UInt32Value$json = const { +const UInt32Value$json = { '1': 'UInt32Value', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 13, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 13, '10': 'value'}, ], }; /// Descriptor for `UInt32Value`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List uInt32ValueDescriptor = $convert.base64Decode('CgtVSW50MzJWYWx1ZRIUCgV2YWx1ZRgBIAEoDVIFdmFsdWU='); + @$core.Deprecated('Use boolValueDescriptor instead') -const BoolValue$json = const { +const BoolValue$json = { '1': 'BoolValue', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 8, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 8, '10': 'value'}, ], }; /// Descriptor for `BoolValue`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List boolValueDescriptor = $convert.base64Decode('CglCb29sVmFsdWUSFAoFdmFsdWUYASABKAhSBXZhbHVl'); + @$core.Deprecated('Use stringValueDescriptor instead') -const StringValue$json = const { +const StringValue$json = { '1': 'StringValue', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 9, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 9, '10': 'value'}, ], }; /// Descriptor for `StringValue`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List stringValueDescriptor = $convert.base64Decode('CgtTdHJpbmdWYWx1ZRIUCgV2YWx1ZRgBIAEoCVIFdmFsdWU='); + @$core.Deprecated('Use bytesValueDescriptor instead') -const BytesValue$json = const { +const BytesValue$json = { '1': 'BytesValue', - '2': const [ - const {'1': 'value', '3': 1, '4': 1, '5': 12, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 1, '5': 12, '10': 'value'}, ], }; diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pb.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pb.dart index 21c3627c57..38af7e4838 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pb.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/example/example.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; @@ -11,40 +15,34 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'feature.pb.dart' as $0; -class Example extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Example', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..aOM<$0.Features>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'features', - subBuilder: $0.Features.create) - ..hasRequiredFields = false; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - Example._() : super(); +class Example extends $pb.GeneratedMessage { factory Example({ $0.Features? features, }) { - final _result = create(); + final $result = create(); if (features != null) { - _result.features = features; + $result.features = features; } - return _result; + return $result; } + Example._() : super(); factory Example.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Example.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Example', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..aOM<$0.Features>(1, _omitFieldNames ? '' : 'features', + subBuilder: $0.Features.create) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -53,9 +51,10 @@ class Example extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Example copyWith(void Function(Example) updates) => - super.copyWith((message) => updates(message as Example)) - as Example; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Example)) as Example; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Example create() => Example._(); Example createEmptyInstance() => create(); @@ -69,61 +68,49 @@ class Example extends $pb.GeneratedMessage { $0.Features get features => $_getN(0); @$pb.TagNumber(1) set features($0.Features v) { - setField(1, v); + $_setField(1, v); } @$pb.TagNumber(1) $core.bool hasFeatures() => $_has(0); @$pb.TagNumber(1) - void clearFeatures() => clearField(1); + void clearFeatures() => $_clearField(1); @$pb.TagNumber(1) $0.Features ensureFeatures() => $_ensure(0); } class SequenceExample extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'SequenceExample', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..aOM<$0.Features>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'context', - subBuilder: $0.Features.create) - ..aOM<$0.FeatureLists>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'featureLists', - subBuilder: $0.FeatureLists.create) - ..hasRequiredFields = false; - - SequenceExample._() : super(); factory SequenceExample({ $0.Features? context, $0.FeatureLists? featureLists, }) { - final _result = create(); + final $result = create(); if (context != null) { - _result.context = context; + $result.context = context; } if (featureLists != null) { - _result.featureLists = featureLists; + $result.featureLists = featureLists; } - return _result; + return $result; } + SequenceExample._() : super(); factory SequenceExample.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory SequenceExample.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'SequenceExample', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..aOM<$0.Features>(1, _omitFieldNames ? '' : 'context', + subBuilder: $0.Features.create) + ..aOM<$0.FeatureLists>(2, _omitFieldNames ? '' : 'featureLists', + subBuilder: $0.FeatureLists.create) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -133,8 +120,10 @@ class SequenceExample extends $pb.GeneratedMessage { 'Will be removed in next major version') SequenceExample copyWith(void Function(SequenceExample) updates) => super.copyWith((message) => updates(message as SequenceExample)) - as SequenceExample; // ignore: deprecated_member_use + as SequenceExample; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static SequenceExample create() => SequenceExample._(); SequenceExample createEmptyInstance() => create(); @@ -149,13 +138,13 @@ class SequenceExample extends $pb.GeneratedMessage { $0.Features get context => $_getN(0); @$pb.TagNumber(1) set context($0.Features v) { - setField(1, v); + $_setField(1, v); } @$pb.TagNumber(1) $core.bool hasContext() => $_has(0); @$pb.TagNumber(1) - void clearContext() => clearField(1); + void clearContext() => $_clearField(1); @$pb.TagNumber(1) $0.Features ensureContext() => $_ensure(0); @@ -163,13 +152,17 @@ class SequenceExample extends $pb.GeneratedMessage { $0.FeatureLists get featureLists => $_getN(1); @$pb.TagNumber(2) set featureLists($0.FeatureLists v) { - setField(2, v); + $_setField(2, v); } @$pb.TagNumber(2) $core.bool hasFeatureLists() => $_has(1); @$pb.TagNumber(2) - void clearFeatureLists() => clearField(2); + void clearFeatureLists() => $_clearField(2); @$pb.TagNumber(2) $0.FeatureLists ensureFeatureLists() => $_ensure(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbenum.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbenum.dart index 7d84da02bc..a8ea7a452f 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbenum.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/example/example.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbjson.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbjson.dart index 180e4dbeb2..b3ac0788ec 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbjson.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/example.pbjson.dart @@ -1,19 +1,23 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/example/example.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:core' as $core; import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use exampleDescriptor instead') -const Example$json = const { +const Example$json = { '1': 'Example', - '2': const [ - const { + '2': [ + { '1': 'features', '3': 1, '4': 1, @@ -26,12 +30,14 @@ const Example$json = const { /// Descriptor for `Example`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List exampleDescriptor = $convert.base64Decode( - 'CgdFeGFtcGxlEjAKCGZlYXR1cmVzGAEgASgLMhQudGVuc29yZmxvdy5GZWF0dXJlc1IIZmVhdHVyZXM='); + 'CgdFeGFtcGxlEjAKCGZlYXR1cmVzGAEgASgLMhQudGVuc29yZmxvdy5GZWF0dXJlc1IIZmVhdH' + 'VyZXM='); + @$core.Deprecated('Use sequenceExampleDescriptor instead') -const SequenceExample$json = const { +const SequenceExample$json = { '1': 'SequenceExample', - '2': const [ - const { + '2': [ + { '1': 'context', '3': 1, '4': 1, @@ -39,7 +45,7 @@ const SequenceExample$json = const { '6': '.tensorflow.Features', '10': 'context' }, - const { + { '1': 'feature_lists', '3': 2, '4': 1, @@ -52,4 +58,6 @@ const SequenceExample$json = const { /// Descriptor for `SequenceExample`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List sequenceExampleDescriptor = $convert.base64Decode( - 'Cg9TZXF1ZW5jZUV4YW1wbGUSLgoHY29udGV4dBgBIAEoCzIULnRlbnNvcmZsb3cuRmVhdHVyZXNSB2NvbnRleHQSPQoNZmVhdHVyZV9saXN0cxgCIAEoCzIYLnRlbnNvcmZsb3cuRmVhdHVyZUxpc3RzUgxmZWF0dXJlTGlzdHM='); + 'Cg9TZXF1ZW5jZUV4YW1wbGUSLgoHY29udGV4dBgBIAEoCzIULnRlbnNvcmZsb3cuRmVhdHVyZX' + 'NSB2NvbnRleHQSPQoNZmVhdHVyZV9saXN0cxgCIAEoCzIYLnRlbnNvcmZsb3cuRmVhdHVyZUxp' + 'c3RzUgxmZWF0dXJlTGlzdHM='); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pb.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pb.dart index 6f9ae5d3fc..125d449d15 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pb.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pb.dart @@ -1,49 +1,49 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/example/feature.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; -class BytesList extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'BytesList', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..p<$core.List<$core.int>>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.PY) - ..hasRequiredFields = false; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - BytesList._() : super(); +/// LINT.IfChange +/// Containers to hold repeated fundamental values. +class BytesList extends $pb.GeneratedMessage { factory BytesList({ $core.Iterable<$core.List<$core.int>>? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value.addAll(value); + $result.value.addAll(value); } - return _result; + return $result; } + BytesList._() : super(); factory BytesList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory BytesList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'BytesList', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..p<$core.List<$core.int>>( + 1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.PY) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -52,9 +52,10 @@ class BytesList extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') BytesList copyWith(void Function(BytesList) updates) => - super.copyWith((message) => updates(message as BytesList)) - as BytesList; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as BytesList)) as BytesList; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static BytesList create() => BytesList._(); BytesList createEmptyInstance() => create(); @@ -65,43 +66,34 @@ class BytesList extends $pb.GeneratedMessage { static BytesList? _defaultInstance; @$pb.TagNumber(1) - $core.List<$core.List<$core.int>> get value => $_getList(0); + $pb.PbList<$core.List<$core.int>> get value => $_getList(0); } class FloatList extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'FloatList', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..p<$core.double>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.KF) - ..hasRequiredFields = false; - - FloatList._() : super(); factory FloatList({ $core.Iterable<$core.double>? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value.addAll(value); + $result.value.addAll(value); } - return _result; + return $result; } + FloatList._() : super(); factory FloatList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FloatList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'FloatList', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..p<$core.double>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.KF) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -110,9 +102,10 @@ class FloatList extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') FloatList copyWith(void Function(FloatList) updates) => - super.copyWith((message) => updates(message as FloatList)) - as FloatList; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as FloatList)) as FloatList; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static FloatList create() => FloatList._(); FloatList createEmptyInstance() => create(); @@ -123,43 +116,34 @@ class FloatList extends $pb.GeneratedMessage { static FloatList? _defaultInstance; @$pb.TagNumber(1) - $core.List<$core.double> get value => $_getList(0); + $pb.PbList<$core.double> get value => $_getList(0); } class Int64List extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Int64List', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..p<$fixnum.Int64>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'value', - $pb.PbFieldType.K6) - ..hasRequiredFields = false; - - Int64List._() : super(); factory Int64List({ $core.Iterable<$fixnum.Int64>? value, }) { - final _result = create(); + final $result = create(); if (value != null) { - _result.value.addAll(value); + $result.value.addAll(value); } - return _result; + return $result; } + Int64List._() : super(); factory Int64List.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Int64List.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Int64List', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..p<$fixnum.Int64>(1, _omitFieldNames ? '' : 'value', $pb.PbFieldType.K6) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -168,9 +152,10 @@ class Int64List extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Int64List copyWith(void Function(Int64List) updates) => - super.copyWith((message) => updates(message as Int64List)) - as Int64List; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Int64List)) as Int64List; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Int64List create() => Int64List._(); Int64List createEmptyInstance() => create(); @@ -181,72 +166,57 @@ class Int64List extends $pb.GeneratedMessage { static Int64List? _defaultInstance; @$pb.TagNumber(1) - $core.List<$fixnum.Int64> get value => $_getList(0); + $pb.PbList<$fixnum.Int64> get value => $_getList(0); } enum Feature_Kind { bytesList, floatList, int64List, notSet } +/// Containers for non-sequential data. class Feature extends $pb.GeneratedMessage { - static const $core.Map<$core.int, Feature_Kind> _Feature_KindByTag = { - 1: Feature_Kind.bytesList, - 2: Feature_Kind.floatList, - 3: Feature_Kind.int64List, - 0: Feature_Kind.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Feature', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..oo(0, [1, 2, 3]) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'bytesList', - subBuilder: BytesList.create) - ..aOM( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'floatList', - subBuilder: FloatList.create) - ..aOM( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'int64List', - subBuilder: Int64List.create) - ..hasRequiredFields = false; - - Feature._() : super(); factory Feature({ BytesList? bytesList, FloatList? floatList, Int64List? int64List, }) { - final _result = create(); + final $result = create(); if (bytesList != null) { - _result.bytesList = bytesList; + $result.bytesList = bytesList; } if (floatList != null) { - _result.floatList = floatList; + $result.floatList = floatList; } if (int64List != null) { - _result.int64List = int64List; + $result.int64List = int64List; } - return _result; + return $result; } + Feature._() : super(); factory Feature.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Feature.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, Feature_Kind> _Feature_KindByTag = { + 1: Feature_Kind.bytesList, + 2: Feature_Kind.floatList, + 3: Feature_Kind.int64List, + 0: Feature_Kind.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Feature', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..oo(0, [1, 2, 3]) + ..aOM(1, _omitFieldNames ? '' : 'bytesList', + subBuilder: BytesList.create) + ..aOM(2, _omitFieldNames ? '' : 'floatList', + subBuilder: FloatList.create) + ..aOM(3, _omitFieldNames ? '' : 'int64List', + subBuilder: Int64List.create) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -255,9 +225,10 @@ class Feature extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Feature copyWith(void Function(Feature) updates) => - super.copyWith((message) => updates(message as Feature)) - as Feature; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Feature)) as Feature; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Feature create() => Feature._(); Feature createEmptyInstance() => create(); @@ -268,19 +239,19 @@ class Feature extends $pb.GeneratedMessage { static Feature? _defaultInstance; Feature_Kind whichKind() => _Feature_KindByTag[$_whichOneof(0)]!; - void clearKind() => clearField($_whichOneof(0)); + void clearKind() => $_clearField($_whichOneof(0)); @$pb.TagNumber(1) BytesList get bytesList => $_getN(0); @$pb.TagNumber(1) set bytesList(BytesList v) { - setField(1, v); + $_setField(1, v); } @$pb.TagNumber(1) $core.bool hasBytesList() => $_has(0); @$pb.TagNumber(1) - void clearBytesList() => clearField(1); + void clearBytesList() => $_clearField(1); @$pb.TagNumber(1) BytesList ensureBytesList() => $_ensure(0); @@ -288,13 +259,13 @@ class Feature extends $pb.GeneratedMessage { FloatList get floatList => $_getN(1); @$pb.TagNumber(2) set floatList(FloatList v) { - setField(2, v); + $_setField(2, v); } @$pb.TagNumber(2) $core.bool hasFloatList() => $_has(1); @$pb.TagNumber(2) - void clearFloatList() => clearField(2); + void clearFloatList() => $_clearField(2); @$pb.TagNumber(2) FloatList ensureFloatList() => $_ensure(1); @@ -302,55 +273,48 @@ class Feature extends $pb.GeneratedMessage { Int64List get int64List => $_getN(2); @$pb.TagNumber(3) set int64List(Int64List v) { - setField(3, v); + $_setField(3, v); } @$pb.TagNumber(3) $core.bool hasInt64List() => $_has(2); @$pb.TagNumber(3) - void clearInt64List() => clearField(3); + void clearInt64List() => $_clearField(3); @$pb.TagNumber(3) Int64List ensureInt64List() => $_ensure(2); } class Features extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'Features', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..m<$core.String, Feature>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'feature', - entryClassName: 'Features.FeatureEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OM, - valueCreator: Feature.create, - packageName: const $pb.PackageName('tensorflow')) - ..hasRequiredFields = false; - - Features._() : super(); factory Features({ - $core.Map<$core.String, Feature>? feature, + $pb.PbMap<$core.String, Feature>? feature, }) { - final _result = create(); + final $result = create(); if (feature != null) { - _result.feature.addAll(feature); + $result.feature.addAll(feature); } - return _result; + return $result; } + Features._() : super(); factory Features.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory Features.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Features', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..m<$core.String, Feature>(1, _omitFieldNames ? '' : 'feature', + entryClassName: 'Features.FeatureEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OM, + valueCreator: Feature.create, + valueDefaultOrMaker: Feature.getDefault, + packageName: const $pb.PackageName('tensorflow')) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -359,9 +323,10 @@ class Features extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') Features copyWith(void Function(Features) updates) => - super.copyWith((message) => updates(message as Features)) - as Features; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as Features)) as Features; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static Features create() => Features._(); Features createEmptyInstance() => create(); @@ -371,45 +336,44 @@ class Features extends $pb.GeneratedMessage { _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static Features? _defaultInstance; + /// Map from feature name to feature. @$pb.TagNumber(1) - $core.Map<$core.String, Feature> get feature => $_getMap(0); + $pb.PbMap<$core.String, Feature> get feature => $_getMap(0); } +/// Containers for sequential data. +/// +/// A FeatureList contains lists of Features. These may hold zero or more +/// Feature values. +/// +/// FeatureLists are organized into categories by name. The FeatureLists message +/// contains the mapping from name to FeatureList. class FeatureList extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'FeatureList', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..pc( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'feature', - $pb.PbFieldType.PM, - subBuilder: Feature.create) - ..hasRequiredFields = false; - - FeatureList._() : super(); factory FeatureList({ $core.Iterable? feature, }) { - final _result = create(); + final $result = create(); if (feature != null) { - _result.feature.addAll(feature); + $result.feature.addAll(feature); } - return _result; + return $result; } + FeatureList._() : super(); factory FeatureList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FeatureList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'FeatureList', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..pc(1, _omitFieldNames ? '' : 'feature', $pb.PbFieldType.PM, + subBuilder: Feature.create) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -419,8 +383,10 @@ class FeatureList extends $pb.GeneratedMessage { 'Will be removed in next major version') FeatureList copyWith(void Function(FeatureList) updates) => super.copyWith((message) => updates(message as FeatureList)) - as FeatureList; // ignore: deprecated_member_use + as FeatureList; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static FeatureList create() => FeatureList._(); FeatureList createEmptyInstance() => create(); @@ -431,47 +397,40 @@ class FeatureList extends $pb.GeneratedMessage { static FeatureList? _defaultInstance; @$pb.TagNumber(1) - $core.List get feature => $_getList(0); + $pb.PbList get feature => $_getList(0); } class FeatureLists extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'FeatureLists', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..m<$core.String, FeatureList>( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'featureList', - entryClassName: 'FeatureLists.FeatureListEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OM, - valueCreator: FeatureList.create, - packageName: const $pb.PackageName('tensorflow')) - ..hasRequiredFields = false; - - FeatureLists._() : super(); factory FeatureLists({ - $core.Map<$core.String, FeatureList>? featureList, + $pb.PbMap<$core.String, FeatureList>? featureList, }) { - final _result = create(); + final $result = create(); if (featureList != null) { - _result.featureList.addAll(featureList); + $result.featureList.addAll(featureList); } - return _result; + return $result; } + FeatureLists._() : super(); factory FeatureLists.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FeatureLists.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'FeatureLists', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..m<$core.String, FeatureList>(1, _omitFieldNames ? '' : 'featureList', + entryClassName: 'FeatureLists.FeatureListEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OM, + valueCreator: FeatureList.create, + valueDefaultOrMaker: FeatureList.getDefault, + packageName: const $pb.PackageName('tensorflow')) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -481,8 +440,10 @@ class FeatureLists extends $pb.GeneratedMessage { 'Will be removed in next major version') FeatureLists copyWith(void Function(FeatureLists) updates) => super.copyWith((message) => updates(message as FeatureLists)) - as FeatureLists; // ignore: deprecated_member_use + as FeatureLists; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static FeatureLists create() => FeatureLists._(); FeatureLists createEmptyInstance() => create(); @@ -493,6 +454,11 @@ class FeatureLists extends $pb.GeneratedMessage { $pb.GeneratedMessage.$_defaultFor(create); static FeatureLists? _defaultInstance; + /// Map from feature name to feature list. @$pb.TagNumber(1) - $core.Map<$core.String, FeatureList> get featureList => $_getMap(0); + $pb.PbMap<$core.String, FeatureList> get featureList => $_getMap(0); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbenum.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbenum.dart index c9972cdbe6..ce70a23784 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbenum.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/example/feature.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbjson.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbjson.dart index 3310a8f443..a41d6713a6 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbjson.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/example/feature.pbjson.dart @@ -1,35 +1,40 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/example/feature.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:core' as $core; import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use bytesListDescriptor instead') -const BytesList$json = const { +const BytesList$json = { '1': 'BytesList', - '2': const [ - const {'1': 'value', '3': 1, '4': 3, '5': 12, '10': 'value'}, + '2': [ + {'1': 'value', '3': 1, '4': 3, '5': 12, '10': 'value'}, ], }; /// Descriptor for `BytesList`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List bytesListDescriptor = $convert.base64Decode('CglCeXRlc0xpc3QSFAoFdmFsdWUYASADKAxSBXZhbHVl'); + @$core.Deprecated('Use floatListDescriptor instead') -const FloatList$json = const { +const FloatList$json = { '1': 'FloatList', - '2': const [ - const { + '2': [ + { '1': 'value', '3': 1, '4': 3, '5': 2, - '8': const {'2': true}, + '8': {'2': true}, '10': 'value', }, ], @@ -38,16 +43,17 @@ const FloatList$json = const { /// Descriptor for `FloatList`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List floatListDescriptor = $convert .base64Decode('CglGbG9hdExpc3QSGAoFdmFsdWUYASADKAJCAhABUgV2YWx1ZQ=='); + @$core.Deprecated('Use int64ListDescriptor instead') -const Int64List$json = const { +const Int64List$json = { '1': 'Int64List', - '2': const [ - const { + '2': [ + { '1': 'value', '3': 1, '4': 3, '5': 3, - '8': const {'2': true}, + '8': {'2': true}, '10': 'value', }, ], @@ -56,11 +62,12 @@ const Int64List$json = const { /// Descriptor for `Int64List`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List int64ListDescriptor = $convert .base64Decode('CglJbnQ2NExpc3QSGAoFdmFsdWUYASADKANCAhABUgV2YWx1ZQ=='); + @$core.Deprecated('Use featureDescriptor instead') -const Feature$json = const { +const Feature$json = { '1': 'Feature', - '2': const [ - const { + '2': [ + { '1': 'bytes_list', '3': 1, '4': 1, @@ -69,7 +76,7 @@ const Feature$json = const { '9': 0, '10': 'bytesList' }, - const { + { '1': 'float_list', '3': 2, '4': 1, @@ -78,7 +85,7 @@ const Feature$json = const { '9': 0, '10': 'floatList' }, - const { + { '1': 'int64_list', '3': 3, '4': 1, @@ -88,19 +95,23 @@ const Feature$json = const { '10': 'int64List' }, ], - '8': const [ - const {'1': 'kind'}, + '8': [ + {'1': 'kind'}, ], }; /// Descriptor for `Feature`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List featureDescriptor = $convert.base64Decode( - 'CgdGZWF0dXJlEjYKCmJ5dGVzX2xpc3QYASABKAsyFS50ZW5zb3JmbG93LkJ5dGVzTGlzdEgAUglieXRlc0xpc3QSNgoKZmxvYXRfbGlzdBgCIAEoCzIVLnRlbnNvcmZsb3cuRmxvYXRMaXN0SABSCWZsb2F0TGlzdBI2CgppbnQ2NF9saXN0GAMgASgLMhUudGVuc29yZmxvdy5JbnQ2NExpc3RIAFIJaW50NjRMaXN0QgYKBGtpbmQ='); + 'CgdGZWF0dXJlEjYKCmJ5dGVzX2xpc3QYASABKAsyFS50ZW5zb3JmbG93LkJ5dGVzTGlzdEgAUg' + 'lieXRlc0xpc3QSNgoKZmxvYXRfbGlzdBgCIAEoCzIVLnRlbnNvcmZsb3cuRmxvYXRMaXN0SABS' + 'CWZsb2F0TGlzdBI2CgppbnQ2NF9saXN0GAMgASgLMhUudGVuc29yZmxvdy5JbnQ2NExpc3RIAF' + 'IJaW50NjRMaXN0QgYKBGtpbmQ='); + @$core.Deprecated('Use featuresDescriptor instead') -const Features$json = const { +const Features$json = { '1': 'Features', - '2': const [ - const { + '2': [ + { '1': 'feature', '3': 1, '4': 3, @@ -109,15 +120,15 @@ const Features$json = const { '10': 'feature' }, ], - '3': const [Features_FeatureEntry$json], + '3': [Features_FeatureEntry$json], }; @$core.Deprecated('Use featuresDescriptor instead') -const Features_FeatureEntry$json = const { +const Features_FeatureEntry$json = { '1': 'FeatureEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const { + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + { '1': 'value', '3': 2, '4': 1, @@ -126,17 +137,20 @@ const Features_FeatureEntry$json = const { '10': 'value' }, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `Features`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List featuresDescriptor = $convert.base64Decode( - 'CghGZWF0dXJlcxI7CgdmZWF0dXJlGAEgAygLMiEudGVuc29yZmxvdy5GZWF0dXJlcy5GZWF0dXJlRW50cnlSB2ZlYXR1cmUaTwoMRmVhdHVyZUVudHJ5EhAKA2tleRgBIAEoCVIDa2V5EikKBXZhbHVlGAIgASgLMhMudGVuc29yZmxvdy5GZWF0dXJlUgV2YWx1ZToCOAE='); + 'CghGZWF0dXJlcxI7CgdmZWF0dXJlGAEgAygLMiEudGVuc29yZmxvdy5GZWF0dXJlcy5GZWF0dX' + 'JlRW50cnlSB2ZlYXR1cmUaTwoMRmVhdHVyZUVudHJ5EhAKA2tleRgBIAEoCVIDa2V5EikKBXZh' + 'bHVlGAIgASgLMhMudGVuc29yZmxvdy5GZWF0dXJlUgV2YWx1ZToCOAE='); + @$core.Deprecated('Use featureListDescriptor instead') -const FeatureList$json = const { +const FeatureList$json = { '1': 'FeatureList', - '2': const [ - const { + '2': [ + { '1': 'feature', '3': 1, '4': 3, @@ -149,12 +163,14 @@ const FeatureList$json = const { /// Descriptor for `FeatureList`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List featureListDescriptor = $convert.base64Decode( - 'CgtGZWF0dXJlTGlzdBItCgdmZWF0dXJlGAEgAygLMhMudGVuc29yZmxvdy5GZWF0dXJlUgdmZWF0dXJl'); + 'CgtGZWF0dXJlTGlzdBItCgdmZWF0dXJlGAEgAygLMhMudGVuc29yZmxvdy5GZWF0dXJlUgdmZW' + 'F0dXJl'); + @$core.Deprecated('Use featureListsDescriptor instead') -const FeatureLists$json = const { +const FeatureLists$json = { '1': 'FeatureLists', - '2': const [ - const { + '2': [ + { '1': 'feature_list', '3': 1, '4': 3, @@ -163,15 +179,15 @@ const FeatureLists$json = const { '10': 'featureList' }, ], - '3': const [FeatureLists_FeatureListEntry$json], + '3': [FeatureLists_FeatureListEntry$json], }; @$core.Deprecated('Use featureListsDescriptor instead') -const FeatureLists_FeatureListEntry$json = const { +const FeatureLists_FeatureListEntry$json = { '1': 'FeatureListEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const { + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + { '1': 'value', '3': 2, '4': 1, @@ -180,9 +196,12 @@ const FeatureLists_FeatureListEntry$json = const { '10': 'value' }, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `FeatureLists`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List featureListsDescriptor = $convert.base64Decode( - 'CgxGZWF0dXJlTGlzdHMSTAoMZmVhdHVyZV9saXN0GAEgAygLMikudGVuc29yZmxvdy5GZWF0dXJlTGlzdHMuRmVhdHVyZUxpc3RFbnRyeVILZmVhdHVyZUxpc3QaVwoQRmVhdHVyZUxpc3RFbnRyeRIQCgNrZXkYASABKAlSA2tleRItCgV2YWx1ZRgCIAEoCzIXLnRlbnNvcmZsb3cuRmVhdHVyZUxpc3RSBXZhbHVlOgI4AQ=='); + 'CgxGZWF0dXJlTGlzdHMSTAoMZmVhdHVyZV9saXN0GAEgAygLMikudGVuc29yZmxvdy5GZWF0dX' + 'JlTGlzdHMuRmVhdHVyZUxpc3RFbnRyeVILZmVhdHVyZUxpc3QaVwoQRmVhdHVyZUxpc3RFbnRy' + 'eRIQCgNrZXkYASABKAlSA2tleRItCgV2YWx1ZRgCIAEoCzIXLnRlbnNvcmZsb3cuRmVhdHVyZU' + 'xpc3RSBXZhbHVlOgI4AQ=='); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pb.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pb.dart index faa6db0253..3d416bc4b2 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pb.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pb.dart @@ -1,86 +1,27 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/framework/attr_value.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; -import 'tensor_shape.pb.dart' as $0; import 'tensor.pb.dart' as $1; - +import 'tensor_shape.pb.dart' as $0; import 'types.pbenum.dart' as $2; -class AttrValue_ListValue extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'AttrValue.ListValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..p<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 's', - $pb.PbFieldType.PY) - ..p<$fixnum.Int64>( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'i', - $pb.PbFieldType.K6) - ..p<$core.double>( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'f', - $pb.PbFieldType.KF) - ..p<$core.bool>( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'b', - $pb.PbFieldType.KB) - ..pc<$2.DataType>( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'type', - $pb.PbFieldType.KE, - valueOf: $2.DataType.valueOf, - enumValues: $2.DataType.values) - ..pc<$0.TensorShapeProto>( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'shape', - $pb.PbFieldType.PM, - subBuilder: $0.TensorShapeProto.create) - ..pc<$1.TensorProto>( - 8, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'tensor', - $pb.PbFieldType.PM, - subBuilder: $1.TensorProto.create) - ..pc( - 9, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'func', - $pb.PbFieldType.PM, - subBuilder: NameAttrList.create) - ..hasRequiredFields = false; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - AttrValue_ListValue._() : super(); +/// LINT.IfChange +class AttrValue_ListValue extends $pb.GeneratedMessage { factory AttrValue_ListValue({ $core.Iterable<$core.List<$core.int>>? s, $core.Iterable<$fixnum.Int64>? i, @@ -91,39 +32,63 @@ class AttrValue_ListValue extends $pb.GeneratedMessage { $core.Iterable<$1.TensorProto>? tensor, $core.Iterable? func, }) { - final _result = create(); + final $result = create(); if (s != null) { - _result.s.addAll(s); + $result.s.addAll(s); } if (i != null) { - _result.i.addAll(i); + $result.i.addAll(i); } if (f != null) { - _result.f.addAll(f); + $result.f.addAll(f); } if (b != null) { - _result.b.addAll(b); + $result.b.addAll(b); } if (type != null) { - _result.type.addAll(type); + $result.type.addAll(type); } if (shape != null) { - _result.shape.addAll(shape); + $result.shape.addAll(shape); } if (tensor != null) { - _result.tensor.addAll(tensor); + $result.tensor.addAll(tensor); } if (func != null) { - _result.func.addAll(func); + $result.func.addAll(func); } - return _result; + return $result; } + AttrValue_ListValue._() : super(); factory AttrValue_ListValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory AttrValue_ListValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'AttrValue.ListValue', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..p<$core.List<$core.int>>( + 2, _omitFieldNames ? '' : 's', $pb.PbFieldType.PY) + ..p<$fixnum.Int64>(3, _omitFieldNames ? '' : 'i', $pb.PbFieldType.K6) + ..p<$core.double>(4, _omitFieldNames ? '' : 'f', $pb.PbFieldType.KF) + ..p<$core.bool>(5, _omitFieldNames ? '' : 'b', $pb.PbFieldType.KB) + ..pc<$2.DataType>(6, _omitFieldNames ? '' : 'type', $pb.PbFieldType.KE, + valueOf: $2.DataType.valueOf, + enumValues: $2.DataType.values, + defaultEnumValue: $2.DataType.DT_INVALID) + ..pc<$0.TensorShapeProto>( + 7, _omitFieldNames ? '' : 'shape', $pb.PbFieldType.PM, + subBuilder: $0.TensorShapeProto.create) + ..pc<$1.TensorProto>(8, _omitFieldNames ? '' : 'tensor', $pb.PbFieldType.PM, + subBuilder: $1.TensorProto.create) + ..pc(9, _omitFieldNames ? '' : 'func', $pb.PbFieldType.PM, + subBuilder: NameAttrList.create) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -133,8 +98,10 @@ class AttrValue_ListValue extends $pb.GeneratedMessage { 'Will be removed in next major version') AttrValue_ListValue copyWith(void Function(AttrValue_ListValue) updates) => super.copyWith((message) => updates(message as AttrValue_ListValue)) - as AttrValue_ListValue; // ignore: deprecated_member_use + as AttrValue_ListValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static AttrValue_ListValue create() => AttrValue_ListValue._(); AttrValue_ListValue createEmptyInstance() => create(); @@ -146,28 +113,28 @@ class AttrValue_ListValue extends $pb.GeneratedMessage { static AttrValue_ListValue? _defaultInstance; @$pb.TagNumber(2) - $core.List<$core.List<$core.int>> get s => $_getList(0); + $pb.PbList<$core.List<$core.int>> get s => $_getList(0); @$pb.TagNumber(3) - $core.List<$fixnum.Int64> get i => $_getList(1); + $pb.PbList<$fixnum.Int64> get i => $_getList(1); @$pb.TagNumber(4) - $core.List<$core.double> get f => $_getList(2); + $pb.PbList<$core.double> get f => $_getList(2); @$pb.TagNumber(5) - $core.List<$core.bool> get b => $_getList(3); + $pb.PbList<$core.bool> get b => $_getList(3); @$pb.TagNumber(6) - $core.List<$2.DataType> get type => $_getList(4); + $pb.PbList<$2.DataType> get type => $_getList(4); @$pb.TagNumber(7) - $core.List<$0.TensorShapeProto> get shape => $_getList(5); + $pb.PbList<$0.TensorShapeProto> get shape => $_getList(5); @$pb.TagNumber(8) - $core.List<$1.TensorProto> get tensor => $_getList(6); + $pb.PbList<$1.TensorProto> get tensor => $_getList(6); @$pb.TagNumber(9) - $core.List get func => $_getList(7); + $pb.PbList get func => $_getList(7); } enum AttrValue_Value { @@ -184,93 +151,10 @@ enum AttrValue_Value { notSet } +/// Protocol buffer representing the value for an attr used to configure an Op. +/// Comment indicates the corresponding attr type. Only the field matching the +/// attr type may be filled. class AttrValue extends $pb.GeneratedMessage { - static const $core.Map<$core.int, AttrValue_Value> _AttrValue_ValueByTag = { - 1: AttrValue_Value.list, - 2: AttrValue_Value.s, - 3: AttrValue_Value.i, - 4: AttrValue_Value.f, - 5: AttrValue_Value.b, - 6: AttrValue_Value.type, - 7: AttrValue_Value.shape, - 8: AttrValue_Value.tensor, - 9: AttrValue_Value.placeholder, - 10: AttrValue_Value.func, - 0: AttrValue_Value.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'AttrValue', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) - ..aOM( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'list', - subBuilder: AttrValue_ListValue.create) - ..a<$core.List<$core.int>>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 's', - $pb.PbFieldType.OY) - ..aInt64( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'i') - ..a<$core.double>( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'f', - $pb.PbFieldType.OF) - ..aOB( - 5, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'b') - ..e<$2.DataType>( - 6, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'type', - $pb.PbFieldType.OE, - defaultOrMaker: $2.DataType.DT_INVALID, - valueOf: $2.DataType.valueOf, - enumValues: $2.DataType.values) - ..aOM<$0.TensorShapeProto>( - 7, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'shape', - subBuilder: $0.TensorShapeProto.create) - ..aOM<$1.TensorProto>( - 8, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'tensor', - subBuilder: $1.TensorProto.create) - ..aOS( - 9, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'placeholder') - ..aOM( - 10, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'func', - subBuilder: NameAttrList.create) - ..hasRequiredFields = false; - - AttrValue._() : super(); factory AttrValue({ AttrValue_ListValue? list, $core.List<$core.int>? s, @@ -283,45 +167,85 @@ class AttrValue extends $pb.GeneratedMessage { $core.String? placeholder, NameAttrList? func, }) { - final _result = create(); + final $result = create(); if (list != null) { - _result.list = list; + $result.list = list; } if (s != null) { - _result.s = s; + $result.s = s; } if (i != null) { - _result.i = i; + $result.i = i; } if (f != null) { - _result.f = f; + $result.f = f; } if (b != null) { - _result.b = b; + $result.b = b; } if (type != null) { - _result.type = type; + $result.type = type; } if (shape != null) { - _result.shape = shape; + $result.shape = shape; } if (tensor != null) { - _result.tensor = tensor; + $result.tensor = tensor; } if (placeholder != null) { - _result.placeholder = placeholder; + $result.placeholder = placeholder; } if (func != null) { - _result.func = func; + $result.func = func; } - return _result; + return $result; } + AttrValue._() : super(); factory AttrValue.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory AttrValue.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, AttrValue_Value> _AttrValue_ValueByTag = { + 1: AttrValue_Value.list, + 2: AttrValue_Value.s, + 3: AttrValue_Value.i, + 4: AttrValue_Value.f, + 5: AttrValue_Value.b, + 6: AttrValue_Value.type, + 7: AttrValue_Value.shape, + 8: AttrValue_Value.tensor, + 9: AttrValue_Value.placeholder, + 10: AttrValue_Value.func, + 0: AttrValue_Value.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'AttrValue', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + ..aOM(1, _omitFieldNames ? '' : 'list', + subBuilder: AttrValue_ListValue.create) + ..a<$core.List<$core.int>>( + 2, _omitFieldNames ? '' : 's', $pb.PbFieldType.OY) + ..aInt64(3, _omitFieldNames ? '' : 'i') + ..a<$core.double>(4, _omitFieldNames ? '' : 'f', $pb.PbFieldType.OF) + ..aOB(5, _omitFieldNames ? '' : 'b') + ..e<$2.DataType>(6, _omitFieldNames ? '' : 'type', $pb.PbFieldType.OE, + defaultOrMaker: $2.DataType.DT_INVALID, + valueOf: $2.DataType.valueOf, + enumValues: $2.DataType.values) + ..aOM<$0.TensorShapeProto>(7, _omitFieldNames ? '' : 'shape', + subBuilder: $0.TensorShapeProto.create) + ..aOM<$1.TensorProto>(8, _omitFieldNames ? '' : 'tensor', + subBuilder: $1.TensorProto.create) + ..aOS(9, _omitFieldNames ? '' : 'placeholder') + ..aOM(10, _omitFieldNames ? '' : 'func', + subBuilder: NameAttrList.create) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -330,9 +254,10 @@ class AttrValue extends $pb.GeneratedMessage { 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') AttrValue copyWith(void Function(AttrValue) updates) => - super.copyWith((message) => updates(message as AttrValue)) - as AttrValue; // ignore: deprecated_member_use + super.copyWith((message) => updates(message as AttrValue)) as AttrValue; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static AttrValue create() => AttrValue._(); AttrValue createEmptyInstance() => create(); @@ -343,19 +268,19 @@ class AttrValue extends $pb.GeneratedMessage { static AttrValue? _defaultInstance; AttrValue_Value whichValue() => _AttrValue_ValueByTag[$_whichOneof(0)]!; - void clearValue() => clearField($_whichOneof(0)); + void clearValue() => $_clearField($_whichOneof(0)); @$pb.TagNumber(1) AttrValue_ListValue get list => $_getN(0); @$pb.TagNumber(1) set list(AttrValue_ListValue v) { - setField(1, v); + $_setField(1, v); } @$pb.TagNumber(1) $core.bool hasList() => $_has(0); @$pb.TagNumber(1) - void clearList() => clearField(1); + void clearList() => $_clearField(1); @$pb.TagNumber(1) AttrValue_ListValue ensureList() => $_ensure(0); @@ -369,7 +294,7 @@ class AttrValue extends $pb.GeneratedMessage { @$pb.TagNumber(2) $core.bool hasS() => $_has(1); @$pb.TagNumber(2) - void clearS() => clearField(2); + void clearS() => $_clearField(2); @$pb.TagNumber(3) $fixnum.Int64 get i => $_getI64(2); @@ -381,7 +306,7 @@ class AttrValue extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.bool hasI() => $_has(2); @$pb.TagNumber(3) - void clearI() => clearField(3); + void clearI() => $_clearField(3); @$pb.TagNumber(4) $core.double get f => $_getN(3); @@ -393,7 +318,7 @@ class AttrValue extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.bool hasF() => $_has(3); @$pb.TagNumber(4) - void clearF() => clearField(4); + void clearF() => $_clearField(4); @$pb.TagNumber(5) $core.bool get b => $_getBF(4); @@ -405,31 +330,31 @@ class AttrValue extends $pb.GeneratedMessage { @$pb.TagNumber(5) $core.bool hasB() => $_has(4); @$pb.TagNumber(5) - void clearB() => clearField(5); + void clearB() => $_clearField(5); @$pb.TagNumber(6) $2.DataType get type => $_getN(5); @$pb.TagNumber(6) set type($2.DataType v) { - setField(6, v); + $_setField(6, v); } @$pb.TagNumber(6) $core.bool hasType() => $_has(5); @$pb.TagNumber(6) - void clearType() => clearField(6); + void clearType() => $_clearField(6); @$pb.TagNumber(7) $0.TensorShapeProto get shape => $_getN(6); @$pb.TagNumber(7) set shape($0.TensorShapeProto v) { - setField(7, v); + $_setField(7, v); } @$pb.TagNumber(7) $core.bool hasShape() => $_has(6); @$pb.TagNumber(7) - void clearShape() => clearField(7); + void clearShape() => $_clearField(7); @$pb.TagNumber(7) $0.TensorShapeProto ensureShape() => $_ensure(6); @@ -437,16 +362,23 @@ class AttrValue extends $pb.GeneratedMessage { $1.TensorProto get tensor => $_getN(7); @$pb.TagNumber(8) set tensor($1.TensorProto v) { - setField(8, v); + $_setField(8, v); } @$pb.TagNumber(8) $core.bool hasTensor() => $_has(7); @$pb.TagNumber(8) - void clearTensor() => clearField(8); + void clearTensor() => $_clearField(8); @$pb.TagNumber(8) $1.TensorProto ensureTensor() => $_ensure(7); + /// This is a placeholder only used in nodes defined inside a + /// function. It indicates the attr value will be supplied when + /// the function is instantiated. For example, let us suppose a + /// node "N" in function "FN". "N" has an attr "A" with value + /// placeholder = "foo". When FN is instantiated with attr "foo" + /// set to "bar", the instantiated node N's attr A will have been + /// given the value "bar". @$pb.TagNumber(9) $core.String get placeholder => $_getSZ(8); @$pb.TagNumber(9) @@ -457,70 +389,65 @@ class AttrValue extends $pb.GeneratedMessage { @$pb.TagNumber(9) $core.bool hasPlaceholder() => $_has(8); @$pb.TagNumber(9) - void clearPlaceholder() => clearField(9); + void clearPlaceholder() => $_clearField(9); + /// "func" represents a function. func.name is a function's name or + /// a primitive op's name. func.attr.first is the name of an attr + /// defined for that function. func.attr.second is the value for + /// that attr in the instantiation. @$pb.TagNumber(10) NameAttrList get func => $_getN(9); @$pb.TagNumber(10) set func(NameAttrList v) { - setField(10, v); + $_setField(10, v); } @$pb.TagNumber(10) $core.bool hasFunc() => $_has(9); @$pb.TagNumber(10) - void clearFunc() => clearField(10); + void clearFunc() => $_clearField(10); @$pb.TagNumber(10) NameAttrList ensureFunc() => $_ensure(9); } +/// A list of attr names and their values. The whole list is attached +/// with a string name. E.g., MatMul[T=float]. class NameAttrList extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'NameAttrList', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..aOS( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'name') - ..m<$core.String, AttrValue>( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'attr', - entryClassName: 'NameAttrList.AttrEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OM, - valueCreator: AttrValue.create, - packageName: const $pb.PackageName('tensorflow')) - ..hasRequiredFields = false; - - NameAttrList._() : super(); factory NameAttrList({ $core.String? name, - $core.Map<$core.String, AttrValue>? attr, + $pb.PbMap<$core.String, AttrValue>? attr, }) { - final _result = create(); + final $result = create(); if (name != null) { - _result.name = name; + $result.name = name; } if (attr != null) { - _result.attr.addAll(attr); + $result.attr.addAll(attr); } - return _result; + return $result; } + NameAttrList._() : super(); factory NameAttrList.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory NameAttrList.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'NameAttrList', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..m<$core.String, AttrValue>(2, _omitFieldNames ? '' : 'attr', + entryClassName: 'NameAttrList.AttrEntry', + keyFieldType: $pb.PbFieldType.OS, + valueFieldType: $pb.PbFieldType.OM, + valueCreator: AttrValue.create, + valueDefaultOrMaker: AttrValue.getDefault, + packageName: const $pb.PackageName('tensorflow')) + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -530,8 +457,10 @@ class NameAttrList extends $pb.GeneratedMessage { 'Will be removed in next major version') NameAttrList copyWith(void Function(NameAttrList) updates) => super.copyWith((message) => updates(message as NameAttrList)) - as NameAttrList; // ignore: deprecated_member_use + as NameAttrList; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static NameAttrList create() => NameAttrList._(); NameAttrList createEmptyInstance() => create(); @@ -552,8 +481,12 @@ class NameAttrList extends $pb.GeneratedMessage { @$pb.TagNumber(1) $core.bool hasName() => $_has(0); @$pb.TagNumber(1) - void clearName() => clearField(1); + void clearName() => $_clearField(1); @$pb.TagNumber(2) - $core.Map<$core.String, AttrValue> get attr => $_getMap(1); + $pb.PbMap<$core.String, AttrValue> get attr => $_getMap(1); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbenum.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbenum.dart index d07fc431a6..d7a90c4f5e 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbenum.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbenum.dart @@ -1,6 +1,10 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/framework/attr_value.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbjson.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbjson.dart index 512a50e080..d0ea8086f2 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbjson.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/attr_value.pbjson.dart @@ -1,23 +1,27 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/framework/attr_value.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import -import 'dart:core' as $core; import 'dart:convert' as $convert; +import 'dart:core' as $core; import 'dart:typed_data' as $typed_data; @$core.Deprecated('Use attrValueDescriptor instead') -const AttrValue$json = const { +const AttrValue$json = { '1': 'AttrValue', - '2': const [ - const {'1': 's', '3': 2, '4': 1, '5': 12, '9': 0, '10': 's'}, - const {'1': 'i', '3': 3, '4': 1, '5': 3, '9': 0, '10': 'i'}, - const {'1': 'f', '3': 4, '4': 1, '5': 2, '9': 0, '10': 'f'}, - const {'1': 'b', '3': 5, '4': 1, '5': 8, '9': 0, '10': 'b'}, - const { + '2': [ + {'1': 's', '3': 2, '4': 1, '5': 12, '9': 0, '10': 's'}, + {'1': 'i', '3': 3, '4': 1, '5': 3, '9': 0, '10': 'i'}, + {'1': 'f', '3': 4, '4': 1, '5': 2, '9': 0, '10': 'f'}, + {'1': 'b', '3': 5, '4': 1, '5': 8, '9': 0, '10': 'b'}, + { '1': 'type', '3': 6, '4': 1, @@ -26,7 +30,7 @@ const AttrValue$json = const { '9': 0, '10': 'type' }, - const { + { '1': 'shape', '3': 7, '4': 1, @@ -35,7 +39,7 @@ const AttrValue$json = const { '9': 0, '10': 'shape' }, - const { + { '1': 'tensor', '3': 8, '4': 1, @@ -44,7 +48,7 @@ const AttrValue$json = const { '9': 0, '10': 'tensor' }, - const { + { '1': 'list', '3': 1, '4': 1, @@ -53,7 +57,7 @@ const AttrValue$json = const { '9': 0, '10': 'list' }, - const { + { '1': 'func', '3': 10, '4': 1, @@ -62,60 +66,53 @@ const AttrValue$json = const { '9': 0, '10': 'func' }, - const { - '1': 'placeholder', - '3': 9, - '4': 1, - '5': 9, - '9': 0, - '10': 'placeholder' - }, + {'1': 'placeholder', '3': 9, '4': 1, '5': 9, '9': 0, '10': 'placeholder'}, ], - '3': const [AttrValue_ListValue$json], - '8': const [ - const {'1': 'value'}, + '3': [AttrValue_ListValue$json], + '8': [ + {'1': 'value'}, ], }; @$core.Deprecated('Use attrValueDescriptor instead') -const AttrValue_ListValue$json = const { +const AttrValue_ListValue$json = { '1': 'ListValue', - '2': const [ - const {'1': 's', '3': 2, '4': 3, '5': 12, '10': 's'}, - const { + '2': [ + {'1': 's', '3': 2, '4': 3, '5': 12, '10': 's'}, + { '1': 'i', '3': 3, '4': 3, '5': 3, - '8': const {'2': true}, + '8': {'2': true}, '10': 'i', }, - const { + { '1': 'f', '3': 4, '4': 3, '5': 2, - '8': const {'2': true}, + '8': {'2': true}, '10': 'f', }, - const { + { '1': 'b', '3': 5, '4': 3, '5': 8, - '8': const {'2': true}, + '8': {'2': true}, '10': 'b', }, - const { + { '1': 'type', '3': 6, '4': 3, '5': 14, '6': '.tensorflow.DataType', - '8': const {'2': true}, + '8': {'2': true}, '10': 'type', }, - const { + { '1': 'shape', '3': 7, '4': 3, @@ -123,7 +120,7 @@ const AttrValue_ListValue$json = const { '6': '.tensorflow.TensorShapeProto', '10': 'shape' }, - const { + { '1': 'tensor', '3': 8, '4': 3, @@ -131,7 +128,7 @@ const AttrValue_ListValue$json = const { '6': '.tensorflow.TensorProto', '10': 'tensor' }, - const { + { '1': 'func', '3': 9, '4': 3, @@ -144,13 +141,25 @@ const AttrValue_ListValue$json = const { /// Descriptor for `AttrValue`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List attrValueDescriptor = $convert.base64Decode( - 'CglBdHRyVmFsdWUSDgoBcxgCIAEoDEgAUgFzEg4KAWkYAyABKANIAFIBaRIOCgFmGAQgASgCSABSAWYSDgoBYhgFIAEoCEgAUgFiEioKBHR5cGUYBiABKA4yFC50ZW5zb3JmbG93LkRhdGFUeXBlSABSBHR5cGUSNAoFc2hhcGUYByABKAsyHC50ZW5zb3JmbG93LlRlbnNvclNoYXBlUHJvdG9IAFIFc2hhcGUSMQoGdGVuc29yGAggASgLMhcudGVuc29yZmxvdy5UZW5zb3JQcm90b0gAUgZ0ZW5zb3ISNQoEbGlzdBgBIAEoCzIfLnRlbnNvcmZsb3cuQXR0clZhbHVlLkxpc3RWYWx1ZUgAUgRsaXN0Ei4KBGZ1bmMYCiABKAsyGC50ZW5zb3JmbG93Lk5hbWVBdHRyTGlzdEgAUgRmdW5jEiIKC3BsYWNlaG9sZGVyGAkgASgJSABSC3BsYWNlaG9sZGVyGpACCglMaXN0VmFsdWUSDAoBcxgCIAMoDFIBcxIQCgFpGAMgAygDQgIQAVIBaRIQCgFmGAQgAygCQgIQAVIBZhIQCgFiGAUgAygIQgIQAVIBYhIsCgR0eXBlGAYgAygOMhQudGVuc29yZmxvdy5EYXRhVHlwZUICEAFSBHR5cGUSMgoFc2hhcGUYByADKAsyHC50ZW5zb3JmbG93LlRlbnNvclNoYXBlUHJvdG9SBXNoYXBlEi8KBnRlbnNvchgIIAMoCzIXLnRlbnNvcmZsb3cuVGVuc29yUHJvdG9SBnRlbnNvchIsCgRmdW5jGAkgAygLMhgudGVuc29yZmxvdy5OYW1lQXR0ckxpc3RSBGZ1bmNCBwoFdmFsdWU='); + 'CglBdHRyVmFsdWUSDgoBcxgCIAEoDEgAUgFzEg4KAWkYAyABKANIAFIBaRIOCgFmGAQgASgCSA' + 'BSAWYSDgoBYhgFIAEoCEgAUgFiEioKBHR5cGUYBiABKA4yFC50ZW5zb3JmbG93LkRhdGFUeXBl' + 'SABSBHR5cGUSNAoFc2hhcGUYByABKAsyHC50ZW5zb3JmbG93LlRlbnNvclNoYXBlUHJvdG9IAF' + 'IFc2hhcGUSMQoGdGVuc29yGAggASgLMhcudGVuc29yZmxvdy5UZW5zb3JQcm90b0gAUgZ0ZW5z' + 'b3ISNQoEbGlzdBgBIAEoCzIfLnRlbnNvcmZsb3cuQXR0clZhbHVlLkxpc3RWYWx1ZUgAUgRsaX' + 'N0Ei4KBGZ1bmMYCiABKAsyGC50ZW5zb3JmbG93Lk5hbWVBdHRyTGlzdEgAUgRmdW5jEiIKC3Bs' + 'YWNlaG9sZGVyGAkgASgJSABSC3BsYWNlaG9sZGVyGpACCglMaXN0VmFsdWUSDAoBcxgCIAMoDF' + 'IBcxIQCgFpGAMgAygDQgIQAVIBaRIQCgFmGAQgAygCQgIQAVIBZhIQCgFiGAUgAygIQgIQAVIB' + 'YhIsCgR0eXBlGAYgAygOMhQudGVuc29yZmxvdy5EYXRhVHlwZUICEAFSBHR5cGUSMgoFc2hhcG' + 'UYByADKAsyHC50ZW5zb3JmbG93LlRlbnNvclNoYXBlUHJvdG9SBXNoYXBlEi8KBnRlbnNvchgI' + 'IAMoCzIXLnRlbnNvcmZsb3cuVGVuc29yUHJvdG9SBnRlbnNvchIsCgRmdW5jGAkgAygLMhgudG' + 'Vuc29yZmxvdy5OYW1lQXR0ckxpc3RSBGZ1bmNCBwoFdmFsdWU='); + @$core.Deprecated('Use nameAttrListDescriptor instead') -const NameAttrList$json = const { +const NameAttrList$json = { '1': 'NameAttrList', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - const { + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + { '1': 'attr', '3': 2, '4': 3, @@ -159,15 +168,15 @@ const NameAttrList$json = const { '10': 'attr' }, ], - '3': const [NameAttrList_AttrEntry$json], + '3': [NameAttrList_AttrEntry$json], }; @$core.Deprecated('Use nameAttrListDescriptor instead') -const NameAttrList_AttrEntry$json = const { +const NameAttrList_AttrEntry$json = { '1': 'AttrEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - const { + '2': [ + {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, + { '1': 'value', '3': 2, '4': 1, @@ -176,9 +185,12 @@ const NameAttrList_AttrEntry$json = const { '10': 'value' }, ], - '7': const {'7': true}, + '7': {'7': true}, }; /// Descriptor for `NameAttrList`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List nameAttrListDescriptor = $convert.base64Decode( - 'CgxOYW1lQXR0ckxpc3QSEgoEbmFtZRgBIAEoCVIEbmFtZRI2CgRhdHRyGAIgAygLMiIudGVuc29yZmxvdy5OYW1lQXR0ckxpc3QuQXR0ckVudHJ5UgRhdHRyGk4KCUF0dHJFbnRyeRIQCgNrZXkYASABKAlSA2tleRIrCgV2YWx1ZRgCIAEoCzIVLnRlbnNvcmZsb3cuQXR0clZhbHVlUgV2YWx1ZToCOAE='); + 'CgxOYW1lQXR0ckxpc3QSEgoEbmFtZRgBIAEoCVIEbmFtZRI2CgRhdHRyGAIgAygLMiIudGVuc2' + '9yZmxvdy5OYW1lQXR0ckxpc3QuQXR0ckVudHJ5UgRhdHRyGk4KCUF0dHJFbnRyeRIQCgNrZXkY' + 'ASABKAlSA2tleRIrCgV2YWx1ZRgCIAEoCzIVLnRlbnNvcmZsb3cuQXR0clZhbHVlUgV2YWx1ZT' + 'oCOAE='); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pb.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pb.dart index b74e332a4d..0981d4fb83 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pb.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pb.dart @@ -1,9 +1,13 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/framework/full_type.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import import 'dart:core' as $core; @@ -12,82 +16,66 @@ import 'package:protobuf/protobuf.dart' as $pb; import 'full_type.pbenum.dart'; +export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; + export 'full_type.pbenum.dart'; enum FullTypeDef_Attr { s, i, notSet } +/// Highly experimental and very likely to change. +/// This encoding uses tags instead of dedicated messages for regularity. In +/// particular the encoding imposes no restrictions on what the parameters of any +/// type should be, which in particular needs to be true for type symbols. class FullTypeDef extends $pb.GeneratedMessage { - static const $core.Map<$core.int, FullTypeDef_Attr> _FullTypeDef_AttrByTag = { - 3: FullTypeDef_Attr.s, - 4: FullTypeDef_Attr.i, - 0: FullTypeDef_Attr.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'FullTypeDef', - package: const $pb.PackageName( - const $core.bool.fromEnvironment('protobuf.omit_message_names') - ? '' - : 'tensorflow'), - createEmptyInstance: create) - ..oo(0, [3, 4]) - ..e( - 1, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'typeId', - $pb.PbFieldType.OE, - defaultOrMaker: FullTypeId.TFT_UNSET, - valueOf: FullTypeId.valueOf, - enumValues: FullTypeId.values) - ..pc( - 2, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'args', - $pb.PbFieldType.PM, - subBuilder: FullTypeDef.create) - ..aOS( - 3, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 's') - ..aInt64( - 4, - const $core.bool.fromEnvironment('protobuf.omit_field_names') - ? '' - : 'i') - ..hasRequiredFields = false; - - FullTypeDef._() : super(); factory FullTypeDef({ FullTypeId? typeId, $core.Iterable? args, $core.String? s, $fixnum.Int64? i, }) { - final _result = create(); + final $result = create(); if (typeId != null) { - _result.typeId = typeId; + $result.typeId = typeId; } if (args != null) { - _result.args.addAll(args); + $result.args.addAll(args); } if (s != null) { - _result.s = s; + $result.s = s; } if (i != null) { - _result.i = i; + $result.i = i; } - return _result; + return $result; } + FullTypeDef._() : super(); factory FullTypeDef.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory FullTypeDef.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static const $core.Map<$core.int, FullTypeDef_Attr> _FullTypeDef_AttrByTag = { + 3: FullTypeDef_Attr.s, + 4: FullTypeDef_Attr.i, + 0: FullTypeDef_Attr.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'FullTypeDef', + package: const $pb.PackageName(_omitMessageNames ? '' : 'tensorflow'), + createEmptyInstance: create) + ..oo(0, [3, 4]) + ..e(1, _omitFieldNames ? '' : 'typeId', $pb.PbFieldType.OE, + defaultOrMaker: FullTypeId.TFT_UNSET, + valueOf: FullTypeId.valueOf, + enumValues: FullTypeId.values) + ..pc(2, _omitFieldNames ? '' : 'args', $pb.PbFieldType.PM, + subBuilder: FullTypeDef.create) + ..aOS(3, _omitFieldNames ? '' : 's') + ..aInt64(4, _omitFieldNames ? '' : 'i') + ..hasRequiredFields = false; + @$core.Deprecated('Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') @@ -97,8 +85,10 @@ class FullTypeDef extends $pb.GeneratedMessage { 'Will be removed in next major version') FullTypeDef copyWith(void Function(FullTypeDef) updates) => super.copyWith((message) => updates(message as FullTypeDef)) - as FullTypeDef; // ignore: deprecated_member_use + as FullTypeDef; + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') static FullTypeDef create() => FullTypeDef._(); FullTypeDef createEmptyInstance() => create(); @@ -109,22 +99,25 @@ class FullTypeDef extends $pb.GeneratedMessage { static FullTypeDef? _defaultInstance; FullTypeDef_Attr whichAttr() => _FullTypeDef_AttrByTag[$_whichOneof(0)]!; - void clearAttr() => clearField($_whichOneof(0)); + void clearAttr() => $_clearField($_whichOneof(0)); + /// The principal type represented by this object. This may be a concrete type + /// (Tensor, Dataset) a type variable (used for dependent types) a type + /// symbol (Any, Union). See FullTypeId for details. @$pb.TagNumber(1) FullTypeId get typeId => $_getN(0); @$pb.TagNumber(1) set typeId(FullTypeId v) { - setField(1, v); + $_setField(1, v); } @$pb.TagNumber(1) $core.bool hasTypeId() => $_has(0); @$pb.TagNumber(1) - void clearTypeId() => clearField(1); + void clearTypeId() => $_clearField(1); @$pb.TagNumber(2) - $core.List get args => $_getList(1); + $pb.PbList get args => $_getList(1); @$pb.TagNumber(3) $core.String get s => $_getSZ(2); @@ -136,7 +129,7 @@ class FullTypeDef extends $pb.GeneratedMessage { @$pb.TagNumber(3) $core.bool hasS() => $_has(2); @$pb.TagNumber(3) - void clearS() => clearField(3); + void clearS() => $_clearField(3); @$pb.TagNumber(4) $fixnum.Int64 get i => $_getI64(3); @@ -148,5 +141,9 @@ class FullTypeDef extends $pb.GeneratedMessage { @$pb.TagNumber(4) $core.bool hasI() => $_has(3); @$pb.TagNumber(4) - void clearI() => clearField(4); + void clearI() => $_clearField(4); } + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = + $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pbenum.dart b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pbenum.dart index 3f31c6fdf8..ebe651613d 100644 --- a/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pbenum.dart +++ b/tfserving-flutter/codelab2/finished/lib/proto/generated/tensorflow/core/framework/full_type.pbenum.dart @@ -1,170 +1,276 @@ -/// +// // Generated code. Do not modify. // source: tensorflow/core/framework/full_type.proto // -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields +// @dart = 3.3 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import -// ignore_for_file: UNDEFINED_SHOWN_NAME import 'dart:core' as $core; + import 'package:protobuf/protobuf.dart' as $pb; +/// Experimental. Represents the complete type information of a TensorFlow value. class FullTypeId extends $pb.ProtobufEnum { - static const FullTypeId TFT_UNSET = FullTypeId._( - 0, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_UNSET'); - static const FullTypeId TFT_VAR = FullTypeId._( - 1, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_VAR'); - static const FullTypeId TFT_ANY = FullTypeId._( - 2, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_ANY'); - static const FullTypeId TFT_PRODUCT = FullTypeId._( - 3, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_PRODUCT'); - static const FullTypeId TFT_NAMED = FullTypeId._( - 4, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_NAMED'); - static const FullTypeId TFT_FOR_EACH = FullTypeId._( - 20, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_FOR_EACH'); - static const FullTypeId TFT_CALLABLE = FullTypeId._( - 100, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_CALLABLE'); - static const FullTypeId TFT_TENSOR = FullTypeId._( - 1000, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_TENSOR'); - static const FullTypeId TFT_ARRAY = FullTypeId._( - 1001, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_ARRAY'); - static const FullTypeId TFT_OPTIONAL = FullTypeId._( - 1002, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_OPTIONAL'); - static const FullTypeId TFT_LITERAL = FullTypeId._( - 1003, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_LITERAL'); - static const FullTypeId TFT_BOOL = FullTypeId._( - 200, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_BOOL'); - static const FullTypeId TFT_UINT8 = FullTypeId._( - 201, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_UINT8'); - static const FullTypeId TFT_UINT16 = FullTypeId._( - 202, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_UINT16'); - static const FullTypeId TFT_UINT32 = FullTypeId._( - 203, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_UINT32'); - static const FullTypeId TFT_UINT64 = FullTypeId._( - 204, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_UINT64'); - static const FullTypeId TFT_INT8 = FullTypeId._( - 205, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_INT8'); - static const FullTypeId TFT_INT16 = FullTypeId._( - 206, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_INT16'); - static const FullTypeId TFT_INT32 = FullTypeId._( - 207, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_INT32'); - static const FullTypeId TFT_INT64 = FullTypeId._( - 208, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_INT64'); - static const FullTypeId TFT_HALF = FullTypeId._( - 209, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_HALF'); - static const FullTypeId TFT_FLOAT = FullTypeId._( - 210, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_FLOAT'); - static const FullTypeId TFT_DOUBLE = FullTypeId._( - 211, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_DOUBLE'); - static const FullTypeId TFT_BFLOAT16 = FullTypeId._( - 215, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_BFLOAT16'); - static const FullTypeId TFT_COMPLEX64 = FullTypeId._( - 212, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_COMPLEX64'); - static const FullTypeId TFT_COMPLEX128 = FullTypeId._( - 213, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_COMPLEX128'); - static const FullTypeId TFT_STRING = FullTypeId._( - 214, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_STRING'); - static const FullTypeId TFT_DATASET = FullTypeId._( - 10102, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_DATASET'); - static const FullTypeId TFT_RAGGED = FullTypeId._( - 10103, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_RAGGED'); - static const FullTypeId TFT_MUTEX_LOCK = FullTypeId._( - 10202, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_MUTEX_LOCK'); - static const FullTypeId TFT_LEGACY_VARIANT = FullTypeId._( - 10203, - const $core.bool.fromEnvironment('protobuf.omit_enum_names') - ? '' - : 'TFT_LEGACY_VARIANT'); + /// The default represents an uninitialized values. + static const FullTypeId TFT_UNSET = + FullTypeId._(0, _omitEnumNames ? '' : 'TFT_UNSET'); + + /// Type variables may serve as placeholder for any other type ID in type + /// templates. + /// + /// Examples: + /// TFT_DATASET[TFT_VAR["T"]] is a Dataset returning a type indicated by "T". + /// TFT_TENSOR[TFT_VAR["T"]] is a Tensor of n element type indicated by "T". + /// TFT_TENSOR[TFT_VAR["T"]], TFT_TENSOR[TFT_VAR["T"]] are two tensors of + /// identical element types. + /// TFT_TENSOR[TFT_VAR["P"]], TFT_TENSOR[TFT_VAR["Q"]] are two tensors of + /// independent element types. + static const FullTypeId TFT_VAR = + FullTypeId._(1, _omitEnumNames ? '' : 'TFT_VAR'); + + /// Wildcard type. Describes a parameter of unknown type. In TensorFlow, that + /// can mean either a "Top" type (accepts any type), or a dynamically typed + /// object whose type is unknown in context. + /// Important: "unknown" does not necessarily mean undeterminable! + static const FullTypeId TFT_ANY = + FullTypeId._(2, _omitEnumNames ? '' : 'TFT_ANY'); + + /// The algebraic product type. This is an algebraic type that may be used just + /// for logical grouping. Not to confused with TFT_TUPLE which describes a + /// concrete object of several elements. + /// + /// Example: + /// TFT_DATASET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]]] + /// is a Dataset producing two tensors, an integer one and a float one. + static const FullTypeId TFT_PRODUCT = + FullTypeId._(3, _omitEnumNames ? '' : 'TFT_PRODUCT'); + + /// Represents a named field, with the name stored in the attribute. + /// + /// Parametrization: + /// TFT_NAMED[]{} + /// * is the type of the field + /// * is the field name, as string (thpugh can theoretically be an int + /// as well) + /// + /// Example: + /// TFT_RECORD[ + /// TFT_NAMED[TFT_TENSOR[TFT_INT32]]{'foo'}, + /// TFT_NAMED[TFT_TENSOR[TFT_FLOAT32]]{'bar'}, + /// ] + /// is a structure with two fields, an int tensor "foo" and a float tensor + /// "bar". + static const FullTypeId TFT_NAMED = + FullTypeId._(4, _omitEnumNames ? '' : 'TFT_NAMED'); + + /// Template definition. Expands the variables by repeating a template as + /// arguments of container. + /// + /// Parametrization: + /// TFT_FOR_EACH[,