From 366489cfd585f21aab3697b050870b95ceec645d Mon Sep 17 00:00:00 2001 From: Peefy Date: Mon, 8 Dec 2025 23:16:20 +0800 Subject: [PATCH 1/2] chore: bump kcl lib to 0.12.2 Signed-off-by: Peefy --- .github/workflows/dotnet-test.yaml | 2 +- Cargo.toml | 14 +- README.md | 6 +- c/Cargo.toml | 4 +- cpp/CMakeLists.txt | 2 +- cpp/Cargo.toml | 4 +- cpp/README.md | 4 +- dotnet/Cargo.toml | 4 +- dotnet/KclLib/KclLib.csproj | 2 +- dotnet/KclLib/api/Spec.cs | 1234 +++++- .../examples/exec-program/exec-program.csproj | 2 +- go/api/spec.pb.go | 440 +- go/install/install.go | 2 +- java/Cargo.toml | 8 +- java/README.md | 2 +- java/pom.xml | 2 +- java/src/main/java/com/kcl/api/Spec.java | 3698 ++++++++++++++++- kotlin/Cargo.toml | 8 +- kotlin/README.md | 2 +- kotlin/pom.xml | 2 +- kotlin/src/main/java/com/kcl/api/Spec.java | 3698 ++++++++++++++++- .../main/kotlin/com/kcl/api/FunctionTypeKt.kt | 137 + .../kotlin/com/kcl/api/IndexSignatureKt.kt | 177 + .../src/main/kotlin/com/kcl/api/KclTypeKt.kt | 88 +- .../main/kotlin/com/kcl/api/ParameterKt.kt | 83 + lua/Cargo.toml | 4 +- ...1-1.rockspec => kcl_lib-0.12.2-1.rockspec} | 2 +- nodejs/Cargo.toml | 4 +- nodejs/examples/exec-program/package.json | 2 +- nodejs/npm/darwin-arm64/package-lock.json | 4 +- nodejs/npm/darwin-arm64/package.json | 2 +- nodejs/npm/darwin-x64/package.json | 2 +- nodejs/npm/linux-arm64-gnu/package.json | 2 +- nodejs/npm/linux-x64-gnu/package.json | 2 +- nodejs/npm/win32-arm64-msvc/package.json | 2 +- nodejs/npm/win32-x64-msvc/package.json | 2 +- nodejs/package.json | 2 +- python/Cargo.toml | 4 +- python/kcl_lib/api/spec_pb2.py | 38 +- python/kcl_lib/api/spec_pb2.pyi | 46 + python/pyproject.toml | 2 +- python/tests/api_test.py | 7 +- python/tests/test_data/schema.k | 9 + spec/spec.proto | 27 +- swift/Cargo.toml | 4 +- wasm/package.json | 2 +- zig/build.zig.zon | 2 +- 47 files changed, 9189 insertions(+), 607 deletions(-) create mode 100644 kotlin/src/main/kotlin/com/kcl/api/FunctionTypeKt.kt create mode 100644 kotlin/src/main/kotlin/com/kcl/api/IndexSignatureKt.kt create mode 100644 kotlin/src/main/kotlin/com/kcl/api/ParameterKt.kt rename lua/{kcl_lib-0.12.1-1.rockspec => kcl_lib-0.12.2-1.rockspec} (95%) diff --git a/.github/workflows/dotnet-test.yaml b/.github/workflows/dotnet-test.yaml index 814c02fe..8e5fcf2c 100644 --- a/.github/workflows/dotnet-test.yaml +++ b/.github/workflows/dotnet-test.yaml @@ -176,4 +176,4 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" run: | cd dotnet/KclLib/bin/Release - dotnet nuget push KclLib.0.12.1.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json + dotnet nuget push KclLib.0.12.2.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json diff --git a/Cargo.toml b/Cargo.toml index 78323f76..f93dccb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lang" -version = "0.12.1" +version = "0.12.2" edition = "2024" readme = "README.md" documentation = "kcl-lang.io" @@ -11,9 +11,9 @@ license = "Apache-2.0" [dependencies] anyhow = "1" -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-evaluator = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-loader = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-runtime = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-primitives = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-evaluator = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-loader = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-runtime = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-primitives = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } diff --git a/README.md b/README.md index ae12f414..02816d11 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib - 0.12.1 + 0.12.2 ``` @@ -197,7 +197,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib - 0.12.1 + 0.12.2 ``` @@ -231,7 +231,7 @@ For CMake, you can use FetchContent to add KCL C++ Lib to your project. FetchContent_Declare( kcl-lib GIT_REPOSITORY https://github.com/kcl-lang/lib.git - GIT_TAG v0.12.1 + GIT_TAG v0.12.2 SOURCE_SUBDIR cpp ) FetchContent_MakeAvailable(kcl-lib) diff --git a/c/Cargo.toml b/c/Cargo.toml index c03e5bc6..a5a26354 100644 --- a/c/Cargo.toml +++ b/c/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lib-c" -version = "0.12.1" +version = "0.12.2" edition = "2024" publish = false @@ -12,4 +12,4 @@ doc = false cbindgen = "0.26.0" [dependencies] -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 615c80f5..4abbc365 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(kcl-lib VERSION 0.12.1 LANGUAGES CXX) +project(kcl-lib VERSION 0.12.2 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/cpp/Cargo.toml b/cpp/Cargo.toml index 6ac2bce6..daf955b7 100644 --- a/cpp/Cargo.toml +++ b/cpp/Cargo.toml @@ -2,7 +2,7 @@ name = "kcl-lib-cpp" publish = false edition = "2024" -version = "0.12.1" +version = "0.12.2" [lib] crate-type = ["staticlib"] @@ -10,7 +10,7 @@ crate-type = ["staticlib"] [dependencies] anyhow = "1.0" cxx = "1.0" -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } [build-dependencies] cxx-build = "1.0" diff --git a/cpp/README.md b/cpp/README.md index b73c2b96..811d89be 100644 --- a/cpp/README.md +++ b/cpp/README.md @@ -12,7 +12,7 @@ You can use FetchContent to add KCL C++ Lib to your project. FetchContent_Declare( kcl-lib GIT_REPOSITORY https://github.com/kcl-lang/lib.git - GIT_TAG v0.12.1 + GIT_TAG v0.12.2 SOURCE_SUBDIR cpp ) FetchContent_MakeAvailable(kcl-lib) @@ -24,7 +24,7 @@ Or you can download the source code and add it to your project. mkdir third_party cd third_party git clone https://github.com/kcl-lang/lib.git -git checkout v0.12.1 +git checkout v0.12.2 ``` ```shell diff --git a/dotnet/Cargo.toml b/dotnet/Cargo.toml index ac29ab27..eaea1320 100644 --- a/dotnet/Cargo.toml +++ b/dotnet/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kcl-lib-dotnet" publish = false -version = "0.12.1" +version = "0.12.2" edition = "2024" [lib] @@ -9,4 +9,4 @@ crate-type = ["cdylib"] doc = false [dependencies] -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } diff --git a/dotnet/KclLib/KclLib.csproj b/dotnet/KclLib/KclLib.csproj index b15ee08a..5c4d9140 100644 --- a/dotnet/KclLib/KclLib.csproj +++ b/dotnet/KclLib/KclLib.csproj @@ -11,7 +11,7 @@ KclLib KclLib - 0.12.1 + 0.12.2 true snupkg https://github.com/kcl-lang diff --git a/dotnet/KclLib/api/Spec.cs b/dotnet/KclLib/api/Spec.cs index 7b582eaf..b01f0916 100644 --- a/dotnet/KclLib/api/Spec.cs +++ b/dotnet/KclLib/api/Spec.cs @@ -177,7 +177,7 @@ static SpecReflection() { "IAEoCSI/ChZVcGRhdGVEZXBlbmRlbmNpZXNBcmdzEhUKDW1hbmlmZXN0X3Bh", "dGgYASABKAkSDgoGdmVuZG9yGAIgASgIIksKGFVwZGF0ZURlcGVuZGVuY2ll", "c1Jlc3VsdBIvCg1leHRlcm5hbF9wa2dzGAMgAygLMhguY29tLmtjbC5hcGku", - "RXh0ZXJuYWxQa2ci8wQKB0tjbFR5cGUSDAoEdHlwZRgBIAEoCRIpCgt1bmlv", + "RXh0ZXJuYWxQa2cigQYKB0tjbFR5cGUSDAoEdHlwZRgBIAEoCRIpCgt1bmlv", "bl90eXBlcxgCIAMoCzIULmNvbS5rY2wuYXBpLktjbFR5cGUSDwoHZGVmYXVs", "dBgDIAEoCRITCgtzY2hlbWFfbmFtZRgEIAEoCRISCgpzY2hlbWFfZG9jGAUg", "ASgJEjgKCnByb3BlcnRpZXMYBiADKAsyJC5jb20ua2NsLmFwaS5LY2xUeXBl", @@ -188,57 +188,66 @@ static SpecReflection() { "CRIQCghwa2dfcGF0aBgNIAEoCRITCgtkZXNjcmlwdGlvbhgOIAEoCRI0Cghl", "eGFtcGxlcxgPIAMoCzIiLmNvbS5rY2wuYXBpLktjbFR5cGUuRXhhbXBsZXNF", "bnRyeRIpCgtiYXNlX3NjaGVtYRgQIAEoCzIULmNvbS5rY2wuYXBpLktjbFR5", - "cGUaRwoPUHJvcGVydGllc0VudHJ5EgsKA2tleRgBIAEoCRIjCgV2YWx1ZRgC", - "IAEoCzIULmNvbS5rY2wuYXBpLktjbFR5cGU6AjgBGkUKDUV4YW1wbGVzRW50", - "cnkSCwoDa2V5GAEgASgJEiMKBXZhbHVlGAIgASgLMhQuY29tLmtjbC5hcGku", - "RXhhbXBsZToCOAEilQEKCURlY29yYXRvchIMCgRuYW1lGAEgASgJEhEKCWFy", - "Z3VtZW50cxgCIAMoCRI2CghrZXl3b3JkcxgDIAMoCzIkLmNvbS5rY2wuYXBp", - "LkRlY29yYXRvci5LZXl3b3Jkc0VudHJ5Gi8KDUtleXdvcmRzRW50cnkSCwoD", - "a2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASI+CgdFeGFtcGxlEg8KB3N1", - "bW1hcnkYASABKAkSEwoLZGVzY3JpcHRpb24YAiABKAkSDQoFdmFsdWUYAyAB", - "KAkykgEKDkJ1aWx0aW5TZXJ2aWNlEjYKBFBpbmcSFS5jb20ua2NsLmFwaS5Q", - "aW5nQXJncxoXLmNvbS5rY2wuYXBpLlBpbmdSZXN1bHQSSAoKTGlzdE1ldGhv", - "ZBIbLmNvbS5rY2wuYXBpLkxpc3RNZXRob2RBcmdzGh0uY29tLmtjbC5hcGku", - "TGlzdE1ldGhvZFJlc3VsdDKwDQoKS2NsU2VydmljZRI2CgRQaW5nEhUuY29t", - "LmtjbC5hcGkuUGluZ0FyZ3MaFy5jb20ua2NsLmFwaS5QaW5nUmVzdWx0EkgK", - "CkdldFZlcnNpb24SGy5jb20ua2NsLmFwaS5HZXRWZXJzaW9uQXJncxodLmNv", - "bS5rY2wuYXBpLkdldFZlcnNpb25SZXN1bHQSTgoMUGFyc2VQcm9ncmFtEh0u", - "Y29tLmtjbC5hcGkuUGFyc2VQcm9ncmFtQXJncxofLmNvbS5rY2wuYXBpLlBh", - "cnNlUHJvZ3JhbVJlc3VsdBJFCglQYXJzZUZpbGUSGi5jb20ua2NsLmFwaS5Q", - "YXJzZUZpbGVBcmdzGhwuY29tLmtjbC5hcGkuUGFyc2VGaWxlUmVzdWx0EksK", - "C0xvYWRQYWNrYWdlEhwuY29tLmtjbC5hcGkuTG9hZFBhY2thZ2VBcmdzGh4u", - "Y29tLmtjbC5hcGkuTG9hZFBhY2thZ2VSZXN1bHQSTAoLTGlzdE9wdGlvbnMS", - "HS5jb20ua2NsLmFwaS5QYXJzZVByb2dyYW1BcmdzGh4uY29tLmtjbC5hcGku", - "TGlzdE9wdGlvbnNSZXN1bHQSUQoNTGlzdFZhcmlhYmxlcxIeLmNvbS5rY2wu", - "YXBpLkxpc3RWYXJpYWJsZXNBcmdzGiAuY29tLmtjbC5hcGkuTGlzdFZhcmlh", - "Ymxlc1Jlc3VsdBJLCgtFeGVjUHJvZ3JhbRIcLmNvbS5rY2wuYXBpLkV4ZWNQ", - "cm9ncmFtQXJncxoeLmNvbS5rY2wuYXBpLkV4ZWNQcm9ncmFtUmVzdWx0Ek4K", - "DEJ1aWxkUHJvZ3JhbRIdLmNvbS5rY2wuYXBpLkJ1aWxkUHJvZ3JhbUFyZ3Ma", - "Hy5jb20ua2NsLmFwaS5CdWlsZFByb2dyYW1SZXN1bHQSTQoMRXhlY0FydGlm", - "YWN0Eh0uY29tLmtjbC5hcGkuRXhlY0FydGlmYWN0QXJncxoeLmNvbS5rY2wu", - "YXBpLkV4ZWNQcm9ncmFtUmVzdWx0Ek4KDE92ZXJyaWRlRmlsZRIdLmNvbS5r", - "Y2wuYXBpLk92ZXJyaWRlRmlsZUFyZ3MaHy5jb20ua2NsLmFwaS5PdmVycmlk", - "ZUZpbGVSZXN1bHQSZgoUR2V0U2NoZW1hVHlwZU1hcHBpbmcSJS5jb20ua2Ns", - "LmFwaS5HZXRTY2hlbWFUeXBlTWFwcGluZ0FyZ3MaJy5jb20ua2NsLmFwaS5H", - "ZXRTY2hlbWFUeXBlTWFwcGluZ1Jlc3VsdBJICgpGb3JtYXRDb2RlEhsuY29t", - "LmtjbC5hcGkuRm9ybWF0Q29kZUFyZ3MaHS5jb20ua2NsLmFwaS5Gb3JtYXRD", - "b2RlUmVzdWx0EkgKCkZvcm1hdFBhdGgSGy5jb20ua2NsLmFwaS5Gb3JtYXRQ", - "YXRoQXJncxodLmNvbS5rY2wuYXBpLkZvcm1hdFBhdGhSZXN1bHQSQgoITGlu", - "dFBhdGgSGS5jb20ua2NsLmFwaS5MaW50UGF0aEFyZ3MaGy5jb20ua2NsLmFw", - "aS5MaW50UGF0aFJlc3VsdBJOCgxWYWxpZGF0ZUNvZGUSHS5jb20ua2NsLmFw", - "aS5WYWxpZGF0ZUNvZGVBcmdzGh8uY29tLmtjbC5hcGkuVmFsaWRhdGVDb2Rl", - "UmVzdWx0Ek4KDExpc3REZXBGaWxlcxIdLmNvbS5rY2wuYXBpLkxpc3REZXBG", - "aWxlc0FyZ3MaHy5jb20ua2NsLmFwaS5MaXN0RGVwRmlsZXNSZXN1bHQSXQoR", - "TG9hZFNldHRpbmdzRmlsZXMSIi5jb20ua2NsLmFwaS5Mb2FkU2V0dGluZ3NG", - "aWxlc0FyZ3MaJC5jb20ua2NsLmFwaS5Mb2FkU2V0dGluZ3NGaWxlc1Jlc3Vs", - "dBI8CgZSZW5hbWUSFy5jb20ua2NsLmFwaS5SZW5hbWVBcmdzGhkuY29tLmtj", - "bC5hcGkuUmVuYW1lUmVzdWx0EkgKClJlbmFtZUNvZGUSGy5jb20ua2NsLmFw", - "aS5SZW5hbWVDb2RlQXJncxodLmNvbS5rY2wuYXBpLlJlbmFtZUNvZGVSZXN1", - "bHQSNgoEVGVzdBIVLmNvbS5rY2wuYXBpLlRlc3RBcmdzGhcuY29tLmtjbC5h", - "cGkuVGVzdFJlc3VsdBJgChJVcGRhdGVEZXBlbmRlbmNpZXMSIy5jb20ua2Ns", - "LmFwaS5VcGRhdGVEZXBlbmRlbmNpZXNBcmdzGiUuY29tLmtjbC5hcGkuVXBk", - "YXRlRGVwZW5kZW5jaWVzUmVzdWx0QhRaBS47YXBpqgIKS2NsTGliLkFQSWIG", - "cHJvdG8z")); + "cGUSMAoIZnVuY3Rpb24YESABKAsyGS5jb20ua2NsLmFwaS5GdW5jdGlvblR5", + "cGVIAIgBARI5Cg9pbmRleF9zaWduYXR1cmUYEiABKAsyGy5jb20ua2NsLmFw", + "aS5JbmRleFNpZ25hdHVyZUgBiAEBGkcKD1Byb3BlcnRpZXNFbnRyeRILCgNr", + "ZXkYASABKAkSIwoFdmFsdWUYAiABKAsyFC5jb20ua2NsLmFwaS5LY2xUeXBl", + "OgI4ARpFCg1FeGFtcGxlc0VudHJ5EgsKA2tleRgBIAEoCRIjCgV2YWx1ZRgC", + "IAEoCzIULmNvbS5rY2wuYXBpLkV4YW1wbGU6AjgBQgsKCV9mdW5jdGlvbkIS", + "ChBfaW5kZXhfc2lnbmF0dXJlIl8KDEZ1bmN0aW9uVHlwZRImCgZwYXJhbXMY", + "ASADKAsyFi5jb20ua2NsLmFwaS5QYXJhbWV0ZXISJwoJcmV0dXJuX3R5GAIg", + "ASgLMhQuY29tLmtjbC5hcGkuS2NsVHlwZSI7CglQYXJhbWV0ZXISDAoEbmFt", + "ZRgBIAEoCRIgCgJ0eRgCIAEoCzIULmNvbS5rY2wuYXBpLktjbFR5cGUijQEK", + "DkluZGV4U2lnbmF0dXJlEhUKCGtleV9uYW1lGAEgASgJSACIAQESIQoDa2V5", + "GAIgASgLMhQuY29tLmtjbC5hcGkuS2NsVHlwZRIhCgN2YWwYAyABKAsyFC5j", + "b20ua2NsLmFwaS5LY2xUeXBlEhEKCWFueV9vdGhlchgEIAEoCEILCglfa2V5", + "X25hbWUilQEKCURlY29yYXRvchIMCgRuYW1lGAEgASgJEhEKCWFyZ3VtZW50", + "cxgCIAMoCRI2CghrZXl3b3JkcxgDIAMoCzIkLmNvbS5rY2wuYXBpLkRlY29y", + "YXRvci5LZXl3b3Jkc0VudHJ5Gi8KDUtleXdvcmRzRW50cnkSCwoDa2V5GAEg", + "ASgJEg0KBXZhbHVlGAIgASgJOgI4ASI+CgdFeGFtcGxlEg8KB3N1bW1hcnkY", + "ASABKAkSEwoLZGVzY3JpcHRpb24YAiABKAkSDQoFdmFsdWUYAyABKAkykgEK", + "DkJ1aWx0aW5TZXJ2aWNlEjYKBFBpbmcSFS5jb20ua2NsLmFwaS5QaW5nQXJn", + "cxoXLmNvbS5rY2wuYXBpLlBpbmdSZXN1bHQSSAoKTGlzdE1ldGhvZBIbLmNv", + "bS5rY2wuYXBpLkxpc3RNZXRob2RBcmdzGh0uY29tLmtjbC5hcGkuTGlzdE1l", + "dGhvZFJlc3VsdDKwDQoKS2NsU2VydmljZRI2CgRQaW5nEhUuY29tLmtjbC5h", + "cGkuUGluZ0FyZ3MaFy5jb20ua2NsLmFwaS5QaW5nUmVzdWx0EkgKCkdldFZl", + "cnNpb24SGy5jb20ua2NsLmFwaS5HZXRWZXJzaW9uQXJncxodLmNvbS5rY2wu", + "YXBpLkdldFZlcnNpb25SZXN1bHQSTgoMUGFyc2VQcm9ncmFtEh0uY29tLmtj", + "bC5hcGkuUGFyc2VQcm9ncmFtQXJncxofLmNvbS5rY2wuYXBpLlBhcnNlUHJv", + "Z3JhbVJlc3VsdBJFCglQYXJzZUZpbGUSGi5jb20ua2NsLmFwaS5QYXJzZUZp", + "bGVBcmdzGhwuY29tLmtjbC5hcGkuUGFyc2VGaWxlUmVzdWx0EksKC0xvYWRQ", + "YWNrYWdlEhwuY29tLmtjbC5hcGkuTG9hZFBhY2thZ2VBcmdzGh4uY29tLmtj", + "bC5hcGkuTG9hZFBhY2thZ2VSZXN1bHQSTAoLTGlzdE9wdGlvbnMSHS5jb20u", + "a2NsLmFwaS5QYXJzZVByb2dyYW1BcmdzGh4uY29tLmtjbC5hcGkuTGlzdE9w", + "dGlvbnNSZXN1bHQSUQoNTGlzdFZhcmlhYmxlcxIeLmNvbS5rY2wuYXBpLkxp", + "c3RWYXJpYWJsZXNBcmdzGiAuY29tLmtjbC5hcGkuTGlzdFZhcmlhYmxlc1Jl", + "c3VsdBJLCgtFeGVjUHJvZ3JhbRIcLmNvbS5rY2wuYXBpLkV4ZWNQcm9ncmFt", + "QXJncxoeLmNvbS5rY2wuYXBpLkV4ZWNQcm9ncmFtUmVzdWx0Ek4KDEJ1aWxk", + "UHJvZ3JhbRIdLmNvbS5rY2wuYXBpLkJ1aWxkUHJvZ3JhbUFyZ3MaHy5jb20u", + "a2NsLmFwaS5CdWlsZFByb2dyYW1SZXN1bHQSTQoMRXhlY0FydGlmYWN0Eh0u", + "Y29tLmtjbC5hcGkuRXhlY0FydGlmYWN0QXJncxoeLmNvbS5rY2wuYXBpLkV4", + "ZWNQcm9ncmFtUmVzdWx0Ek4KDE92ZXJyaWRlRmlsZRIdLmNvbS5rY2wuYXBp", + "Lk92ZXJyaWRlRmlsZUFyZ3MaHy5jb20ua2NsLmFwaS5PdmVycmlkZUZpbGVS", + "ZXN1bHQSZgoUR2V0U2NoZW1hVHlwZU1hcHBpbmcSJS5jb20ua2NsLmFwaS5H", + "ZXRTY2hlbWFUeXBlTWFwcGluZ0FyZ3MaJy5jb20ua2NsLmFwaS5HZXRTY2hl", + "bWFUeXBlTWFwcGluZ1Jlc3VsdBJICgpGb3JtYXRDb2RlEhsuY29tLmtjbC5h", + "cGkuRm9ybWF0Q29kZUFyZ3MaHS5jb20ua2NsLmFwaS5Gb3JtYXRDb2RlUmVz", + "dWx0EkgKCkZvcm1hdFBhdGgSGy5jb20ua2NsLmFwaS5Gb3JtYXRQYXRoQXJn", + "cxodLmNvbS5rY2wuYXBpLkZvcm1hdFBhdGhSZXN1bHQSQgoITGludFBhdGgS", + "GS5jb20ua2NsLmFwaS5MaW50UGF0aEFyZ3MaGy5jb20ua2NsLmFwaS5MaW50", + "UGF0aFJlc3VsdBJOCgxWYWxpZGF0ZUNvZGUSHS5jb20ua2NsLmFwaS5WYWxp", + "ZGF0ZUNvZGVBcmdzGh8uY29tLmtjbC5hcGkuVmFsaWRhdGVDb2RlUmVzdWx0", + "Ek4KDExpc3REZXBGaWxlcxIdLmNvbS5rY2wuYXBpLkxpc3REZXBGaWxlc0Fy", + "Z3MaHy5jb20ua2NsLmFwaS5MaXN0RGVwRmlsZXNSZXN1bHQSXQoRTG9hZFNl", + "dHRpbmdzRmlsZXMSIi5jb20ua2NsLmFwaS5Mb2FkU2V0dGluZ3NGaWxlc0Fy", + "Z3MaJC5jb20ua2NsLmFwaS5Mb2FkU2V0dGluZ3NGaWxlc1Jlc3VsdBI8CgZS", + "ZW5hbWUSFy5jb20ua2NsLmFwaS5SZW5hbWVBcmdzGhkuY29tLmtjbC5hcGku", + "UmVuYW1lUmVzdWx0EkgKClJlbmFtZUNvZGUSGy5jb20ua2NsLmFwaS5SZW5h", + "bWVDb2RlQXJncxodLmNvbS5rY2wuYXBpLlJlbmFtZUNvZGVSZXN1bHQSNgoE", + "VGVzdBIVLmNvbS5rY2wuYXBpLlRlc3RBcmdzGhcuY29tLmtjbC5hcGkuVGVz", + "dFJlc3VsdBJgChJVcGRhdGVEZXBlbmRlbmNpZXMSIy5jb20ua2NsLmFwaS5V", + "cGRhdGVEZXBlbmRlbmNpZXNBcmdzGiUuY29tLmtjbC5hcGkuVXBkYXRlRGVw", + "ZW5kZW5jaWVzUmVzdWx0QhRaBS47YXBpqgIKS2NsTGliLkFQSWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { @@ -305,7 +314,10 @@ static SpecReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.TestCaseInfo), global::KclLib.API.TestCaseInfo.Parser, new[]{ "Name", "Error", "Duration", "LogMessage" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.UpdateDependenciesArgs), global::KclLib.API.UpdateDependenciesArgs.Parser, new[]{ "ManifestPath", "Vendor" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.UpdateDependenciesResult), global::KclLib.API.UpdateDependenciesResult.Parser, new[]{ "ExternalPkgs" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.KclType), global::KclLib.API.KclType.Parser, new[]{ "Type", "UnionTypes", "Default", "SchemaName", "SchemaDoc", "Properties", "Required", "Key", "Item", "Line", "Decorators", "Filename", "PkgPath", "Description", "Examples", "BaseSchema" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.KclType), global::KclLib.API.KclType.Parser, new[]{ "Type", "UnionTypes", "Default", "SchemaName", "SchemaDoc", "Properties", "Required", "Key", "Item", "Line", "Decorators", "Filename", "PkgPath", "Description", "Examples", "BaseSchema", "Function", "IndexSignature" }, new[]{ "Function", "IndexSignature" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.FunctionType), global::KclLib.API.FunctionType.Parser, new[]{ "Params", "ReturnTy" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.Parameter), global::KclLib.API.Parameter.Parser, new[]{ "Name", "Ty" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.IndexSignature), global::KclLib.API.IndexSignature.Parser, new[]{ "KeyName", "Key", "Val", "AnyOther" }, new[]{ "KeyName" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.Decorator), global::KclLib.API.Decorator.Parser, new[]{ "Name", "Arguments", "Keywords" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), new pbr::GeneratedClrTypeInfo(typeof(global::KclLib.API.Example), global::KclLib.API.Example.Parser, new[]{ "Summary", "Description", "Value" }, null, null, null, null) })); @@ -17485,6 +17497,8 @@ public KclType(KclType other) : this() { description_ = other.description_; examples_ = other.examples_.Clone(); baseSchema_ = other.baseSchema_ != null ? other.baseSchema_.Clone() : null; + function_ = other.function_ != null ? other.function_.Clone() : null; + indexSignature_ = other.indexSignature_ != null ? other.indexSignature_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -17498,7 +17512,7 @@ public KclType Clone() { public const int TypeFieldNumber = 1; private string type_ = ""; /// - /// Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). + /// Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier). /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -17729,6 +17743,36 @@ public string Description { } } + /// Field number for the "function" field. + public const int FunctionFieldNumber = 17; + private global::KclLib.API.FunctionType function_; + /// + /// Function type if the KclType is a function. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::KclLib.API.FunctionType Function { + get { return function_; } + set { + function_ = value; + } + } + + /// Field number for the "index_signature" field. + public const int IndexSignatureFieldNumber = 18; + private global::KclLib.API.IndexSignature indexSignature_; + /// + /// Optional schema index signature + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::KclLib.API.IndexSignature IndexSignature { + get { return indexSignature_; } + set { + indexSignature_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -17760,6 +17804,8 @@ public bool Equals(KclType other) { if (Description != other.Description) return false; if (!Examples.Equals(other.Examples)) return false; if (!object.Equals(BaseSchema, other.BaseSchema)) return false; + if (!object.Equals(Function, other.Function)) return false; + if (!object.Equals(IndexSignature, other.IndexSignature)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -17783,6 +17829,8 @@ public override int GetHashCode() { if (Description.Length != 0) hash ^= Description.GetHashCode(); hash ^= Examples.GetHashCode(); if (baseSchema_ != null) hash ^= BaseSchema.GetHashCode(); + if (function_ != null) hash ^= Function.GetHashCode(); + if (indexSignature_ != null) hash ^= IndexSignature.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -17850,6 +17898,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(130, 1); output.WriteMessage(BaseSchema); } + if (function_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(Function); + } + if (indexSignature_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(IndexSignature); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -17909,6 +17965,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(130, 1); output.WriteMessage(BaseSchema); } + if (function_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(Function); + } + if (indexSignature_ != null) { + output.WriteRawTag(146, 1); + output.WriteMessage(IndexSignature); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -17957,6 +18021,12 @@ public int CalculateSize() { if (baseSchema_ != null) { size += 2 + pb::CodedOutputStream.ComputeMessageSize(BaseSchema); } + if (function_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(Function); + } + if (indexSignature_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(IndexSignature); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -18016,6 +18086,18 @@ public void MergeFrom(KclType other) { } BaseSchema.MergeFrom(other.BaseSchema); } + if (other.function_ != null) { + if (function_ == null) { + Function = new global::KclLib.API.FunctionType(); + } + Function.MergeFrom(other.Function); + } + if (other.indexSignature_ != null) { + if (indexSignature_ == null) { + IndexSignature = new global::KclLib.API.IndexSignature(); + } + IndexSignature.MergeFrom(other.IndexSignature); + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -18108,6 +18190,20 @@ public void MergeFrom(pb::CodedInputStream input) { input.ReadMessage(BaseSchema); break; } + case 138: { + if (function_ == null) { + Function = new global::KclLib.API.FunctionType(); + } + input.ReadMessage(Function); + break; + } + case 146: { + if (indexSignature_ == null) { + IndexSignature = new global::KclLib.API.IndexSignature(); + } + input.ReadMessage(IndexSignature); + break; + } } } #endif @@ -18200,6 +18296,20 @@ public void MergeFrom(pb::CodedInputStream input) { input.ReadMessage(BaseSchema); break; } + case 138: { + if (function_ == null) { + Function = new global::KclLib.API.FunctionType(); + } + input.ReadMessage(Function); + break; + } + case 146: { + if (indexSignature_ == null) { + IndexSignature = new global::KclLib.API.IndexSignature(); + } + input.ReadMessage(IndexSignature); + break; + } } } } @@ -18207,20 +18317,17 @@ public void MergeFrom(pb::CodedInputStream input) { } - /// - /// Message representing a decorator in KCL. - /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class Decorator : pb::IMessage + public sealed partial class FunctionType : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Decorator()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FunctionType()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -18236,7 +18343,7 @@ public sealed partial class Decorator : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Decorator() { + public FunctionType() { OnConstruction(); } @@ -18244,80 +18351,58 @@ public Decorator() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Decorator(Decorator other) : this() { - name_ = other.name_; - arguments_ = other.arguments_.Clone(); - keywords_ = other.keywords_.Clone(); + public FunctionType(FunctionType other) : this() { + params_ = other.params_.Clone(); + returnTy_ = other.returnTy_ != null ? other.returnTy_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Decorator Clone() { - return new Decorator(this); - } - - /// Field number for the "name" field. - public const int NameFieldNumber = 1; - private string name_ = ""; - /// - /// Name of the decorator. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + public FunctionType Clone() { + return new FunctionType(this); } - /// Field number for the "arguments" field. - public const int ArgumentsFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_arguments_codec - = pb::FieldCodec.ForString(18); - private readonly pbc::RepeatedField arguments_ = new pbc::RepeatedField(); - /// - /// Arguments for the decorator. - /// + /// Field number for the "params" field. + public const int ParamsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_params_codec + = pb::FieldCodec.ForMessage(10, global::KclLib.API.Parameter.Parser); + private readonly pbc::RepeatedField params_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Arguments { - get { return arguments_; } + public pbc::RepeatedField Params { + get { return params_; } } - /// Field number for the "keywords" field. - public const int KeywordsFieldNumber = 3; - private static readonly pbc::MapField.Codec _map_keywords_codec - = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 26); - private readonly pbc::MapField keywords_ = new pbc::MapField(); - /// - /// Keyword arguments for the decorator as a map with keyword name as key. - /// + /// Field number for the "return_ty" field. + public const int ReturnTyFieldNumber = 2; + private global::KclLib.API.KclType returnTy_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::MapField Keywords { - get { return keywords_; } + public global::KclLib.API.KclType ReturnTy { + get { return returnTy_; } + set { + returnTy_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Decorator); + return Equals(other as FunctionType); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(Decorator other) { + public bool Equals(FunctionType other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; - if(!arguments_.Equals(other.arguments_)) return false; - if (!Keywords.Equals(other.Keywords)) return false; + if(!params_.Equals(other.params_)) return false; + if (!object.Equals(ReturnTy, other.ReturnTy)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -18325,9 +18410,8 @@ public bool Equals(Decorator other) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Name.Length != 0) hash ^= Name.GetHashCode(); - hash ^= arguments_.GetHashCode(); - hash ^= Keywords.GetHashCode(); + hash ^= params_.GetHashCode(); + if (returnTy_ != null) hash ^= ReturnTy.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -18346,12 +18430,11 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Name.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Name); + params_.WriteTo(output, _repeated_params_codec); + if (returnTy_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ReturnTy); } - arguments_.WriteTo(output, _repeated_arguments_codec); - keywords_.WriteTo(output, _map_keywords_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -18362,12 +18445,11 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Name.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Name); + params_.WriteTo(ref output, _repeated_params_codec); + if (returnTy_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ReturnTy); } - arguments_.WriteTo(ref output, _repeated_arguments_codec); - keywords_.WriteTo(ref output, _map_keywords_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -18378,11 +18460,10 @@ public void WriteTo(pb::CodedOutputStream output) { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + size += params_.CalculateSize(_repeated_params_codec); + if (returnTy_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReturnTy); } - size += arguments_.CalculateSize(_repeated_arguments_codec); - size += keywords_.CalculateSize(_map_keywords_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -18391,15 +18472,17 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(Decorator other) { + public void MergeFrom(FunctionType other) { if (other == null) { return; } - if (other.Name.Length != 0) { - Name = other.Name; + params_.Add(other.params_); + if (other.returnTy_ != null) { + if (returnTy_ == null) { + ReturnTy = new global::KclLib.API.KclType(); + } + ReturnTy.MergeFrom(other.ReturnTy); } - arguments_.Add(other.arguments_); - keywords_.MergeFrom(other.keywords_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -18420,15 +18503,14 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Name = input.ReadString(); + params_.AddEntriesFrom(input, _repeated_params_codec); break; } case 18: { - arguments_.AddEntriesFrom(input, _repeated_arguments_codec); - break; - } - case 26: { - keywords_.AddEntriesFrom(input, _map_keywords_codec); + if (returnTy_ == null) { + ReturnTy = new global::KclLib.API.KclType(); + } + input.ReadMessage(ReturnTy); break; } } @@ -18451,15 +18533,14 @@ public void MergeFrom(pb::CodedInputStream input) { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - Name = input.ReadString(); + params_.AddEntriesFrom(ref input, _repeated_params_codec); break; } case 18: { - arguments_.AddEntriesFrom(ref input, _repeated_arguments_codec); - break; - } - case 26: { - keywords_.AddEntriesFrom(ref input, _map_keywords_codec); + if (returnTy_ == null) { + ReturnTy = new global::KclLib.API.KclType(); + } + input.ReadMessage(ReturnTy); break; } } @@ -18469,20 +18550,17 @@ public void MergeFrom(pb::CodedInputStream input) { } - /// - /// Message representing an example in KCL. - /// [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class Example : pb::IMessage + public sealed partial class Parameter : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Example()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Parameter()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -18496,6 +18574,868 @@ public sealed partial class Example : pb::IMessage get { return Descriptor; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Parameter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Parameter(Parameter other) : this() { + name_ = other.name_; + ty_ = other.ty_ != null ? other.ty_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Parameter Clone() { + return new Parameter(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ty" field. + public const int TyFieldNumber = 2; + private global::KclLib.API.KclType ty_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::KclLib.API.KclType Ty { + get { return ty_; } + set { + ty_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Parameter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Parameter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (!object.Equals(Ty, other.Ty)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (ty_ != null) hash ^= Ty.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (ty_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Ty); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (ty_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Ty); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (ty_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Ty); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Parameter other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.ty_ != null) { + if (ty_ == null) { + Ty = new global::KclLib.API.KclType(); + } + Ty.MergeFrom(other.Ty); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (ty_ == null) { + Ty = new global::KclLib.API.KclType(); + } + input.ReadMessage(Ty); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + if (ty_ == null) { + Ty = new global::KclLib.API.KclType(); + } + input.ReadMessage(Ty); + break; + } + } + } + } + #endif + + } + + /// + /// Message representing an index signature in KCL. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class IndexSignature : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new IndexSignature()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::KclLib.API.SpecReflection.Descriptor.MessageTypes[66]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IndexSignature() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IndexSignature(IndexSignature other) : this() { + keyName_ = other.keyName_; + key_ = other.key_ != null ? other.key_.Clone() : null; + val_ = other.val_ != null ? other.val_.Clone() : null; + anyOther_ = other.anyOther_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IndexSignature Clone() { + return new IndexSignature(this); + } + + /// Field number for the "key_name" field. + public const int KeyNameFieldNumber = 1; + private readonly static string KeyNameDefaultValue = ""; + + private string keyName_; + /// + /// The optional index signature key name + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string KeyName { + get { return keyName_ ?? KeyNameDefaultValue; } + set { + keyName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "key_name" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasKeyName { + get { return keyName_ != null; } + } + /// Clears the value of the "key_name" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearKeyName() { + keyName_ = null; + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 2; + private global::KclLib.API.KclType key_; + /// + /// Key type of the index signature. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::KclLib.API.KclType Key { + get { return key_; } + set { + key_ = value; + } + } + + /// Field number for the "val" field. + public const int ValFieldNumber = 3; + private global::KclLib.API.KclType val_; + /// + /// Value type of the index signature. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::KclLib.API.KclType Val { + get { return val_; } + set { + val_ = value; + } + } + + /// Field number for the "any_other" field. + public const int AnyOtherFieldNumber = 4; + private bool anyOther_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AnyOther { + get { return anyOther_; } + set { + anyOther_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as IndexSignature); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(IndexSignature other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (KeyName != other.KeyName) return false; + if (!object.Equals(Key, other.Key)) return false; + if (!object.Equals(Val, other.Val)) return false; + if (AnyOther != other.AnyOther) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasKeyName) hash ^= KeyName.GetHashCode(); + if (key_ != null) hash ^= Key.GetHashCode(); + if (val_ != null) hash ^= Val.GetHashCode(); + if (AnyOther != false) hash ^= AnyOther.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasKeyName) { + output.WriteRawTag(10); + output.WriteString(KeyName); + } + if (key_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Key); + } + if (val_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Val); + } + if (AnyOther != false) { + output.WriteRawTag(32); + output.WriteBool(AnyOther); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasKeyName) { + output.WriteRawTag(10); + output.WriteString(KeyName); + } + if (key_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Key); + } + if (val_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Val); + } + if (AnyOther != false) { + output.WriteRawTag(32); + output.WriteBool(AnyOther); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasKeyName) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(KeyName); + } + if (key_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Key); + } + if (val_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Val); + } + if (AnyOther != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(IndexSignature other) { + if (other == null) { + return; + } + if (other.HasKeyName) { + KeyName = other.KeyName; + } + if (other.key_ != null) { + if (key_ == null) { + Key = new global::KclLib.API.KclType(); + } + Key.MergeFrom(other.Key); + } + if (other.val_ != null) { + if (val_ == null) { + Val = new global::KclLib.API.KclType(); + } + Val.MergeFrom(other.Val); + } + if (other.AnyOther != false) { + AnyOther = other.AnyOther; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + KeyName = input.ReadString(); + break; + } + case 18: { + if (key_ == null) { + Key = new global::KclLib.API.KclType(); + } + input.ReadMessage(Key); + break; + } + case 26: { + if (val_ == null) { + Val = new global::KclLib.API.KclType(); + } + input.ReadMessage(Val); + break; + } + case 32: { + AnyOther = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + KeyName = input.ReadString(); + break; + } + case 18: { + if (key_ == null) { + Key = new global::KclLib.API.KclType(); + } + input.ReadMessage(Key); + break; + } + case 26: { + if (val_ == null) { + Val = new global::KclLib.API.KclType(); + } + input.ReadMessage(Val); + break; + } + case 32: { + AnyOther = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// Message representing a decorator in KCL. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Decorator : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Decorator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::KclLib.API.SpecReflection.Descriptor.MessageTypes[67]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Decorator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Decorator(Decorator other) : this() { + name_ = other.name_; + arguments_ = other.arguments_.Clone(); + keywords_ = other.keywords_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Decorator Clone() { + return new Decorator(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Name of the decorator. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "arguments" field. + public const int ArgumentsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_arguments_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField arguments_ = new pbc::RepeatedField(); + /// + /// Arguments for the decorator. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Arguments { + get { return arguments_; } + } + + /// Field number for the "keywords" field. + public const int KeywordsFieldNumber = 3; + private static readonly pbc::MapField.Codec _map_keywords_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 26); + private readonly pbc::MapField keywords_ = new pbc::MapField(); + /// + /// Keyword arguments for the decorator as a map with keyword name as key. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::MapField Keywords { + get { return keywords_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Decorator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Decorator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!arguments_.Equals(other.arguments_)) return false; + if (!Keywords.Equals(other.Keywords)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= arguments_.GetHashCode(); + hash ^= Keywords.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + arguments_.WriteTo(output, _repeated_arguments_codec); + keywords_.WriteTo(output, _map_keywords_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + arguments_.WriteTo(ref output, _repeated_arguments_codec); + keywords_.WriteTo(ref output, _map_keywords_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += arguments_.CalculateSize(_repeated_arguments_codec); + size += keywords_.CalculateSize(_map_keywords_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Decorator other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + arguments_.Add(other.arguments_); + keywords_.MergeFrom(other.keywords_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + arguments_.AddEntriesFrom(input, _repeated_arguments_codec); + break; + } + case 26: { + keywords_.AddEntriesFrom(input, _map_keywords_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + arguments_.AddEntriesFrom(ref input, _repeated_arguments_codec); + break; + } + case 26: { + keywords_.AddEntriesFrom(ref input, _map_keywords_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Message representing an example in KCL. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Example : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Example()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::KclLib.API.SpecReflection.Descriptor.MessageTypes[68]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Example() { diff --git a/dotnet/examples/exec-program/exec-program.csproj b/dotnet/examples/exec-program/exec-program.csproj index 4a9a1407..2cb11d4a 100644 --- a/dotnet/examples/exec-program/exec-program.csproj +++ b/dotnet/examples/exec-program/exec-program.csproj @@ -9,7 +9,7 @@ - + diff --git a/go/api/spec.pb.go b/go/api/spec.pb.go index 98af8edb..bb1f7b25 100644 --- a/go/api/spec.pb.go +++ b/go/api/spec.pb.go @@ -4007,7 +4007,7 @@ func (x *UpdateDependenciesResult) GetExternalPkgs() []*ExternalPkg { // Message representing a KCL type. type KclType struct { state protoimpl.MessageState `protogen:"open.v1"` - // Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). + // Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier). Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Union types if applicable. UnionTypes []*KclType `protobuf:"bytes,2,rep,name=union_types,json=unionTypes,proto3" json:"union_types,omitempty"` @@ -4038,9 +4038,13 @@ type KclType struct { // Map of examples with example name as key. Examples map[string]*Example `protobuf:"bytes,15,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Base schema if applicable. - BaseSchema *KclType `protobuf:"bytes,16,opt,name=base_schema,json=baseSchema,proto3" json:"base_schema,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + BaseSchema *KclType `protobuf:"bytes,16,opt,name=base_schema,json=baseSchema,proto3" json:"base_schema,omitempty"` + // Function type if the KclType is a function. + Function *FunctionType `protobuf:"bytes,17,opt,name=function,proto3,oneof" json:"function,omitempty"` + // Optional schema index signature + IndexSignature *IndexSignature `protobuf:"bytes,18,opt,name=index_signature,json=indexSignature,proto3,oneof" json:"index_signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *KclType) Reset() { @@ -4185,6 +4189,196 @@ func (x *KclType) GetBaseSchema() *KclType { return nil } +func (x *KclType) GetFunction() *FunctionType { + if x != nil { + return x.Function + } + return nil +} + +func (x *KclType) GetIndexSignature() *IndexSignature { + if x != nil { + return x.IndexSignature + } + return nil +} + +type FunctionType struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params []*Parameter `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` + ReturnTy *KclType `protobuf:"bytes,2,opt,name=return_ty,json=returnTy,proto3" json:"return_ty,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FunctionType) Reset() { + *x = FunctionType{} + mi := &file_spec_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FunctionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FunctionType) ProtoMessage() {} + +func (x *FunctionType) ProtoReflect() protoreflect.Message { + mi := &file_spec_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FunctionType.ProtoReflect.Descriptor instead. +func (*FunctionType) Descriptor() ([]byte, []int) { + return file_spec_proto_rawDescGZIP(), []int{64} +} + +func (x *FunctionType) GetParams() []*Parameter { + if x != nil { + return x.Params + } + return nil +} + +func (x *FunctionType) GetReturnTy() *KclType { + if x != nil { + return x.ReturnTy + } + return nil +} + +type Parameter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Ty *KclType `protobuf:"bytes,2,opt,name=ty,proto3" json:"ty,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Parameter) Reset() { + *x = Parameter{} + mi := &file_spec_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Parameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameter) ProtoMessage() {} + +func (x *Parameter) ProtoReflect() protoreflect.Message { + mi := &file_spec_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Parameter.ProtoReflect.Descriptor instead. +func (*Parameter) Descriptor() ([]byte, []int) { + return file_spec_proto_rawDescGZIP(), []int{65} +} + +func (x *Parameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Parameter) GetTy() *KclType { + if x != nil { + return x.Ty + } + return nil +} + +// Message representing an index signature in KCL. +type IndexSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The optional index signature key name + KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName,proto3,oneof" json:"key_name,omitempty"` + // Key type of the index signature. + Key *KclType `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // Value type of the index signature. + Val *KclType `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"` + AnyOther bool `protobuf:"varint,4,opt,name=any_other,json=anyOther,proto3" json:"any_other,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IndexSignature) Reset() { + *x = IndexSignature{} + mi := &file_spec_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IndexSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexSignature) ProtoMessage() {} + +func (x *IndexSignature) ProtoReflect() protoreflect.Message { + mi := &file_spec_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndexSignature.ProtoReflect.Descriptor instead. +func (*IndexSignature) Descriptor() ([]byte, []int) { + return file_spec_proto_rawDescGZIP(), []int{66} +} + +func (x *IndexSignature) GetKeyName() string { + if x != nil && x.KeyName != nil { + return *x.KeyName + } + return "" +} + +func (x *IndexSignature) GetKey() *KclType { + if x != nil { + return x.Key + } + return nil +} + +func (x *IndexSignature) GetVal() *KclType { + if x != nil { + return x.Val + } + return nil +} + +func (x *IndexSignature) GetAnyOther() bool { + if x != nil { + return x.AnyOther + } + return false +} + // Message representing a decorator in KCL. type Decorator struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -4200,7 +4394,7 @@ type Decorator struct { func (x *Decorator) Reset() { *x = Decorator{} - mi := &file_spec_proto_msgTypes[64] + mi := &file_spec_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4212,7 +4406,7 @@ func (x *Decorator) String() string { func (*Decorator) ProtoMessage() {} func (x *Decorator) ProtoReflect() protoreflect.Message { - mi := &file_spec_proto_msgTypes[64] + mi := &file_spec_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4225,7 +4419,7 @@ func (x *Decorator) ProtoReflect() protoreflect.Message { // Deprecated: Use Decorator.ProtoReflect.Descriptor instead. func (*Decorator) Descriptor() ([]byte, []int) { - return file_spec_proto_rawDescGZIP(), []int{64} + return file_spec_proto_rawDescGZIP(), []int{67} } func (x *Decorator) GetName() string { @@ -4264,7 +4458,7 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - mi := &file_spec_proto_msgTypes[65] + mi := &file_spec_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4276,7 +4470,7 @@ func (x *Example) String() string { func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { - mi := &file_spec_proto_msgTypes[65] + mi := &file_spec_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4289,7 +4483,7 @@ func (x *Example) ProtoReflect() protoreflect.Message { // Deprecated: Use Example.ProtoReflect.Descriptor instead. func (*Example) Descriptor() ([]byte, []int) { - return file_spec_proto_rawDescGZIP(), []int{65} + return file_spec_proto_rawDescGZIP(), []int{68} } func (x *Example) GetSummary() string { @@ -4626,7 +4820,7 @@ const file_spec_proto_rawDesc = "" + "\rmanifest_path\x18\x01 \x01(\tR\fmanifestPath\x12\x16\n" + "\x06vendor\x18\x02 \x01(\bR\x06vendor\"Y\n" + "\x18UpdateDependenciesResult\x12=\n" + - "\rexternal_pkgs\x18\x03 \x03(\v2\x18.com.kcl.api.ExternalPkgR\fexternalPkgs\"\xa6\x06\n" + + "\rexternal_pkgs\x18\x03 \x03(\v2\x18.com.kcl.api.ExternalPkgR\fexternalPkgs\"\xce\a\n" + "\aKclType\x12\x12\n" + "\x04type\x18\x01 \x01(\tR\x04type\x125\n" + "\vunion_types\x18\x02 \x03(\v2\x14.com.kcl.api.KclTypeR\n" + @@ -4652,13 +4846,29 @@ const file_spec_proto_rawDesc = "" + "\vdescription\x18\x0e \x01(\tR\vdescription\x12>\n" + "\bexamples\x18\x0f \x03(\v2\".com.kcl.api.KclType.ExamplesEntryR\bexamples\x125\n" + "\vbase_schema\x18\x10 \x01(\v2\x14.com.kcl.api.KclTypeR\n" + - "baseSchema\x1aS\n" + + "baseSchema\x12:\n" + + "\bfunction\x18\x11 \x01(\v2\x19.com.kcl.api.FunctionTypeH\x00R\bfunction\x88\x01\x01\x12I\n" + + "\x0findex_signature\x18\x12 \x01(\v2\x1b.com.kcl.api.IndexSignatureH\x01R\x0eindexSignature\x88\x01\x01\x1aS\n" + "\x0fPropertiesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" + "\x05value\x18\x02 \x01(\v2\x14.com.kcl.api.KclTypeR\x05value:\x028\x01\x1aQ\n" + "\rExamplesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" + - "\x05value\x18\x02 \x01(\v2\x14.com.kcl.api.ExampleR\x05value:\x028\x01\"\xbc\x01\n" + + "\x05value\x18\x02 \x01(\v2\x14.com.kcl.api.ExampleR\x05value:\x028\x01B\v\n" + + "\t_functionB\x12\n" + + "\x10_index_signature\"q\n" + + "\fFunctionType\x12.\n" + + "\x06params\x18\x01 \x03(\v2\x16.com.kcl.api.ParameterR\x06params\x121\n" + + "\treturn_ty\x18\x02 \x01(\v2\x14.com.kcl.api.KclTypeR\breturnTy\"E\n" + + "\tParameter\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12$\n" + + "\x02ty\x18\x02 \x01(\v2\x14.com.kcl.api.KclTypeR\x02ty\"\xaa\x01\n" + + "\x0eIndexSignature\x12\x1e\n" + + "\bkey_name\x18\x01 \x01(\tH\x00R\akeyName\x88\x01\x01\x12&\n" + + "\x03key\x18\x02 \x01(\v2\x14.com.kcl.api.KclTypeR\x03key\x12&\n" + + "\x03val\x18\x03 \x01(\v2\x14.com.kcl.api.KclTypeR\x03val\x12\x1b\n" + + "\tany_other\x18\x04 \x01(\bR\banyOtherB\v\n" + + "\t_key_name\"\xbc\x01\n" + "\tDecorator\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n" + "\targuments\x18\x02 \x03(\tR\targuments\x12@\n" + @@ -4716,7 +4926,7 @@ func file_spec_proto_rawDescGZIP() []byte { return file_spec_proto_rawDescData } -var file_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 80) +var file_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 83) var file_spec_proto_goTypes = []any{ (*ExternalPkg)(nil), // 0: com.kcl.api.ExternalPkg (*Argument)(nil), // 1: com.kcl.api.Argument @@ -4782,22 +4992,25 @@ var file_spec_proto_goTypes = []any{ (*UpdateDependenciesArgs)(nil), // 61: com.kcl.api.UpdateDependenciesArgs (*UpdateDependenciesResult)(nil), // 62: com.kcl.api.UpdateDependenciesResult (*KclType)(nil), // 63: com.kcl.api.KclType - (*Decorator)(nil), // 64: com.kcl.api.Decorator - (*Example)(nil), // 65: com.kcl.api.Example - nil, // 66: com.kcl.api.LoadPackageResult.ScopesEntry - nil, // 67: com.kcl.api.LoadPackageResult.SymbolsEntry - nil, // 68: com.kcl.api.LoadPackageResult.NodeSymbolMapEntry - nil, // 69: com.kcl.api.LoadPackageResult.SymbolNodeMapEntry - nil, // 70: com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry - nil, // 71: com.kcl.api.LoadPackageResult.PkgScopeMapEntry - nil, // 72: com.kcl.api.ListVariablesResult.VariablesEntry - nil, // 73: com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry - nil, // 74: com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry - nil, // 75: com.kcl.api.RenameCodeArgs.SourceCodesEntry - nil, // 76: com.kcl.api.RenameCodeResult.ChangedCodesEntry - nil, // 77: com.kcl.api.KclType.PropertiesEntry - nil, // 78: com.kcl.api.KclType.ExamplesEntry - nil, // 79: com.kcl.api.Decorator.KeywordsEntry + (*FunctionType)(nil), // 64: com.kcl.api.FunctionType + (*Parameter)(nil), // 65: com.kcl.api.Parameter + (*IndexSignature)(nil), // 66: com.kcl.api.IndexSignature + (*Decorator)(nil), // 67: com.kcl.api.Decorator + (*Example)(nil), // 68: com.kcl.api.Example + nil, // 69: com.kcl.api.LoadPackageResult.ScopesEntry + nil, // 70: com.kcl.api.LoadPackageResult.SymbolsEntry + nil, // 71: com.kcl.api.LoadPackageResult.NodeSymbolMapEntry + nil, // 72: com.kcl.api.LoadPackageResult.SymbolNodeMapEntry + nil, // 73: com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry + nil, // 74: com.kcl.api.LoadPackageResult.PkgScopeMapEntry + nil, // 75: com.kcl.api.ListVariablesResult.VariablesEntry + nil, // 76: com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry + nil, // 77: com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry + nil, // 78: com.kcl.api.RenameCodeArgs.SourceCodesEntry + nil, // 79: com.kcl.api.RenameCodeResult.ChangedCodesEntry + nil, // 80: com.kcl.api.KclType.PropertiesEntry + nil, // 81: com.kcl.api.KclType.ExamplesEntry + nil, // 82: com.kcl.api.Decorator.KeywordsEntry } var file_spec_proto_depIdxs = []int32{ 3, // 0: com.kcl.api.Error.messages:type_name -> com.kcl.api.Message @@ -4809,12 +5022,12 @@ var file_spec_proto_depIdxs = []int32{ 12, // 6: com.kcl.api.LoadPackageArgs.parse_args:type_name -> com.kcl.api.ParseProgramArgs 2, // 7: com.kcl.api.LoadPackageResult.parse_errors:type_name -> com.kcl.api.Error 2, // 8: com.kcl.api.LoadPackageResult.type_errors:type_name -> com.kcl.api.Error - 66, // 9: com.kcl.api.LoadPackageResult.scopes:type_name -> com.kcl.api.LoadPackageResult.ScopesEntry - 67, // 10: com.kcl.api.LoadPackageResult.symbols:type_name -> com.kcl.api.LoadPackageResult.SymbolsEntry - 68, // 11: com.kcl.api.LoadPackageResult.node_symbol_map:type_name -> com.kcl.api.LoadPackageResult.NodeSymbolMapEntry - 69, // 12: com.kcl.api.LoadPackageResult.symbol_node_map:type_name -> com.kcl.api.LoadPackageResult.SymbolNodeMapEntry - 70, // 13: com.kcl.api.LoadPackageResult.fully_qualified_name_map:type_name -> com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry - 71, // 14: com.kcl.api.LoadPackageResult.pkg_scope_map:type_name -> com.kcl.api.LoadPackageResult.PkgScopeMapEntry + 69, // 9: com.kcl.api.LoadPackageResult.scopes:type_name -> com.kcl.api.LoadPackageResult.ScopesEntry + 70, // 10: com.kcl.api.LoadPackageResult.symbols:type_name -> com.kcl.api.LoadPackageResult.SymbolsEntry + 71, // 11: com.kcl.api.LoadPackageResult.node_symbol_map:type_name -> com.kcl.api.LoadPackageResult.NodeSymbolMapEntry + 72, // 12: com.kcl.api.LoadPackageResult.symbol_node_map:type_name -> com.kcl.api.LoadPackageResult.SymbolNodeMapEntry + 73, // 13: com.kcl.api.LoadPackageResult.fully_qualified_name_map:type_name -> com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry + 74, // 14: com.kcl.api.LoadPackageResult.pkg_scope_map:type_name -> com.kcl.api.LoadPackageResult.PkgScopeMapEntry 17, // 15: com.kcl.api.ListOptionsResult.options:type_name -> com.kcl.api.OptionHelp 63, // 16: com.kcl.api.Symbol.ty:type_name -> com.kcl.api.KclType 20, // 17: com.kcl.api.Symbol.owner:type_name -> com.kcl.api.SymbolIndex @@ -4831,94 +5044,101 @@ var file_spec_proto_depIdxs = []int32{ 2, // 28: com.kcl.api.OverrideFileResult.parse_errors:type_name -> com.kcl.api.Error 39, // 29: com.kcl.api.VariableList.variables:type_name -> com.kcl.api.Variable 35, // 30: com.kcl.api.ListVariablesArgs.options:type_name -> com.kcl.api.ListVariablesOptions - 72, // 31: com.kcl.api.ListVariablesResult.variables:type_name -> com.kcl.api.ListVariablesResult.VariablesEntry + 75, // 31: com.kcl.api.ListVariablesResult.variables:type_name -> com.kcl.api.ListVariablesResult.VariablesEntry 2, // 32: com.kcl.api.ListVariablesResult.parse_errors:type_name -> com.kcl.api.Error 39, // 33: com.kcl.api.Variable.list_items:type_name -> com.kcl.api.Variable 40, // 34: com.kcl.api.Variable.dict_entries:type_name -> com.kcl.api.MapEntry 39, // 35: com.kcl.api.MapEntry.value:type_name -> com.kcl.api.Variable 22, // 36: com.kcl.api.GetSchemaTypeMappingArgs.exec_args:type_name -> com.kcl.api.ExecProgramArgs - 73, // 37: com.kcl.api.GetSchemaTypeMappingResult.schema_type_mapping:type_name -> com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry - 74, // 38: com.kcl.api.GetSchemaTypeMappingUnderPathResult.schema_type_mapping:type_name -> com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry + 76, // 37: com.kcl.api.GetSchemaTypeMappingResult.schema_type_mapping:type_name -> com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry + 77, // 38: com.kcl.api.GetSchemaTypeMappingUnderPathResult.schema_type_mapping:type_name -> com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry 63, // 39: com.kcl.api.SchemaTypes.schema_type:type_name -> com.kcl.api.KclType 0, // 40: com.kcl.api.ValidateCodeArgs.external_pkgs:type_name -> com.kcl.api.ExternalPkg 52, // 41: com.kcl.api.LoadSettingsFilesResult.kcl_cli_configs:type_name -> com.kcl.api.CliConfig 53, // 42: com.kcl.api.LoadSettingsFilesResult.kcl_options:type_name -> com.kcl.api.KeyValuePair - 75, // 43: com.kcl.api.RenameCodeArgs.source_codes:type_name -> com.kcl.api.RenameCodeArgs.SourceCodesEntry - 76, // 44: com.kcl.api.RenameCodeResult.changed_codes:type_name -> com.kcl.api.RenameCodeResult.ChangedCodesEntry + 78, // 43: com.kcl.api.RenameCodeArgs.source_codes:type_name -> com.kcl.api.RenameCodeArgs.SourceCodesEntry + 79, // 44: com.kcl.api.RenameCodeResult.changed_codes:type_name -> com.kcl.api.RenameCodeResult.ChangedCodesEntry 22, // 45: com.kcl.api.TestArgs.exec_args:type_name -> com.kcl.api.ExecProgramArgs 60, // 46: com.kcl.api.TestResult.info:type_name -> com.kcl.api.TestCaseInfo 0, // 47: com.kcl.api.UpdateDependenciesResult.external_pkgs:type_name -> com.kcl.api.ExternalPkg 63, // 48: com.kcl.api.KclType.union_types:type_name -> com.kcl.api.KclType - 77, // 49: com.kcl.api.KclType.properties:type_name -> com.kcl.api.KclType.PropertiesEntry + 80, // 49: com.kcl.api.KclType.properties:type_name -> com.kcl.api.KclType.PropertiesEntry 63, // 50: com.kcl.api.KclType.key:type_name -> com.kcl.api.KclType 63, // 51: com.kcl.api.KclType.item:type_name -> com.kcl.api.KclType - 64, // 52: com.kcl.api.KclType.decorators:type_name -> com.kcl.api.Decorator - 78, // 53: com.kcl.api.KclType.examples:type_name -> com.kcl.api.KclType.ExamplesEntry + 67, // 52: com.kcl.api.KclType.decorators:type_name -> com.kcl.api.Decorator + 81, // 53: com.kcl.api.KclType.examples:type_name -> com.kcl.api.KclType.ExamplesEntry 63, // 54: com.kcl.api.KclType.base_schema:type_name -> com.kcl.api.KclType - 79, // 55: com.kcl.api.Decorator.keywords:type_name -> com.kcl.api.Decorator.KeywordsEntry - 19, // 56: com.kcl.api.LoadPackageResult.ScopesEntry.value:type_name -> com.kcl.api.Scope - 18, // 57: com.kcl.api.LoadPackageResult.SymbolsEntry.value:type_name -> com.kcl.api.Symbol - 20, // 58: com.kcl.api.LoadPackageResult.NodeSymbolMapEntry.value:type_name -> com.kcl.api.SymbolIndex - 20, // 59: com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry.value:type_name -> com.kcl.api.SymbolIndex - 21, // 60: com.kcl.api.LoadPackageResult.PkgScopeMapEntry.value:type_name -> com.kcl.api.ScopeIndex - 36, // 61: com.kcl.api.ListVariablesResult.VariablesEntry.value:type_name -> com.kcl.api.VariableList - 63, // 62: com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry.value:type_name -> com.kcl.api.KclType - 44, // 63: com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry.value:type_name -> com.kcl.api.SchemaTypes - 63, // 64: com.kcl.api.KclType.PropertiesEntry.value:type_name -> com.kcl.api.KclType - 65, // 65: com.kcl.api.KclType.ExamplesEntry.value:type_name -> com.kcl.api.Example - 4, // 66: com.kcl.api.BuiltinService.Ping:input_type -> com.kcl.api.PingArgs - 8, // 67: com.kcl.api.BuiltinService.ListMethod:input_type -> com.kcl.api.ListMethodArgs - 4, // 68: com.kcl.api.KclService.Ping:input_type -> com.kcl.api.PingArgs - 6, // 69: com.kcl.api.KclService.GetVersion:input_type -> com.kcl.api.GetVersionArgs - 12, // 70: com.kcl.api.KclService.ParseProgram:input_type -> com.kcl.api.ParseProgramArgs - 10, // 71: com.kcl.api.KclService.ParseFile:input_type -> com.kcl.api.ParseFileArgs - 14, // 72: com.kcl.api.KclService.LoadPackage:input_type -> com.kcl.api.LoadPackageArgs - 12, // 73: com.kcl.api.KclService.ListOptions:input_type -> com.kcl.api.ParseProgramArgs - 37, // 74: com.kcl.api.KclService.ListVariables:input_type -> com.kcl.api.ListVariablesArgs - 22, // 75: com.kcl.api.KclService.ExecProgram:input_type -> com.kcl.api.ExecProgramArgs - 24, // 76: com.kcl.api.KclService.BuildProgram:input_type -> com.kcl.api.BuildProgramArgs - 26, // 77: com.kcl.api.KclService.ExecArtifact:input_type -> com.kcl.api.ExecArtifactArgs - 33, // 78: com.kcl.api.KclService.OverrideFile:input_type -> com.kcl.api.OverrideFileArgs - 41, // 79: com.kcl.api.KclService.GetSchemaTypeMapping:input_type -> com.kcl.api.GetSchemaTypeMappingArgs - 27, // 80: com.kcl.api.KclService.FormatCode:input_type -> com.kcl.api.FormatCodeArgs - 29, // 81: com.kcl.api.KclService.FormatPath:input_type -> com.kcl.api.FormatPathArgs - 31, // 82: com.kcl.api.KclService.LintPath:input_type -> com.kcl.api.LintPathArgs - 45, // 83: com.kcl.api.KclService.ValidateCode:input_type -> com.kcl.api.ValidateCodeArgs - 48, // 84: com.kcl.api.KclService.ListDepFiles:input_type -> com.kcl.api.ListDepFilesArgs - 50, // 85: com.kcl.api.KclService.LoadSettingsFiles:input_type -> com.kcl.api.LoadSettingsFilesArgs - 54, // 86: com.kcl.api.KclService.Rename:input_type -> com.kcl.api.RenameArgs - 56, // 87: com.kcl.api.KclService.RenameCode:input_type -> com.kcl.api.RenameCodeArgs - 58, // 88: com.kcl.api.KclService.Test:input_type -> com.kcl.api.TestArgs - 61, // 89: com.kcl.api.KclService.UpdateDependencies:input_type -> com.kcl.api.UpdateDependenciesArgs - 5, // 90: com.kcl.api.BuiltinService.Ping:output_type -> com.kcl.api.PingResult - 9, // 91: com.kcl.api.BuiltinService.ListMethod:output_type -> com.kcl.api.ListMethodResult - 5, // 92: com.kcl.api.KclService.Ping:output_type -> com.kcl.api.PingResult - 7, // 93: com.kcl.api.KclService.GetVersion:output_type -> com.kcl.api.GetVersionResult - 13, // 94: com.kcl.api.KclService.ParseProgram:output_type -> com.kcl.api.ParseProgramResult - 11, // 95: com.kcl.api.KclService.ParseFile:output_type -> com.kcl.api.ParseFileResult - 15, // 96: com.kcl.api.KclService.LoadPackage:output_type -> com.kcl.api.LoadPackageResult - 16, // 97: com.kcl.api.KclService.ListOptions:output_type -> com.kcl.api.ListOptionsResult - 38, // 98: com.kcl.api.KclService.ListVariables:output_type -> com.kcl.api.ListVariablesResult - 23, // 99: com.kcl.api.KclService.ExecProgram:output_type -> com.kcl.api.ExecProgramResult - 25, // 100: com.kcl.api.KclService.BuildProgram:output_type -> com.kcl.api.BuildProgramResult - 23, // 101: com.kcl.api.KclService.ExecArtifact:output_type -> com.kcl.api.ExecProgramResult - 34, // 102: com.kcl.api.KclService.OverrideFile:output_type -> com.kcl.api.OverrideFileResult - 42, // 103: com.kcl.api.KclService.GetSchemaTypeMapping:output_type -> com.kcl.api.GetSchemaTypeMappingResult - 28, // 104: com.kcl.api.KclService.FormatCode:output_type -> com.kcl.api.FormatCodeResult - 30, // 105: com.kcl.api.KclService.FormatPath:output_type -> com.kcl.api.FormatPathResult - 32, // 106: com.kcl.api.KclService.LintPath:output_type -> com.kcl.api.LintPathResult - 46, // 107: com.kcl.api.KclService.ValidateCode:output_type -> com.kcl.api.ValidateCodeResult - 49, // 108: com.kcl.api.KclService.ListDepFiles:output_type -> com.kcl.api.ListDepFilesResult - 51, // 109: com.kcl.api.KclService.LoadSettingsFiles:output_type -> com.kcl.api.LoadSettingsFilesResult - 55, // 110: com.kcl.api.KclService.Rename:output_type -> com.kcl.api.RenameResult - 57, // 111: com.kcl.api.KclService.RenameCode:output_type -> com.kcl.api.RenameCodeResult - 59, // 112: com.kcl.api.KclService.Test:output_type -> com.kcl.api.TestResult - 62, // 113: com.kcl.api.KclService.UpdateDependencies:output_type -> com.kcl.api.UpdateDependenciesResult - 90, // [90:114] is the sub-list for method output_type - 66, // [66:90] is the sub-list for method input_type - 66, // [66:66] is the sub-list for extension type_name - 66, // [66:66] is the sub-list for extension extendee - 0, // [0:66] is the sub-list for field type_name + 64, // 55: com.kcl.api.KclType.function:type_name -> com.kcl.api.FunctionType + 66, // 56: com.kcl.api.KclType.index_signature:type_name -> com.kcl.api.IndexSignature + 65, // 57: com.kcl.api.FunctionType.params:type_name -> com.kcl.api.Parameter + 63, // 58: com.kcl.api.FunctionType.return_ty:type_name -> com.kcl.api.KclType + 63, // 59: com.kcl.api.Parameter.ty:type_name -> com.kcl.api.KclType + 63, // 60: com.kcl.api.IndexSignature.key:type_name -> com.kcl.api.KclType + 63, // 61: com.kcl.api.IndexSignature.val:type_name -> com.kcl.api.KclType + 82, // 62: com.kcl.api.Decorator.keywords:type_name -> com.kcl.api.Decorator.KeywordsEntry + 19, // 63: com.kcl.api.LoadPackageResult.ScopesEntry.value:type_name -> com.kcl.api.Scope + 18, // 64: com.kcl.api.LoadPackageResult.SymbolsEntry.value:type_name -> com.kcl.api.Symbol + 20, // 65: com.kcl.api.LoadPackageResult.NodeSymbolMapEntry.value:type_name -> com.kcl.api.SymbolIndex + 20, // 66: com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry.value:type_name -> com.kcl.api.SymbolIndex + 21, // 67: com.kcl.api.LoadPackageResult.PkgScopeMapEntry.value:type_name -> com.kcl.api.ScopeIndex + 36, // 68: com.kcl.api.ListVariablesResult.VariablesEntry.value:type_name -> com.kcl.api.VariableList + 63, // 69: com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry.value:type_name -> com.kcl.api.KclType + 44, // 70: com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry.value:type_name -> com.kcl.api.SchemaTypes + 63, // 71: com.kcl.api.KclType.PropertiesEntry.value:type_name -> com.kcl.api.KclType + 68, // 72: com.kcl.api.KclType.ExamplesEntry.value:type_name -> com.kcl.api.Example + 4, // 73: com.kcl.api.BuiltinService.Ping:input_type -> com.kcl.api.PingArgs + 8, // 74: com.kcl.api.BuiltinService.ListMethod:input_type -> com.kcl.api.ListMethodArgs + 4, // 75: com.kcl.api.KclService.Ping:input_type -> com.kcl.api.PingArgs + 6, // 76: com.kcl.api.KclService.GetVersion:input_type -> com.kcl.api.GetVersionArgs + 12, // 77: com.kcl.api.KclService.ParseProgram:input_type -> com.kcl.api.ParseProgramArgs + 10, // 78: com.kcl.api.KclService.ParseFile:input_type -> com.kcl.api.ParseFileArgs + 14, // 79: com.kcl.api.KclService.LoadPackage:input_type -> com.kcl.api.LoadPackageArgs + 12, // 80: com.kcl.api.KclService.ListOptions:input_type -> com.kcl.api.ParseProgramArgs + 37, // 81: com.kcl.api.KclService.ListVariables:input_type -> com.kcl.api.ListVariablesArgs + 22, // 82: com.kcl.api.KclService.ExecProgram:input_type -> com.kcl.api.ExecProgramArgs + 24, // 83: com.kcl.api.KclService.BuildProgram:input_type -> com.kcl.api.BuildProgramArgs + 26, // 84: com.kcl.api.KclService.ExecArtifact:input_type -> com.kcl.api.ExecArtifactArgs + 33, // 85: com.kcl.api.KclService.OverrideFile:input_type -> com.kcl.api.OverrideFileArgs + 41, // 86: com.kcl.api.KclService.GetSchemaTypeMapping:input_type -> com.kcl.api.GetSchemaTypeMappingArgs + 27, // 87: com.kcl.api.KclService.FormatCode:input_type -> com.kcl.api.FormatCodeArgs + 29, // 88: com.kcl.api.KclService.FormatPath:input_type -> com.kcl.api.FormatPathArgs + 31, // 89: com.kcl.api.KclService.LintPath:input_type -> com.kcl.api.LintPathArgs + 45, // 90: com.kcl.api.KclService.ValidateCode:input_type -> com.kcl.api.ValidateCodeArgs + 48, // 91: com.kcl.api.KclService.ListDepFiles:input_type -> com.kcl.api.ListDepFilesArgs + 50, // 92: com.kcl.api.KclService.LoadSettingsFiles:input_type -> com.kcl.api.LoadSettingsFilesArgs + 54, // 93: com.kcl.api.KclService.Rename:input_type -> com.kcl.api.RenameArgs + 56, // 94: com.kcl.api.KclService.RenameCode:input_type -> com.kcl.api.RenameCodeArgs + 58, // 95: com.kcl.api.KclService.Test:input_type -> com.kcl.api.TestArgs + 61, // 96: com.kcl.api.KclService.UpdateDependencies:input_type -> com.kcl.api.UpdateDependenciesArgs + 5, // 97: com.kcl.api.BuiltinService.Ping:output_type -> com.kcl.api.PingResult + 9, // 98: com.kcl.api.BuiltinService.ListMethod:output_type -> com.kcl.api.ListMethodResult + 5, // 99: com.kcl.api.KclService.Ping:output_type -> com.kcl.api.PingResult + 7, // 100: com.kcl.api.KclService.GetVersion:output_type -> com.kcl.api.GetVersionResult + 13, // 101: com.kcl.api.KclService.ParseProgram:output_type -> com.kcl.api.ParseProgramResult + 11, // 102: com.kcl.api.KclService.ParseFile:output_type -> com.kcl.api.ParseFileResult + 15, // 103: com.kcl.api.KclService.LoadPackage:output_type -> com.kcl.api.LoadPackageResult + 16, // 104: com.kcl.api.KclService.ListOptions:output_type -> com.kcl.api.ListOptionsResult + 38, // 105: com.kcl.api.KclService.ListVariables:output_type -> com.kcl.api.ListVariablesResult + 23, // 106: com.kcl.api.KclService.ExecProgram:output_type -> com.kcl.api.ExecProgramResult + 25, // 107: com.kcl.api.KclService.BuildProgram:output_type -> com.kcl.api.BuildProgramResult + 23, // 108: com.kcl.api.KclService.ExecArtifact:output_type -> com.kcl.api.ExecProgramResult + 34, // 109: com.kcl.api.KclService.OverrideFile:output_type -> com.kcl.api.OverrideFileResult + 42, // 110: com.kcl.api.KclService.GetSchemaTypeMapping:output_type -> com.kcl.api.GetSchemaTypeMappingResult + 28, // 111: com.kcl.api.KclService.FormatCode:output_type -> com.kcl.api.FormatCodeResult + 30, // 112: com.kcl.api.KclService.FormatPath:output_type -> com.kcl.api.FormatPathResult + 32, // 113: com.kcl.api.KclService.LintPath:output_type -> com.kcl.api.LintPathResult + 46, // 114: com.kcl.api.KclService.ValidateCode:output_type -> com.kcl.api.ValidateCodeResult + 49, // 115: com.kcl.api.KclService.ListDepFiles:output_type -> com.kcl.api.ListDepFilesResult + 51, // 116: com.kcl.api.KclService.LoadSettingsFiles:output_type -> com.kcl.api.LoadSettingsFilesResult + 55, // 117: com.kcl.api.KclService.Rename:output_type -> com.kcl.api.RenameResult + 57, // 118: com.kcl.api.KclService.RenameCode:output_type -> com.kcl.api.RenameCodeResult + 59, // 119: com.kcl.api.KclService.Test:output_type -> com.kcl.api.TestResult + 62, // 120: com.kcl.api.KclService.UpdateDependencies:output_type -> com.kcl.api.UpdateDependenciesResult + 97, // [97:121] is the sub-list for method output_type + 73, // [73:97] is the sub-list for method input_type + 73, // [73:73] is the sub-list for extension type_name + 73, // [73:73] is the sub-list for extension extendee + 0, // [0:73] is the sub-list for field type_name } func init() { file_spec_proto_init() } @@ -4926,13 +5146,15 @@ func file_spec_proto_init() { if File_spec_proto != nil { return } + file_spec_proto_msgTypes[63].OneofWrappers = []any{} + file_spec_proto_msgTypes[66].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_spec_proto_rawDesc), len(file_spec_proto_rawDesc)), NumEnums: 0, - NumMessages: 80, + NumMessages: 83, NumExtensions: 0, NumServices: 2, }, diff --git a/go/install/install.go b/go/install/install.go index f9b5565a..f08f6cf2 100644 --- a/go/install/install.go +++ b/go/install/install.go @@ -9,7 +9,7 @@ import ( "github.com/gofrs/flock" ) -const KCL_VERSION = "v0.12.1" +const KCL_VERSION = "v0.12.2" func getVersion() string { return fmt.Sprintf("%s-%s-%s", KCL_VERSION, runtime.GOOS, runtime.GOARCH) diff --git a/java/Cargo.toml b/java/Cargo.toml index 0bf7d1b9..50d7aefe 100644 --- a/java/Cargo.toml +++ b/java/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kcl-lib-jni" publish = false -version = "0.12.1" +version = "0.12.2" edition = "2024" [lib] @@ -19,6 +19,6 @@ lazy_static = "1.4.0" prost = "0.14.1" prost-types = "0.14.1" -kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } diff --git a/java/README.md b/java/README.md index a54e5d61..dc5fbb7d 100644 --- a/java/README.md +++ b/java/README.md @@ -26,7 +26,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib - 0.12.1 + 0.12.2 ``` diff --git a/java/pom.xml b/java/pom.xml index 74e96e32..fc0050be 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -5,7 +5,7 @@ com.kcl kcl-lib - 0.12.1 + 0.12.2 KCL Arifact Library for Java KCL is an open-source constraint-based record and functional language mainly diff --git a/java/src/main/java/com/kcl/api/Spec.java b/java/src/main/java/com/kcl/api/Spec.java index 764f372e..a460629e 100644 --- a/java/src/main/java/com/kcl/api/Spec.java +++ b/java/src/main/java/com/kcl/api/Spec.java @@ -66311,7 +66311,7 @@ public interface KclTypeOrBuilder extends /** *
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -66320,7 +66320,7 @@ public interface KclTypeOrBuilder extends java.lang.String getType(); /** *
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -66776,6 +66776,60 @@ com.kcl.api.Spec.Example getExamplesOrThrow( * .com.kcl.api.KclType base_schema = 16; */ com.kcl.api.Spec.KclTypeOrBuilder getBaseSchemaOrBuilder(); + + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return Whether the function field is set. + */ + boolean hasFunction(); + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return The function. + */ + com.kcl.api.Spec.FunctionType getFunction(); + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + com.kcl.api.Spec.FunctionTypeOrBuilder getFunctionOrBuilder(); + + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return Whether the indexSignature field is set. + */ + boolean hasIndexSignature(); + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return The indexSignature. + */ + com.kcl.api.Spec.IndexSignature getIndexSignature(); + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + com.kcl.api.Spec.IndexSignatureOrBuilder getIndexSignatureOrBuilder(); } /** *
@@ -66849,7 +66903,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl
     private volatile java.lang.Object type_ = "";
     /**
      * 
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -66870,7 +66924,7 @@ public java.lang.String getType() { } /** *
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -67667,6 +67721,82 @@ public com.kcl.api.Spec.KclTypeOrBuilder getBaseSchemaOrBuilder() { return baseSchema_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : baseSchema_; } + public static final int FUNCTION_FIELD_NUMBER = 17; + private com.kcl.api.Spec.FunctionType function_; + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return Whether the function field is set. + */ + @java.lang.Override + public boolean hasFunction() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return The function. + */ + @java.lang.Override + public com.kcl.api.Spec.FunctionType getFunction() { + return function_ == null ? com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + @java.lang.Override + public com.kcl.api.Spec.FunctionTypeOrBuilder getFunctionOrBuilder() { + return function_ == null ? com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } + + public static final int INDEX_SIGNATURE_FIELD_NUMBER = 18; + private com.kcl.api.Spec.IndexSignature indexSignature_; + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return Whether the indexSignature field is set. + */ + @java.lang.Override + public boolean hasIndexSignature() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return The indexSignature. + */ + @java.lang.Override + public com.kcl.api.Spec.IndexSignature getIndexSignature() { + return indexSignature_ == null ? com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + @java.lang.Override + public com.kcl.api.Spec.IndexSignatureOrBuilder getIndexSignatureOrBuilder() { + return indexSignature_ == null ? com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -67735,6 +67865,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(16, getBaseSchema()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getFunction()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getIndexSignature()); + } getUnknownFields().writeTo(output); } @@ -67817,6 +67953,14 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(16, getBaseSchema()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getFunction()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getIndexSignature()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -67873,6 +68017,16 @@ public boolean equals(final java.lang.Object obj) { if (!getBaseSchema() .equals(other.getBaseSchema())) return false; } + if (hasFunction() != other.hasFunction()) return false; + if (hasFunction()) { + if (!getFunction() + .equals(other.getFunction())) return false; + } + if (hasIndexSignature() != other.hasIndexSignature()) return false; + if (hasIndexSignature()) { + if (!getIndexSignature() + .equals(other.getIndexSignature())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -67932,6 +68086,14 @@ public int hashCode() { hash = (37 * hash) + BASE_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getBaseSchema().hashCode(); } + if (hasFunction()) { + hash = (37 * hash) + FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getFunction().hashCode(); + } + if (hasIndexSignature()) { + hash = (37 * hash) + INDEX_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getIndexSignature().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -68097,6 +68259,8 @@ private void maybeForceBuilderInitialization() { internalGetItemFieldBuilder(); internalGetDecoratorsFieldBuilder(); internalGetBaseSchemaFieldBuilder(); + internalGetFunctionFieldBuilder(); + internalGetIndexSignatureFieldBuilder(); } } @java.lang.Override @@ -68144,6 +68308,16 @@ public Builder clear() { baseSchemaBuilder_.dispose(); baseSchemaBuilder_ = null; } + function_ = null; + if (functionBuilder_ != null) { + functionBuilder_.dispose(); + functionBuilder_ = null; + } + indexSignature_ = null; + if (indexSignatureBuilder_ != null) { + indexSignatureBuilder_.dispose(); + indexSignatureBuilder_ = null; + } return this; } @@ -68252,6 +68426,18 @@ private void buildPartial0(com.kcl.api.Spec.KclType result) { : baseSchemaBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.function_ = functionBuilder_ == null + ? function_ + : functionBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.indexSignature_ = indexSignatureBuilder_ == null + ? indexSignature_ + : indexSignatureBuilder_.build(); + to_bitField0_ |= 0x00000010; + } result.bitField0_ |= to_bitField0_; } @@ -68382,6 +68568,12 @@ public Builder mergeFrom(com.kcl.api.Spec.KclType other) { if (other.hasBaseSchema()) { mergeBaseSchema(other.getBaseSchema()); } + if (other.hasFunction()) { + mergeFunction(other.getFunction()); + } + if (other.hasIndexSignature()) { + mergeIndexSignature(other.getIndexSignature()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -68519,6 +68711,20 @@ public Builder mergeFrom( bitField0_ |= 0x00008000; break; } // case 130 + case 138: { + input.readMessage( + internalGetFunctionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: { + input.readMessage( + internalGetIndexSignatureFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -68539,7 +68745,7 @@ public Builder mergeFrom( private java.lang.Object type_ = ""; /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68559,7 +68765,7 @@ public java.lang.String getType() { } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68580,7 +68786,7 @@ public java.lang.String getType() { } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68597,7 +68803,7 @@ public Builder setType( } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68611,7 +68817,7 @@ public Builder clearType() { } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -70840,76 +71046,3250 @@ public com.kcl.api.Spec.KclTypeOrBuilder getBaseSchemaOrBuilder() { return baseSchemaBuilder_; } - // @@protoc_insertion_point(builder_scope:com.kcl.api.KclType) - } - - // @@protoc_insertion_point(class_scope:com.kcl.api.KclType) - private static final com.kcl.api.Spec.KclType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.kcl.api.Spec.KclType(); - } - - public static com.kcl.api.Spec.KclType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KclType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + private com.kcl.api.Spec.FunctionType function_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.FunctionType, com.kcl.api.Spec.FunctionType.Builder, com.kcl.api.Spec.FunctionTypeOrBuilder> functionBuilder_; + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return Whether the function field is set. + */ + public boolean hasFunction() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return The function. + */ + public com.kcl.api.Spec.FunctionType getFunction() { + if (functionBuilder_ == null) { + return function_ == null ? com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } else { + return functionBuilder_.getMessage(); } - return builder.buildPartial(); } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.kcl.api.Spec.KclType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DecoratorOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.kcl.api.Decorator) - com.google.protobuf.MessageOrBuilder { + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder setFunction(com.kcl.api.Spec.FunctionType value) { + if (functionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + function_ = value; + } else { + functionBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder setFunction( + com.kcl.api.Spec.FunctionType.Builder builderForValue) { + if (functionBuilder_ == null) { + function_ = builderForValue.build(); + } else { + functionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder mergeFunction(com.kcl.api.Spec.FunctionType value) { + if (functionBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) && + function_ != null && + function_ != com.kcl.api.Spec.FunctionType.getDefaultInstance()) { + getFunctionBuilder().mergeFrom(value); + } else { + function_ = value; + } + } else { + functionBuilder_.mergeFrom(value); + } + if (function_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder clearFunction() { + bitField0_ = (bitField0_ & ~0x00010000); + function_ = null; + if (functionBuilder_ != null) { + functionBuilder_.dispose(); + functionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public com.kcl.api.Spec.FunctionType.Builder getFunctionBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return internalGetFunctionFieldBuilder().getBuilder(); + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public com.kcl.api.Spec.FunctionTypeOrBuilder getFunctionOrBuilder() { + if (functionBuilder_ != null) { + return functionBuilder_.getMessageOrBuilder(); + } else { + return function_ == null ? + com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.FunctionType, com.kcl.api.Spec.FunctionType.Builder, com.kcl.api.Spec.FunctionTypeOrBuilder> + internalGetFunctionFieldBuilder() { + if (functionBuilder_ == null) { + functionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.FunctionType, com.kcl.api.Spec.FunctionType.Builder, com.kcl.api.Spec.FunctionTypeOrBuilder>( + getFunction(), + getParentForChildren(), + isClean()); + function_ = null; + } + return functionBuilder_; + } - /** - *
-     * Name of the decorator.
-     * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Name of the decorator.
-     * 
- * - * string name = 1; + private com.kcl.api.Spec.IndexSignature indexSignature_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.IndexSignature, com.kcl.api.Spec.IndexSignature.Builder, com.kcl.api.Spec.IndexSignatureOrBuilder> indexSignatureBuilder_; + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return Whether the indexSignature field is set. + */ + public boolean hasIndexSignature() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return The indexSignature. + */ + public com.kcl.api.Spec.IndexSignature getIndexSignature() { + if (indexSignatureBuilder_ == null) { + return indexSignature_ == null ? com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } else { + return indexSignatureBuilder_.getMessage(); + } + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder setIndexSignature(com.kcl.api.Spec.IndexSignature value) { + if (indexSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexSignature_ = value; + } else { + indexSignatureBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder setIndexSignature( + com.kcl.api.Spec.IndexSignature.Builder builderForValue) { + if (indexSignatureBuilder_ == null) { + indexSignature_ = builderForValue.build(); + } else { + indexSignatureBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder mergeIndexSignature(com.kcl.api.Spec.IndexSignature value) { + if (indexSignatureBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + indexSignature_ != null && + indexSignature_ != com.kcl.api.Spec.IndexSignature.getDefaultInstance()) { + getIndexSignatureBuilder().mergeFrom(value); + } else { + indexSignature_ = value; + } + } else { + indexSignatureBuilder_.mergeFrom(value); + } + if (indexSignature_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder clearIndexSignature() { + bitField0_ = (bitField0_ & ~0x00020000); + indexSignature_ = null; + if (indexSignatureBuilder_ != null) { + indexSignatureBuilder_.dispose(); + indexSignatureBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public com.kcl.api.Spec.IndexSignature.Builder getIndexSignatureBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return internalGetIndexSignatureFieldBuilder().getBuilder(); + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public com.kcl.api.Spec.IndexSignatureOrBuilder getIndexSignatureOrBuilder() { + if (indexSignatureBuilder_ != null) { + return indexSignatureBuilder_.getMessageOrBuilder(); + } else { + return indexSignature_ == null ? + com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.IndexSignature, com.kcl.api.Spec.IndexSignature.Builder, com.kcl.api.Spec.IndexSignatureOrBuilder> + internalGetIndexSignatureFieldBuilder() { + if (indexSignatureBuilder_ == null) { + indexSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.IndexSignature, com.kcl.api.Spec.IndexSignature.Builder, com.kcl.api.Spec.IndexSignatureOrBuilder>( + getIndexSignature(), + getParentForChildren(), + isClean()); + indexSignature_ = null; + } + return indexSignatureBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.KclType) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.KclType) + private static final com.kcl.api.Spec.KclType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.KclType(); + } + + public static com.kcl.api.Spec.KclType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KclType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.KclType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FunctionTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.FunctionType) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + java.util.List + getParamsList(); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + com.kcl.api.Spec.Parameter getParams(int index); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + int getParamsCount(); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + java.util.List + getParamsOrBuilderList(); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + com.kcl.api.Spec.ParameterOrBuilder getParamsOrBuilder( + int index); + + /** + * .com.kcl.api.KclType return_ty = 2; + * @return Whether the returnTy field is set. + */ + boolean hasReturnTy(); + /** + * .com.kcl.api.KclType return_ty = 2; + * @return The returnTy. + */ + com.kcl.api.Spec.KclType getReturnTy(); + /** + * .com.kcl.api.KclType return_ty = 2; + */ + com.kcl.api.Spec.KclTypeOrBuilder getReturnTyOrBuilder(); + } + /** + * Protobuf type {@code com.kcl.api.FunctionType} + */ + public static final class FunctionType extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.kcl.api.FunctionType) + FunctionTypeOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "FunctionType"); + } + // Use FunctionType.newBuilder() to construct. + private FunctionType(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FunctionType() { + params_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.FunctionType.class, com.kcl.api.Spec.FunctionType.Builder.class); + } + + private int bitField0_; + public static final int PARAMS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List params_; + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public java.util.List getParamsList() { + return params_; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public java.util.List + getParamsOrBuilderList() { + return params_; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public int getParamsCount() { + return params_.size(); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public com.kcl.api.Spec.Parameter getParams(int index) { + return params_.get(index); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public com.kcl.api.Spec.ParameterOrBuilder getParamsOrBuilder( + int index) { + return params_.get(index); + } + + public static final int RETURN_TY_FIELD_NUMBER = 2; + private com.kcl.api.Spec.KclType returnTy_; + /** + * .com.kcl.api.KclType return_ty = 2; + * @return Whether the returnTy field is set. + */ + @java.lang.Override + public boolean hasReturnTy() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .com.kcl.api.KclType return_ty = 2; + * @return The returnTy. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getReturnTy() { + return returnTy_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getReturnTyOrBuilder() { + return returnTy_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < params_.size(); i++) { + output.writeMessage(1, params_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getReturnTy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < params_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, params_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReturnTy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kcl.api.Spec.FunctionType)) { + return super.equals(obj); + } + com.kcl.api.Spec.FunctionType other = (com.kcl.api.Spec.FunctionType) obj; + + if (!getParamsList() + .equals(other.getParamsList())) return false; + if (hasReturnTy() != other.hasReturnTy()) return false; + if (hasReturnTy()) { + if (!getReturnTy() + .equals(other.getReturnTy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getParamsCount() > 0) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getParamsList().hashCode(); + } + if (hasReturnTy()) { + hash = (37 * hash) + RETURN_TY_FIELD_NUMBER; + hash = (53 * hash) + getReturnTy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kcl.api.Spec.FunctionType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.kcl.api.Spec.FunctionType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.kcl.api.Spec.FunctionType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kcl.api.Spec.FunctionType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.kcl.api.FunctionType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.kcl.api.FunctionType) + com.kcl.api.Spec.FunctionTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.FunctionType.class, com.kcl.api.Spec.FunctionType.Builder.class); + } + + // Construct using com.kcl.api.Spec.FunctionType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetParamsFieldBuilder(); + internalGetReturnTyFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (paramsBuilder_ == null) { + params_ = java.util.Collections.emptyList(); + } else { + params_ = null; + paramsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + returnTy_ = null; + if (returnTyBuilder_ != null) { + returnTyBuilder_.dispose(); + returnTyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_descriptor; + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType getDefaultInstanceForType() { + return com.kcl.api.Spec.FunctionType.getDefaultInstance(); + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType build() { + com.kcl.api.Spec.FunctionType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType buildPartial() { + com.kcl.api.Spec.FunctionType result = new com.kcl.api.Spec.FunctionType(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.kcl.api.Spec.FunctionType result) { + if (paramsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + params_ = java.util.Collections.unmodifiableList(params_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.params_ = params_; + } else { + result.params_ = paramsBuilder_.build(); + } + } + + private void buildPartial0(com.kcl.api.Spec.FunctionType result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.returnTy_ = returnTyBuilder_ == null + ? returnTy_ + : returnTyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kcl.api.Spec.FunctionType) { + return mergeFrom((com.kcl.api.Spec.FunctionType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kcl.api.Spec.FunctionType other) { + if (other == com.kcl.api.Spec.FunctionType.getDefaultInstance()) return this; + if (paramsBuilder_ == null) { + if (!other.params_.isEmpty()) { + if (params_.isEmpty()) { + params_ = other.params_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParamsIsMutable(); + params_.addAll(other.params_); + } + onChanged(); + } + } else { + if (!other.params_.isEmpty()) { + if (paramsBuilder_.isEmpty()) { + paramsBuilder_.dispose(); + paramsBuilder_ = null; + params_ = other.params_; + bitField0_ = (bitField0_ & ~0x00000001); + paramsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + internalGetParamsFieldBuilder() : null; + } else { + paramsBuilder_.addAllMessages(other.params_); + } + } + } + if (other.hasReturnTy()) { + mergeReturnTy(other.getReturnTy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.kcl.api.Spec.Parameter m = + input.readMessage( + com.kcl.api.Spec.Parameter.parser(), + extensionRegistry); + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(m); + } else { + paramsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + internalGetReturnTyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List params_ = + java.util.Collections.emptyList(); + private void ensureParamsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + params_ = new java.util.ArrayList(params_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.kcl.api.Spec.Parameter, com.kcl.api.Spec.Parameter.Builder, com.kcl.api.Spec.ParameterOrBuilder> paramsBuilder_; + + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public java.util.List getParamsList() { + if (paramsBuilder_ == null) { + return java.util.Collections.unmodifiableList(params_); + } else { + return paramsBuilder_.getMessageList(); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public int getParamsCount() { + if (paramsBuilder_ == null) { + return params_.size(); + } else { + return paramsBuilder_.getCount(); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter getParams(int index) { + if (paramsBuilder_ == null) { + return params_.get(index); + } else { + return paramsBuilder_.getMessage(index); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder setParams( + int index, com.kcl.api.Spec.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.set(index, value); + onChanged(); + } else { + paramsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder setParams( + int index, com.kcl.api.Spec.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.set(index, builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams(com.kcl.api.Spec.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.add(value); + onChanged(); + } else { + paramsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams( + int index, com.kcl.api.Spec.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.add(index, value); + onChanged(); + } else { + paramsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams( + com.kcl.api.Spec.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams( + int index, com.kcl.api.Spec.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(index, builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addAllParams( + java.lang.Iterable values) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, params_); + onChanged(); + } else { + paramsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder clearParams() { + if (paramsBuilder_ == null) { + params_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + paramsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder removeParams(int index) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.remove(index); + onChanged(); + } else { + paramsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter.Builder getParamsBuilder( + int index) { + return internalGetParamsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.ParameterOrBuilder getParamsOrBuilder( + int index) { + if (paramsBuilder_ == null) { + return params_.get(index); } else { + return paramsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public java.util.List + getParamsOrBuilderList() { + if (paramsBuilder_ != null) { + return paramsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(params_); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter.Builder addParamsBuilder() { + return internalGetParamsFieldBuilder().addBuilder( + com.kcl.api.Spec.Parameter.getDefaultInstance()); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter.Builder addParamsBuilder( + int index) { + return internalGetParamsFieldBuilder().addBuilder( + index, com.kcl.api.Spec.Parameter.getDefaultInstance()); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public java.util.List + getParamsBuilderList() { + return internalGetParamsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.kcl.api.Spec.Parameter, com.kcl.api.Spec.Parameter.Builder, com.kcl.api.Spec.ParameterOrBuilder> + internalGetParamsFieldBuilder() { + if (paramsBuilder_ == null) { + paramsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.kcl.api.Spec.Parameter, com.kcl.api.Spec.Parameter.Builder, com.kcl.api.Spec.ParameterOrBuilder>( + params_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + params_ = null; + } + return paramsBuilder_; + } + + private com.kcl.api.Spec.KclType returnTy_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> returnTyBuilder_; + /** + * .com.kcl.api.KclType return_ty = 2; + * @return Whether the returnTy field is set. + */ + public boolean hasReturnTy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .com.kcl.api.KclType return_ty = 2; + * @return The returnTy. + */ + public com.kcl.api.Spec.KclType getReturnTy() { + if (returnTyBuilder_ == null) { + return returnTy_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } else { + return returnTyBuilder_.getMessage(); + } + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder setReturnTy(com.kcl.api.Spec.KclType value) { + if (returnTyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + returnTy_ = value; + } else { + returnTyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder setReturnTy( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (returnTyBuilder_ == null) { + returnTy_ = builderForValue.build(); + } else { + returnTyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder mergeReturnTy(com.kcl.api.Spec.KclType value) { + if (returnTyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + returnTy_ != null && + returnTy_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getReturnTyBuilder().mergeFrom(value); + } else { + returnTy_ = value; + } + } else { + returnTyBuilder_.mergeFrom(value); + } + if (returnTy_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder clearReturnTy() { + bitField0_ = (bitField0_ & ~0x00000002); + returnTy_ = null; + if (returnTyBuilder_ != null) { + returnTyBuilder_.dispose(); + returnTyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public com.kcl.api.Spec.KclType.Builder getReturnTyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetReturnTyFieldBuilder().getBuilder(); + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getReturnTyOrBuilder() { + if (returnTyBuilder_ != null) { + return returnTyBuilder_.getMessageOrBuilder(); + } else { + return returnTy_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetReturnTyFieldBuilder() { + if (returnTyBuilder_ == null) { + returnTyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getReturnTy(), + getParentForChildren(), + isClean()); + returnTy_ = null; + } + return returnTyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.FunctionType) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.FunctionType) + private static final com.kcl.api.Spec.FunctionType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.FunctionType(); + } + + public static com.kcl.api.Spec.FunctionType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.Parameter) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .com.kcl.api.KclType ty = 2; + * @return Whether the ty field is set. + */ + boolean hasTy(); + /** + * .com.kcl.api.KclType ty = 2; + * @return The ty. + */ + com.kcl.api.Spec.KclType getTy(); + /** + * .com.kcl.api.KclType ty = 2; + */ + com.kcl.api.Spec.KclTypeOrBuilder getTyOrBuilder(); + } + /** + * Protobuf type {@code com.kcl.api.Parameter} + */ + public static final class Parameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.kcl.api.Parameter) + ParameterOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "Parameter"); + } + // Use Parameter.newBuilder() to construct. + private Parameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Parameter() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.Parameter.class, com.kcl.api.Spec.Parameter.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TY_FIELD_NUMBER = 2; + private com.kcl.api.Spec.KclType ty_; + /** + * .com.kcl.api.KclType ty = 2; + * @return Whether the ty field is set. + */ + @java.lang.Override + public boolean hasTy() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .com.kcl.api.KclType ty = 2; + * @return The ty. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getTy() { + return ty_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getTyOrBuilder() { + return ty_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kcl.api.Spec.Parameter)) { + return super.equals(obj); + } + com.kcl.api.Spec.Parameter other = (com.kcl.api.Spec.Parameter) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasTy() != other.hasTy()) return false; + if (hasTy()) { + if (!getTy() + .equals(other.getTy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasTy()) { + hash = (37 * hash) + TY_FIELD_NUMBER; + hash = (53 * hash) + getTy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kcl.api.Spec.Parameter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.Parameter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.Parameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.Parameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.kcl.api.Spec.Parameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.kcl.api.Spec.Parameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kcl.api.Spec.Parameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.kcl.api.Parameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.kcl.api.Parameter) + com.kcl.api.Spec.ParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.Parameter.class, com.kcl.api.Spec.Parameter.Builder.class); + } + + // Construct using com.kcl.api.Spec.Parameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetTyFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + ty_ = null; + if (tyBuilder_ != null) { + tyBuilder_.dispose(); + tyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_descriptor; + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter getDefaultInstanceForType() { + return com.kcl.api.Spec.Parameter.getDefaultInstance(); + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter build() { + com.kcl.api.Spec.Parameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter buildPartial() { + com.kcl.api.Spec.Parameter result = new com.kcl.api.Spec.Parameter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kcl.api.Spec.Parameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ty_ = tyBuilder_ == null + ? ty_ + : tyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kcl.api.Spec.Parameter) { + return mergeFrom((com.kcl.api.Spec.Parameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kcl.api.Spec.Parameter other) { + if (other == com.kcl.api.Spec.Parameter.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTy()) { + mergeTy(other.getTy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + internalGetTyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.kcl.api.Spec.KclType ty_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> tyBuilder_; + /** + * .com.kcl.api.KclType ty = 2; + * @return Whether the ty field is set. + */ + public boolean hasTy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .com.kcl.api.KclType ty = 2; + * @return The ty. + */ + public com.kcl.api.Spec.KclType getTy() { + if (tyBuilder_ == null) { + return ty_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } else { + return tyBuilder_.getMessage(); + } + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder setTy(com.kcl.api.Spec.KclType value) { + if (tyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ty_ = value; + } else { + tyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder setTy( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (tyBuilder_ == null) { + ty_ = builderForValue.build(); + } else { + tyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder mergeTy(com.kcl.api.Spec.KclType value) { + if (tyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + ty_ != null && + ty_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getTyBuilder().mergeFrom(value); + } else { + ty_ = value; + } + } else { + tyBuilder_.mergeFrom(value); + } + if (ty_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder clearTy() { + bitField0_ = (bitField0_ & ~0x00000002); + ty_ = null; + if (tyBuilder_ != null) { + tyBuilder_.dispose(); + tyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public com.kcl.api.Spec.KclType.Builder getTyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTyFieldBuilder().getBuilder(); + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getTyOrBuilder() { + if (tyBuilder_ != null) { + return tyBuilder_.getMessageOrBuilder(); + } else { + return ty_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } + } + /** + * .com.kcl.api.KclType ty = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetTyFieldBuilder() { + if (tyBuilder_ == null) { + tyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getTy(), + getParentForChildren(), + isClean()); + ty_ = null; + } + return tyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.Parameter) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.Parameter) + private static final com.kcl.api.Spec.Parameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.Parameter(); + } + + public static com.kcl.api.Spec.Parameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IndexSignatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.IndexSignature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return Whether the keyName field is set. + */ + boolean hasKeyName(); + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The keyName. + */ + java.lang.String getKeyName(); + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The bytes for keyName. + */ + com.google.protobuf.ByteString + getKeyNameBytes(); + + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return Whether the key field is set. + */ + boolean hasKey(); + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return The key. + */ + com.kcl.api.Spec.KclType getKey(); + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + */ + com.kcl.api.Spec.KclTypeOrBuilder getKeyOrBuilder(); + + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return The val. + */ + com.kcl.api.Spec.KclType getVal(); + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + */ + com.kcl.api.Spec.KclTypeOrBuilder getValOrBuilder(); + + /** + * bool any_other = 4; + * @return The anyOther. + */ + boolean getAnyOther(); + } + /** + *
+   * Message representing an index signature in KCL.
+   * 
+ * + * Protobuf type {@code com.kcl.api.IndexSignature} + */ + public static final class IndexSignature extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.kcl.api.IndexSignature) + IndexSignatureOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "IndexSignature"); + } + // Use IndexSignature.newBuilder() to construct. + private IndexSignature(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private IndexSignature() { + keyName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.IndexSignature.class, com.kcl.api.Spec.IndexSignature.Builder.class); + } + + private int bitField0_; + public static final int KEY_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object keyName_ = ""; + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return Whether the keyName field is set. + */ + @java.lang.Override + public boolean hasKeyName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The keyName. + */ + @java.lang.Override + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } + } + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The bytes for keyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + private com.kcl.api.Spec.KclType key_; + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return The key. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getKey() { + return key_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getKeyOrBuilder() { + return key_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } + + public static final int VAL_FIELD_NUMBER = 3; + private com.kcl.api.Spec.KclType val_; + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return The val. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getVal() { + return val_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getValOrBuilder() { + return val_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } + + public static final int ANY_OTHER_FIELD_NUMBER = 4; + private boolean anyOther_ = false; + /** + * bool any_other = 4; + * @return The anyOther. + */ + @java.lang.Override + public boolean getAnyOther() { + return anyOther_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, keyName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getKey()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getVal()); + } + if (anyOther_ != false) { + output.writeBool(4, anyOther_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, keyName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getKey()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getVal()); + } + if (anyOther_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, anyOther_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kcl.api.Spec.IndexSignature)) { + return super.equals(obj); + } + com.kcl.api.Spec.IndexSignature other = (com.kcl.api.Spec.IndexSignature) obj; + + if (hasKeyName() != other.hasKeyName()) return false; + if (hasKeyName()) { + if (!getKeyName() + .equals(other.getKeyName())) return false; + } + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey() + .equals(other.getKey())) return false; + } + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (getAnyOther() + != other.getAnyOther()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeyName()) { + hash = (37 * hash) + KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKeyName().hashCode(); + } + if (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (37 * hash) + ANY_OTHER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAnyOther()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kcl.api.Spec.IndexSignature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.kcl.api.Spec.IndexSignature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.kcl.api.Spec.IndexSignature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kcl.api.Spec.IndexSignature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message representing an index signature in KCL.
+     * 
+ * + * Protobuf type {@code com.kcl.api.IndexSignature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.kcl.api.IndexSignature) + com.kcl.api.Spec.IndexSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.IndexSignature.class, com.kcl.api.Spec.IndexSignature.Builder.class); + } + + // Construct using com.kcl.api.Spec.IndexSignature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetKeyFieldBuilder(); + internalGetValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyName_ = ""; + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + anyOther_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_descriptor; + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature getDefaultInstanceForType() { + return com.kcl.api.Spec.IndexSignature.getDefaultInstance(); + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature build() { + com.kcl.api.Spec.IndexSignature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature buildPartial() { + com.kcl.api.Spec.IndexSignature result = new com.kcl.api.Spec.IndexSignature(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kcl.api.Spec.IndexSignature result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyName_ = keyName_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = keyBuilder_ == null + ? key_ + : keyBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.anyOther_ = anyOther_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kcl.api.Spec.IndexSignature) { + return mergeFrom((com.kcl.api.Spec.IndexSignature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kcl.api.Spec.IndexSignature other) { + if (other == com.kcl.api.Spec.IndexSignature.getDefaultInstance()) return this; + if (other.hasKeyName()) { + keyName_ = other.keyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasKey()) { + mergeKey(other.getKey()); + } + if (other.hasVal()) { + mergeVal(other.getVal()); + } + if (other.getAnyOther() != false) { + setAnyOther(other.getAnyOther()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + keyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + internalGetKeyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + internalGetValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + anyOther_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object keyName_ = ""; + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return Whether the keyName field is set. + */ + public boolean hasKeyName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return The keyName. + */ + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return The bytes for keyName. + */ + public com.google.protobuf.ByteString + getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @param value The keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return This builder for chaining. + */ + public Builder clearKeyName() { + keyName_ = getDefaultInstance().getKeyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @param value The bytes for keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.kcl.api.Spec.KclType key_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> keyBuilder_; + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + * @return The key. + */ + public com.kcl.api.Spec.KclType getKey() { + if (keyBuilder_ == null) { + return key_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } else { + return keyBuilder_.getMessage(); + } + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder setKey(com.kcl.api.Spec.KclType value) { + if (keyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + } else { + keyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder setKey( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (keyBuilder_ == null) { + key_ = builderForValue.build(); + } else { + keyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder mergeKey(com.kcl.api.Spec.KclType value) { + if (keyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + key_ != null && + key_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getKeyBuilder().mergeFrom(value); + } else { + key_ = value; + } + } else { + keyBuilder_.mergeFrom(value); + } + if (key_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000002); + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public com.kcl.api.Spec.KclType.Builder getKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetKeyFieldBuilder().getBuilder(); + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getKeyOrBuilder() { + if (keyBuilder_ != null) { + return keyBuilder_.getMessageOrBuilder(); + } else { + return key_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetKeyFieldBuilder() { + if (keyBuilder_ == null) { + keyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getKey(), + getParentForChildren(), + isClean()); + key_ = null; + } + return keyBuilder_; + } + + private com.kcl.api.Spec.KclType val_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> valBuilder_; + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + * @return The val. + */ + public com.kcl.api.Spec.KclType getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder setVal(com.kcl.api.Spec.KclType value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder setVal( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder mergeVal(com.kcl.api.Spec.KclType value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + val_ != null && + val_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000004); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public com.kcl.api.Spec.KclType.Builder getValBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetValFieldBuilder().getBuilder(); + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + private boolean anyOther_ ; + /** + * bool any_other = 4; + * @return The anyOther. + */ + @java.lang.Override + public boolean getAnyOther() { + return anyOther_; + } + /** + * bool any_other = 4; + * @param value The anyOther to set. + * @return This builder for chaining. + */ + public Builder setAnyOther(boolean value) { + + anyOther_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool any_other = 4; + * @return This builder for chaining. + */ + public Builder clearAnyOther() { + bitField0_ = (bitField0_ & ~0x00000008); + anyOther_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.IndexSignature) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.IndexSignature) + private static final com.kcl.api.Spec.IndexSignature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.IndexSignature(); + } + + public static com.kcl.api.Spec.IndexSignature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DecoratorOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.Decorator) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the decorator.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the decorator.
+     * 
+ * + * string name = 1; * @return The bytes for name. */ com.google.protobuf.ByteString @@ -73411,6 +76791,21 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_kcl_api_KclType_ExamplesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_kcl_api_FunctionType_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_kcl_api_FunctionType_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_kcl_api_Parameter_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_kcl_api_Parameter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_kcl_api_IndexSignature_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_kcl_api_IndexSignature_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_kcl_api_Decorator_descriptor; private static final @@ -73607,7 +77002,7 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { "dateDependenciesArgs\022\025\n\rmanifest_path\030\001 " + "\001(\t\022\016\n\006vendor\030\002 \001(\010\"K\n\030UpdateDependencie" + "sResult\022/\n\rexternal_pkgs\030\003 \003(\0132\030.com.kcl" + - ".api.ExternalPkg\"\363\004\n\007KclType\022\014\n\004type\030\001 \001" + + ".api.ExternalPkg\"\201\006\n\007KclType\022\014\n\004type\030\001 \001" + "(\t\022)\n\013union_types\030\002 \003(\0132\024.com.kcl.api.Kc" + "lType\022\017\n\007default\030\003 \001(\t\022\023\n\013schema_name\030\004 " + "\001(\t\022\022\n\nschema_doc\030\005 \001(\t\0228\n\nproperties\030\006 " + @@ -73619,63 +77014,74 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { "\030\014 \001(\t\022\020\n\010pkg_path\030\r \001(\t\022\023\n\013description\030" + "\016 \001(\t\0224\n\010examples\030\017 \003(\0132\".com.kcl.api.Kc" + "lType.ExamplesEntry\022)\n\013base_schema\030\020 \001(\013" + - "2\024.com.kcl.api.KclType\032G\n\017PropertiesEntr" + - "y\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.com.kcl." + - "api.KclType:\0028\001\032E\n\rExamplesEntry\022\013\n\003key\030" + - "\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.com.kcl.api.Examp" + - "le:\0028\001\"\225\001\n\tDecorator\022\014\n\004name\030\001 \001(\t\022\021\n\tar" + - "guments\030\002 \003(\t\0226\n\010keywords\030\003 \003(\0132$.com.kc" + - "l.api.Decorator.KeywordsEntry\032/\n\rKeyword" + - "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\">" + - "\n\007Example\022\017\n\007summary\030\001 \001(\t\022\023\n\013descriptio" + - "n\030\002 \001(\t\022\r\n\005value\030\003 \001(\t2\222\001\n\016BuiltinServic" + - "e\0226\n\004Ping\022\025.com.kcl.api.PingArgs\032\027.com.k" + - "cl.api.PingResult\022H\n\nListMethod\022\033.com.kc" + - "l.api.ListMethodArgs\032\035.com.kcl.api.ListM" + - "ethodResult2\260\r\n\nKclService\0226\n\004Ping\022\025.com" + - ".kcl.api.PingArgs\032\027.com.kcl.api.PingResu" + - "lt\022H\n\nGetVersion\022\033.com.kcl.api.GetVersio" + - "nArgs\032\035.com.kcl.api.GetVersionResult\022N\n\014" + - "ParseProgram\022\035.com.kcl.api.ParseProgramA" + - "rgs\032\037.com.kcl.api.ParseProgramResult\022E\n\t" + - "ParseFile\022\032.com.kcl.api.ParseFileArgs\032\034." + - "com.kcl.api.ParseFileResult\022K\n\013LoadPacka" + - "ge\022\034.com.kcl.api.LoadPackageArgs\032\036.com.k" + - "cl.api.LoadPackageResult\022L\n\013ListOptions\022" + - "\035.com.kcl.api.ParseProgramArgs\032\036.com.kcl" + - ".api.ListOptionsResult\022Q\n\rListVariables\022" + - "\036.com.kcl.api.ListVariablesArgs\032 .com.kc" + - "l.api.ListVariablesResult\022K\n\013ExecProgram" + - "\022\034.com.kcl.api.ExecProgramArgs\032\036.com.kcl" + - ".api.ExecProgramResult\022N\n\014BuildProgram\022\035" + - ".com.kcl.api.BuildProgramArgs\032\037.com.kcl." + - "api.BuildProgramResult\022M\n\014ExecArtifact\022\035" + - ".com.kcl.api.ExecArtifactArgs\032\036.com.kcl." + - "api.ExecProgramResult\022N\n\014OverrideFile\022\035." + - "com.kcl.api.OverrideFileArgs\032\037.com.kcl.a" + - "pi.OverrideFileResult\022f\n\024GetSchemaTypeMa" + - "pping\022%.com.kcl.api.GetSchemaTypeMapping" + - "Args\032\'.com.kcl.api.GetSchemaTypeMappingR" + - "esult\022H\n\nFormatCode\022\033.com.kcl.api.Format" + - "CodeArgs\032\035.com.kcl.api.FormatCodeResult\022" + - "H\n\nFormatPath\022\033.com.kcl.api.FormatPathAr" + - "gs\032\035.com.kcl.api.FormatPathResult\022B\n\010Lin" + - "tPath\022\031.com.kcl.api.LintPathArgs\032\033.com.k" + - "cl.api.LintPathResult\022N\n\014ValidateCode\022\035." + - "com.kcl.api.ValidateCodeArgs\032\037.com.kcl.a" + - "pi.ValidateCodeResult\022N\n\014ListDepFiles\022\035." + - "com.kcl.api.ListDepFilesArgs\032\037.com.kcl.a" + - "pi.ListDepFilesResult\022]\n\021LoadSettingsFil" + - "es\022\".com.kcl.api.LoadSettingsFilesArgs\032$" + - ".com.kcl.api.LoadSettingsFilesResult\022<\n\006" + - "Rename\022\027.com.kcl.api.RenameArgs\032\031.com.kc" + - "l.api.RenameResult\022H\n\nRenameCode\022\033.com.k" + - "cl.api.RenameCodeArgs\032\035.com.kcl.api.Rena" + - "meCodeResult\0226\n\004Test\022\025.com.kcl.api.TestA" + - "rgs\032\027.com.kcl.api.TestResult\022`\n\022UpdateDe" + - "pendencies\022#.com.kcl.api.UpdateDependenc" + - "iesArgs\032%.com.kcl.api.UpdateDependencies" + - "ResultB\024Z\005.;api\252\002\nKclLib.APIb\006proto3" + "2\024.com.kcl.api.KclType\0220\n\010function\030\021 \001(\013" + + "2\031.com.kcl.api.FunctionTypeH\000\210\001\001\0229\n\017inde" + + "x_signature\030\022 \001(\0132\033.com.kcl.api.IndexSig" + + "natureH\001\210\001\001\032G\n\017PropertiesEntry\022\013\n\003key\030\001 " + + "\001(\t\022#\n\005value\030\002 \001(\0132\024.com.kcl.api.KclType" + + ":\0028\001\032E\n\rExamplesEntry\022\013\n\003key\030\001 \001(\t\022#\n\005va" + + "lue\030\002 \001(\0132\024.com.kcl.api.Example:\0028\001B\013\n\t_" + + "functionB\022\n\020_index_signature\"_\n\014Function" + + "Type\022&\n\006params\030\001 \003(\0132\026.com.kcl.api.Param" + + "eter\022\'\n\treturn_ty\030\002 \001(\0132\024.com.kcl.api.Kc" + + "lType\";\n\tParameter\022\014\n\004name\030\001 \001(\t\022 \n\002ty\030\002" + + " \001(\0132\024.com.kcl.api.KclType\"\215\001\n\016IndexSign" + + "ature\022\025\n\010key_name\030\001 \001(\tH\000\210\001\001\022!\n\003key\030\002 \001(" + + "\0132\024.com.kcl.api.KclType\022!\n\003val\030\003 \001(\0132\024.c" + + "om.kcl.api.KclType\022\021\n\tany_other\030\004 \001(\010B\013\n" + + "\t_key_name\"\225\001\n\tDecorator\022\014\n\004name\030\001 \001(\t\022\021" + + "\n\targuments\030\002 \003(\t\0226\n\010keywords\030\003 \003(\0132$.co" + + "m.kcl.api.Decorator.KeywordsEntry\032/\n\rKey" + + "wordsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\">\n\007Example\022\017\n\007summary\030\001 \001(\t\022\023\n\013descri" + + "ption\030\002 \001(\t\022\r\n\005value\030\003 \001(\t2\222\001\n\016BuiltinSe" + + "rvice\0226\n\004Ping\022\025.com.kcl.api.PingArgs\032\027.c" + + "om.kcl.api.PingResult\022H\n\nListMethod\022\033.co" + + "m.kcl.api.ListMethodArgs\032\035.com.kcl.api.L" + + "istMethodResult2\260\r\n\nKclService\0226\n\004Ping\022\025" + + ".com.kcl.api.PingArgs\032\027.com.kcl.api.Ping" + + "Result\022H\n\nGetVersion\022\033.com.kcl.api.GetVe" + + "rsionArgs\032\035.com.kcl.api.GetVersionResult" + + "\022N\n\014ParseProgram\022\035.com.kcl.api.ParseProg" + + "ramArgs\032\037.com.kcl.api.ParseProgramResult" + + "\022E\n\tParseFile\022\032.com.kcl.api.ParseFileArg" + + "s\032\034.com.kcl.api.ParseFileResult\022K\n\013LoadP" + + "ackage\022\034.com.kcl.api.LoadPackageArgs\032\036.c" + + "om.kcl.api.LoadPackageResult\022L\n\013ListOpti" + + "ons\022\035.com.kcl.api.ParseProgramArgs\032\036.com" + + ".kcl.api.ListOptionsResult\022Q\n\rListVariab" + + "les\022\036.com.kcl.api.ListVariablesArgs\032 .co" + + "m.kcl.api.ListVariablesResult\022K\n\013ExecPro" + + "gram\022\034.com.kcl.api.ExecProgramArgs\032\036.com" + + ".kcl.api.ExecProgramResult\022N\n\014BuildProgr" + + "am\022\035.com.kcl.api.BuildProgramArgs\032\037.com." + + "kcl.api.BuildProgramResult\022M\n\014ExecArtifa" + + "ct\022\035.com.kcl.api.ExecArtifactArgs\032\036.com." + + "kcl.api.ExecProgramResult\022N\n\014OverrideFil" + + "e\022\035.com.kcl.api.OverrideFileArgs\032\037.com.k" + + "cl.api.OverrideFileResult\022f\n\024GetSchemaTy" + + "peMapping\022%.com.kcl.api.GetSchemaTypeMap" + + "pingArgs\032\'.com.kcl.api.GetSchemaTypeMapp" + + "ingResult\022H\n\nFormatCode\022\033.com.kcl.api.Fo" + + "rmatCodeArgs\032\035.com.kcl.api.FormatCodeRes" + + "ult\022H\n\nFormatPath\022\033.com.kcl.api.FormatPa" + + "thArgs\032\035.com.kcl.api.FormatPathResult\022B\n" + + "\010LintPath\022\031.com.kcl.api.LintPathArgs\032\033.c" + + "om.kcl.api.LintPathResult\022N\n\014ValidateCod" + + "e\022\035.com.kcl.api.ValidateCodeArgs\032\037.com.k" + + "cl.api.ValidateCodeResult\022N\n\014ListDepFile" + + "s\022\035.com.kcl.api.ListDepFilesArgs\032\037.com.k" + + "cl.api.ListDepFilesResult\022]\n\021LoadSetting" + + "sFiles\022\".com.kcl.api.LoadSettingsFilesAr" + + "gs\032$.com.kcl.api.LoadSettingsFilesResult" + + "\022<\n\006Rename\022\027.com.kcl.api.RenameArgs\032\031.co" + + "m.kcl.api.RenameResult\022H\n\nRenameCode\022\033.c" + + "om.kcl.api.RenameCodeArgs\032\035.com.kcl.api." + + "RenameCodeResult\0226\n\004Test\022\025.com.kcl.api.T" + + "estArgs\032\027.com.kcl.api.TestResult\022`\n\022Upda" + + "teDependencies\022#.com.kcl.api.UpdateDepen" + + "denciesArgs\032%.com.kcl.api.UpdateDependen" + + "ciesResultB\024Z\005.;api\252\002\nKclLib.APIb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -74130,7 +77536,7 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { internal_static_com_kcl_api_KclType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_KclType_descriptor, - new java.lang.String[] { "Type", "UnionTypes", "Default", "SchemaName", "SchemaDoc", "Properties", "Required", "Key", "Item", "Line", "Decorators", "Filename", "PkgPath", "Description", "Examples", "BaseSchema", }); + new java.lang.String[] { "Type", "UnionTypes", "Default", "SchemaName", "SchemaDoc", "Properties", "Required", "Key", "Item", "Line", "Decorators", "Filename", "PkgPath", "Description", "Examples", "BaseSchema", "Function", "IndexSignature", }); internal_static_com_kcl_api_KclType_PropertiesEntry_descriptor = internal_static_com_kcl_api_KclType_descriptor.getNestedType(0); internal_static_com_kcl_api_KclType_PropertiesEntry_fieldAccessorTable = new @@ -74143,8 +77549,26 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_KclType_ExamplesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); - internal_static_com_kcl_api_Decorator_descriptor = + internal_static_com_kcl_api_FunctionType_descriptor = getDescriptor().getMessageType(64); + internal_static_com_kcl_api_FunctionType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_kcl_api_FunctionType_descriptor, + new java.lang.String[] { "Params", "ReturnTy", }); + internal_static_com_kcl_api_Parameter_descriptor = + getDescriptor().getMessageType(65); + internal_static_com_kcl_api_Parameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_kcl_api_Parameter_descriptor, + new java.lang.String[] { "Name", "Ty", }); + internal_static_com_kcl_api_IndexSignature_descriptor = + getDescriptor().getMessageType(66); + internal_static_com_kcl_api_IndexSignature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_kcl_api_IndexSignature_descriptor, + new java.lang.String[] { "KeyName", "Key", "Val", "AnyOther", }); + internal_static_com_kcl_api_Decorator_descriptor = + getDescriptor().getMessageType(67); internal_static_com_kcl_api_Decorator_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_Decorator_descriptor, @@ -74156,7 +77580,7 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { internal_static_com_kcl_api_Decorator_KeywordsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_com_kcl_api_Example_descriptor = - getDescriptor().getMessageType(65); + getDescriptor().getMessageType(68); internal_static_com_kcl_api_Example_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_Example_descriptor, diff --git a/kotlin/Cargo.toml b/kotlin/Cargo.toml index 0bf7d1b9..50d7aefe 100644 --- a/kotlin/Cargo.toml +++ b/kotlin/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kcl-lib-jni" publish = false -version = "0.12.1" +version = "0.12.2" edition = "2024" [lib] @@ -19,6 +19,6 @@ lazy_static = "1.4.0" prost = "0.14.1" prost-types = "0.14.1" -kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-parser = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-sema = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } diff --git a/kotlin/README.md b/kotlin/README.md index f340bf47..fd39c95f 100644 --- a/kotlin/README.md +++ b/kotlin/README.md @@ -26,7 +26,7 @@ This way you'll be able to import the above dependency to use the SDK. com.kcl kcl-lib-kotlin - 0.12.1 + 0.12.2 ``` diff --git a/kotlin/pom.xml b/kotlin/pom.xml index 0bb7f9a9..f361f9b8 100644 --- a/kotlin/pom.xml +++ b/kotlin/pom.xml @@ -5,7 +5,7 @@ com.kcl kcl-lib-kotlin - 0.12.1 + 0.12.2 KCL Arifact Library for Kotlin KCL is an open-source constraint-based record and functional language mainly diff --git a/kotlin/src/main/java/com/kcl/api/Spec.java b/kotlin/src/main/java/com/kcl/api/Spec.java index 764f372e..a460629e 100644 --- a/kotlin/src/main/java/com/kcl/api/Spec.java +++ b/kotlin/src/main/java/com/kcl/api/Spec.java @@ -66311,7 +66311,7 @@ public interface KclTypeOrBuilder extends /** *
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -66320,7 +66320,7 @@ public interface KclTypeOrBuilder extends java.lang.String getType(); /** *
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -66776,6 +66776,60 @@ com.kcl.api.Spec.Example getExamplesOrThrow( * .com.kcl.api.KclType base_schema = 16; */ com.kcl.api.Spec.KclTypeOrBuilder getBaseSchemaOrBuilder(); + + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return Whether the function field is set. + */ + boolean hasFunction(); + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return The function. + */ + com.kcl.api.Spec.FunctionType getFunction(); + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + com.kcl.api.Spec.FunctionTypeOrBuilder getFunctionOrBuilder(); + + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return Whether the indexSignature field is set. + */ + boolean hasIndexSignature(); + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return The indexSignature. + */ + com.kcl.api.Spec.IndexSignature getIndexSignature(); + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + com.kcl.api.Spec.IndexSignatureOrBuilder getIndexSignatureOrBuilder(); } /** *
@@ -66849,7 +66903,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl
     private volatile java.lang.Object type_ = "";
     /**
      * 
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -66870,7 +66924,7 @@ public java.lang.String getType() { } /** *
-     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+     * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
      * 
* * string type = 1; @@ -67667,6 +67721,82 @@ public com.kcl.api.Spec.KclTypeOrBuilder getBaseSchemaOrBuilder() { return baseSchema_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : baseSchema_; } + public static final int FUNCTION_FIELD_NUMBER = 17; + private com.kcl.api.Spec.FunctionType function_; + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return Whether the function field is set. + */ + @java.lang.Override + public boolean hasFunction() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return The function. + */ + @java.lang.Override + public com.kcl.api.Spec.FunctionType getFunction() { + return function_ == null ? com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } + /** + *
+     * Function type if the KclType is a function.
+     * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + @java.lang.Override + public com.kcl.api.Spec.FunctionTypeOrBuilder getFunctionOrBuilder() { + return function_ == null ? com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } + + public static final int INDEX_SIGNATURE_FIELD_NUMBER = 18; + private com.kcl.api.Spec.IndexSignature indexSignature_; + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return Whether the indexSignature field is set. + */ + @java.lang.Override + public boolean hasIndexSignature() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return The indexSignature. + */ + @java.lang.Override + public com.kcl.api.Spec.IndexSignature getIndexSignature() { + return indexSignature_ == null ? com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } + /** + *
+     * Optional schema index signature
+     * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + @java.lang.Override + public com.kcl.api.Spec.IndexSignatureOrBuilder getIndexSignatureOrBuilder() { + return indexSignature_ == null ? com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -67735,6 +67865,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(16, getBaseSchema()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(17, getFunction()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getIndexSignature()); + } getUnknownFields().writeTo(output); } @@ -67817,6 +67953,14 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(16, getBaseSchema()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getFunction()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getIndexSignature()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -67873,6 +68017,16 @@ public boolean equals(final java.lang.Object obj) { if (!getBaseSchema() .equals(other.getBaseSchema())) return false; } + if (hasFunction() != other.hasFunction()) return false; + if (hasFunction()) { + if (!getFunction() + .equals(other.getFunction())) return false; + } + if (hasIndexSignature() != other.hasIndexSignature()) return false; + if (hasIndexSignature()) { + if (!getIndexSignature() + .equals(other.getIndexSignature())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -67932,6 +68086,14 @@ public int hashCode() { hash = (37 * hash) + BASE_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getBaseSchema().hashCode(); } + if (hasFunction()) { + hash = (37 * hash) + FUNCTION_FIELD_NUMBER; + hash = (53 * hash) + getFunction().hashCode(); + } + if (hasIndexSignature()) { + hash = (37 * hash) + INDEX_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getIndexSignature().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -68097,6 +68259,8 @@ private void maybeForceBuilderInitialization() { internalGetItemFieldBuilder(); internalGetDecoratorsFieldBuilder(); internalGetBaseSchemaFieldBuilder(); + internalGetFunctionFieldBuilder(); + internalGetIndexSignatureFieldBuilder(); } } @java.lang.Override @@ -68144,6 +68308,16 @@ public Builder clear() { baseSchemaBuilder_.dispose(); baseSchemaBuilder_ = null; } + function_ = null; + if (functionBuilder_ != null) { + functionBuilder_.dispose(); + functionBuilder_ = null; + } + indexSignature_ = null; + if (indexSignatureBuilder_ != null) { + indexSignatureBuilder_.dispose(); + indexSignatureBuilder_ = null; + } return this; } @@ -68252,6 +68426,18 @@ private void buildPartial0(com.kcl.api.Spec.KclType result) { : baseSchemaBuilder_.build(); to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.function_ = functionBuilder_ == null + ? function_ + : functionBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.indexSignature_ = indexSignatureBuilder_ == null + ? indexSignature_ + : indexSignatureBuilder_.build(); + to_bitField0_ |= 0x00000010; + } result.bitField0_ |= to_bitField0_; } @@ -68382,6 +68568,12 @@ public Builder mergeFrom(com.kcl.api.Spec.KclType other) { if (other.hasBaseSchema()) { mergeBaseSchema(other.getBaseSchema()); } + if (other.hasFunction()) { + mergeFunction(other.getFunction()); + } + if (other.hasIndexSignature()) { + mergeIndexSignature(other.getIndexSignature()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -68519,6 +68711,20 @@ public Builder mergeFrom( bitField0_ |= 0x00008000; break; } // case 130 + case 138: { + input.readMessage( + internalGetFunctionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: { + input.readMessage( + internalGetIndexSignatureFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -68539,7 +68745,7 @@ public Builder mergeFrom( private java.lang.Object type_ = ""; /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68559,7 +68765,7 @@ public java.lang.String getType() { } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68580,7 +68786,7 @@ public java.lang.String getType() { } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68597,7 +68803,7 @@ public Builder setType( } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -68611,7 +68817,7 @@ public Builder clearType() { } /** *
-       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier).
+       * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier).
        * 
* * string type = 1; @@ -70840,76 +71046,3250 @@ public com.kcl.api.Spec.KclTypeOrBuilder getBaseSchemaOrBuilder() { return baseSchemaBuilder_; } - // @@protoc_insertion_point(builder_scope:com.kcl.api.KclType) - } - - // @@protoc_insertion_point(class_scope:com.kcl.api.KclType) - private static final com.kcl.api.Spec.KclType DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.kcl.api.Spec.KclType(); - } - - public static com.kcl.api.Spec.KclType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public KclType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + private com.kcl.api.Spec.FunctionType function_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.FunctionType, com.kcl.api.Spec.FunctionType.Builder, com.kcl.api.Spec.FunctionTypeOrBuilder> functionBuilder_; + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return Whether the function field is set. + */ + public boolean hasFunction() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + * @return The function. + */ + public com.kcl.api.Spec.FunctionType getFunction() { + if (functionBuilder_ == null) { + return function_ == null ? com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } else { + return functionBuilder_.getMessage(); } - return builder.buildPartial(); } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.kcl.api.Spec.KclType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DecoratorOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.kcl.api.Decorator) - com.google.protobuf.MessageOrBuilder { + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder setFunction(com.kcl.api.Spec.FunctionType value) { + if (functionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + function_ = value; + } else { + functionBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder setFunction( + com.kcl.api.Spec.FunctionType.Builder builderForValue) { + if (functionBuilder_ == null) { + function_ = builderForValue.build(); + } else { + functionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder mergeFunction(com.kcl.api.Spec.FunctionType value) { + if (functionBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) && + function_ != null && + function_ != com.kcl.api.Spec.FunctionType.getDefaultInstance()) { + getFunctionBuilder().mergeFrom(value); + } else { + function_ = value; + } + } else { + functionBuilder_.mergeFrom(value); + } + if (function_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public Builder clearFunction() { + bitField0_ = (bitField0_ & ~0x00010000); + function_ = null; + if (functionBuilder_ != null) { + functionBuilder_.dispose(); + functionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public com.kcl.api.Spec.FunctionType.Builder getFunctionBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return internalGetFunctionFieldBuilder().getBuilder(); + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + public com.kcl.api.Spec.FunctionTypeOrBuilder getFunctionOrBuilder() { + if (functionBuilder_ != null) { + return functionBuilder_.getMessageOrBuilder(); + } else { + return function_ == null ? + com.kcl.api.Spec.FunctionType.getDefaultInstance() : function_; + } + } + /** + *
+       * Function type if the KclType is a function.
+       * 
+ * + * optional .com.kcl.api.FunctionType function = 17; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.FunctionType, com.kcl.api.Spec.FunctionType.Builder, com.kcl.api.Spec.FunctionTypeOrBuilder> + internalGetFunctionFieldBuilder() { + if (functionBuilder_ == null) { + functionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.FunctionType, com.kcl.api.Spec.FunctionType.Builder, com.kcl.api.Spec.FunctionTypeOrBuilder>( + getFunction(), + getParentForChildren(), + isClean()); + function_ = null; + } + return functionBuilder_; + } - /** - *
-     * Name of the decorator.
-     * 
- * - * string name = 1; - * @return The name. - */ - java.lang.String getName(); - /** - *
-     * Name of the decorator.
-     * 
- * - * string name = 1; + private com.kcl.api.Spec.IndexSignature indexSignature_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.IndexSignature, com.kcl.api.Spec.IndexSignature.Builder, com.kcl.api.Spec.IndexSignatureOrBuilder> indexSignatureBuilder_; + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return Whether the indexSignature field is set. + */ + public boolean hasIndexSignature() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + * @return The indexSignature. + */ + public com.kcl.api.Spec.IndexSignature getIndexSignature() { + if (indexSignatureBuilder_ == null) { + return indexSignature_ == null ? com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } else { + return indexSignatureBuilder_.getMessage(); + } + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder setIndexSignature(com.kcl.api.Spec.IndexSignature value) { + if (indexSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexSignature_ = value; + } else { + indexSignatureBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder setIndexSignature( + com.kcl.api.Spec.IndexSignature.Builder builderForValue) { + if (indexSignatureBuilder_ == null) { + indexSignature_ = builderForValue.build(); + } else { + indexSignatureBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder mergeIndexSignature(com.kcl.api.Spec.IndexSignature value) { + if (indexSignatureBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + indexSignature_ != null && + indexSignature_ != com.kcl.api.Spec.IndexSignature.getDefaultInstance()) { + getIndexSignatureBuilder().mergeFrom(value); + } else { + indexSignature_ = value; + } + } else { + indexSignatureBuilder_.mergeFrom(value); + } + if (indexSignature_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public Builder clearIndexSignature() { + bitField0_ = (bitField0_ & ~0x00020000); + indexSignature_ = null; + if (indexSignatureBuilder_ != null) { + indexSignatureBuilder_.dispose(); + indexSignatureBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public com.kcl.api.Spec.IndexSignature.Builder getIndexSignatureBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return internalGetIndexSignatureFieldBuilder().getBuilder(); + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + public com.kcl.api.Spec.IndexSignatureOrBuilder getIndexSignatureOrBuilder() { + if (indexSignatureBuilder_ != null) { + return indexSignatureBuilder_.getMessageOrBuilder(); + } else { + return indexSignature_ == null ? + com.kcl.api.Spec.IndexSignature.getDefaultInstance() : indexSignature_; + } + } + /** + *
+       * Optional schema index signature
+       * 
+ * + * optional .com.kcl.api.IndexSignature index_signature = 18; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.IndexSignature, com.kcl.api.Spec.IndexSignature.Builder, com.kcl.api.Spec.IndexSignatureOrBuilder> + internalGetIndexSignatureFieldBuilder() { + if (indexSignatureBuilder_ == null) { + indexSignatureBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.IndexSignature, com.kcl.api.Spec.IndexSignature.Builder, com.kcl.api.Spec.IndexSignatureOrBuilder>( + getIndexSignature(), + getParentForChildren(), + isClean()); + indexSignature_ = null; + } + return indexSignatureBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.KclType) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.KclType) + private static final com.kcl.api.Spec.KclType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.KclType(); + } + + public static com.kcl.api.Spec.KclType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KclType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.KclType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FunctionTypeOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.FunctionType) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + java.util.List + getParamsList(); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + com.kcl.api.Spec.Parameter getParams(int index); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + int getParamsCount(); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + java.util.List + getParamsOrBuilderList(); + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + com.kcl.api.Spec.ParameterOrBuilder getParamsOrBuilder( + int index); + + /** + * .com.kcl.api.KclType return_ty = 2; + * @return Whether the returnTy field is set. + */ + boolean hasReturnTy(); + /** + * .com.kcl.api.KclType return_ty = 2; + * @return The returnTy. + */ + com.kcl.api.Spec.KclType getReturnTy(); + /** + * .com.kcl.api.KclType return_ty = 2; + */ + com.kcl.api.Spec.KclTypeOrBuilder getReturnTyOrBuilder(); + } + /** + * Protobuf type {@code com.kcl.api.FunctionType} + */ + public static final class FunctionType extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.kcl.api.FunctionType) + FunctionTypeOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "FunctionType"); + } + // Use FunctionType.newBuilder() to construct. + private FunctionType(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private FunctionType() { + params_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.FunctionType.class, com.kcl.api.Spec.FunctionType.Builder.class); + } + + private int bitField0_; + public static final int PARAMS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List params_; + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public java.util.List getParamsList() { + return params_; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public java.util.List + getParamsOrBuilderList() { + return params_; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public int getParamsCount() { + return params_.size(); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public com.kcl.api.Spec.Parameter getParams(int index) { + return params_.get(index); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + @java.lang.Override + public com.kcl.api.Spec.ParameterOrBuilder getParamsOrBuilder( + int index) { + return params_.get(index); + } + + public static final int RETURN_TY_FIELD_NUMBER = 2; + private com.kcl.api.Spec.KclType returnTy_; + /** + * .com.kcl.api.KclType return_ty = 2; + * @return Whether the returnTy field is set. + */ + @java.lang.Override + public boolean hasReturnTy() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .com.kcl.api.KclType return_ty = 2; + * @return The returnTy. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getReturnTy() { + return returnTy_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getReturnTyOrBuilder() { + return returnTy_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < params_.size(); i++) { + output.writeMessage(1, params_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getReturnTy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < params_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, params_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getReturnTy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kcl.api.Spec.FunctionType)) { + return super.equals(obj); + } + com.kcl.api.Spec.FunctionType other = (com.kcl.api.Spec.FunctionType) obj; + + if (!getParamsList() + .equals(other.getParamsList())) return false; + if (hasReturnTy() != other.hasReturnTy()) return false; + if (hasReturnTy()) { + if (!getReturnTy() + .equals(other.getReturnTy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getParamsCount() > 0) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getParamsList().hashCode(); + } + if (hasReturnTy()) { + hash = (37 * hash) + RETURN_TY_FIELD_NUMBER; + hash = (53 * hash) + getReturnTy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kcl.api.Spec.FunctionType parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.kcl.api.Spec.FunctionType parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.kcl.api.Spec.FunctionType parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.FunctionType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kcl.api.Spec.FunctionType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.kcl.api.FunctionType} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.kcl.api.FunctionType) + com.kcl.api.Spec.FunctionTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.FunctionType.class, com.kcl.api.Spec.FunctionType.Builder.class); + } + + // Construct using com.kcl.api.Spec.FunctionType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetParamsFieldBuilder(); + internalGetReturnTyFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (paramsBuilder_ == null) { + params_ = java.util.Collections.emptyList(); + } else { + params_ = null; + paramsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + returnTy_ = null; + if (returnTyBuilder_ != null) { + returnTyBuilder_.dispose(); + returnTyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kcl.api.Spec.internal_static_com_kcl_api_FunctionType_descriptor; + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType getDefaultInstanceForType() { + return com.kcl.api.Spec.FunctionType.getDefaultInstance(); + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType build() { + com.kcl.api.Spec.FunctionType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType buildPartial() { + com.kcl.api.Spec.FunctionType result = new com.kcl.api.Spec.FunctionType(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.kcl.api.Spec.FunctionType result) { + if (paramsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + params_ = java.util.Collections.unmodifiableList(params_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.params_ = params_; + } else { + result.params_ = paramsBuilder_.build(); + } + } + + private void buildPartial0(com.kcl.api.Spec.FunctionType result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.returnTy_ = returnTyBuilder_ == null + ? returnTy_ + : returnTyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kcl.api.Spec.FunctionType) { + return mergeFrom((com.kcl.api.Spec.FunctionType)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kcl.api.Spec.FunctionType other) { + if (other == com.kcl.api.Spec.FunctionType.getDefaultInstance()) return this; + if (paramsBuilder_ == null) { + if (!other.params_.isEmpty()) { + if (params_.isEmpty()) { + params_ = other.params_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParamsIsMutable(); + params_.addAll(other.params_); + } + onChanged(); + } + } else { + if (!other.params_.isEmpty()) { + if (paramsBuilder_.isEmpty()) { + paramsBuilder_.dispose(); + paramsBuilder_ = null; + params_ = other.params_; + bitField0_ = (bitField0_ & ~0x00000001); + paramsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + internalGetParamsFieldBuilder() : null; + } else { + paramsBuilder_.addAllMessages(other.params_); + } + } + } + if (other.hasReturnTy()) { + mergeReturnTy(other.getReturnTy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.kcl.api.Spec.Parameter m = + input.readMessage( + com.kcl.api.Spec.Parameter.parser(), + extensionRegistry); + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(m); + } else { + paramsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + internalGetReturnTyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List params_ = + java.util.Collections.emptyList(); + private void ensureParamsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + params_ = new java.util.ArrayList(params_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.kcl.api.Spec.Parameter, com.kcl.api.Spec.Parameter.Builder, com.kcl.api.Spec.ParameterOrBuilder> paramsBuilder_; + + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public java.util.List getParamsList() { + if (paramsBuilder_ == null) { + return java.util.Collections.unmodifiableList(params_); + } else { + return paramsBuilder_.getMessageList(); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public int getParamsCount() { + if (paramsBuilder_ == null) { + return params_.size(); + } else { + return paramsBuilder_.getCount(); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter getParams(int index) { + if (paramsBuilder_ == null) { + return params_.get(index); + } else { + return paramsBuilder_.getMessage(index); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder setParams( + int index, com.kcl.api.Spec.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.set(index, value); + onChanged(); + } else { + paramsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder setParams( + int index, com.kcl.api.Spec.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.set(index, builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams(com.kcl.api.Spec.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.add(value); + onChanged(); + } else { + paramsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams( + int index, com.kcl.api.Spec.Parameter value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamsIsMutable(); + params_.add(index, value); + onChanged(); + } else { + paramsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams( + com.kcl.api.Spec.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addParams( + int index, com.kcl.api.Spec.Parameter.Builder builderForValue) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.add(index, builderForValue.build()); + onChanged(); + } else { + paramsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder addAllParams( + java.lang.Iterable values) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, params_); + onChanged(); + } else { + paramsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder clearParams() { + if (paramsBuilder_ == null) { + params_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + paramsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public Builder removeParams(int index) { + if (paramsBuilder_ == null) { + ensureParamsIsMutable(); + params_.remove(index); + onChanged(); + } else { + paramsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter.Builder getParamsBuilder( + int index) { + return internalGetParamsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.ParameterOrBuilder getParamsOrBuilder( + int index) { + if (paramsBuilder_ == null) { + return params_.get(index); } else { + return paramsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public java.util.List + getParamsOrBuilderList() { + if (paramsBuilder_ != null) { + return paramsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(params_); + } + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter.Builder addParamsBuilder() { + return internalGetParamsFieldBuilder().addBuilder( + com.kcl.api.Spec.Parameter.getDefaultInstance()); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public com.kcl.api.Spec.Parameter.Builder addParamsBuilder( + int index) { + return internalGetParamsFieldBuilder().addBuilder( + index, com.kcl.api.Spec.Parameter.getDefaultInstance()); + } + /** + * repeated .com.kcl.api.Parameter params = 1; + */ + public java.util.List + getParamsBuilderList() { + return internalGetParamsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.kcl.api.Spec.Parameter, com.kcl.api.Spec.Parameter.Builder, com.kcl.api.Spec.ParameterOrBuilder> + internalGetParamsFieldBuilder() { + if (paramsBuilder_ == null) { + paramsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.kcl.api.Spec.Parameter, com.kcl.api.Spec.Parameter.Builder, com.kcl.api.Spec.ParameterOrBuilder>( + params_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + params_ = null; + } + return paramsBuilder_; + } + + private com.kcl.api.Spec.KclType returnTy_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> returnTyBuilder_; + /** + * .com.kcl.api.KclType return_ty = 2; + * @return Whether the returnTy field is set. + */ + public boolean hasReturnTy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .com.kcl.api.KclType return_ty = 2; + * @return The returnTy. + */ + public com.kcl.api.Spec.KclType getReturnTy() { + if (returnTyBuilder_ == null) { + return returnTy_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } else { + return returnTyBuilder_.getMessage(); + } + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder setReturnTy(com.kcl.api.Spec.KclType value) { + if (returnTyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + returnTy_ = value; + } else { + returnTyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder setReturnTy( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (returnTyBuilder_ == null) { + returnTy_ = builderForValue.build(); + } else { + returnTyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder mergeReturnTy(com.kcl.api.Spec.KclType value) { + if (returnTyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + returnTy_ != null && + returnTy_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getReturnTyBuilder().mergeFrom(value); + } else { + returnTy_ = value; + } + } else { + returnTyBuilder_.mergeFrom(value); + } + if (returnTy_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public Builder clearReturnTy() { + bitField0_ = (bitField0_ & ~0x00000002); + returnTy_ = null; + if (returnTyBuilder_ != null) { + returnTyBuilder_.dispose(); + returnTyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public com.kcl.api.Spec.KclType.Builder getReturnTyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetReturnTyFieldBuilder().getBuilder(); + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getReturnTyOrBuilder() { + if (returnTyBuilder_ != null) { + return returnTyBuilder_.getMessageOrBuilder(); + } else { + return returnTy_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : returnTy_; + } + } + /** + * .com.kcl.api.KclType return_ty = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetReturnTyFieldBuilder() { + if (returnTyBuilder_ == null) { + returnTyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getReturnTy(), + getParentForChildren(), + isClean()); + returnTy_ = null; + } + return returnTyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.FunctionType) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.FunctionType) + private static final com.kcl.api.Spec.FunctionType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.FunctionType(); + } + + public static com.kcl.api.Spec.FunctionType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.FunctionType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ParameterOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.Parameter) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .com.kcl.api.KclType ty = 2; + * @return Whether the ty field is set. + */ + boolean hasTy(); + /** + * .com.kcl.api.KclType ty = 2; + * @return The ty. + */ + com.kcl.api.Spec.KclType getTy(); + /** + * .com.kcl.api.KclType ty = 2; + */ + com.kcl.api.Spec.KclTypeOrBuilder getTyOrBuilder(); + } + /** + * Protobuf type {@code com.kcl.api.Parameter} + */ + public static final class Parameter extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.kcl.api.Parameter) + ParameterOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "Parameter"); + } + // Use Parameter.newBuilder() to construct. + private Parameter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Parameter() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.Parameter.class, com.kcl.api.Spec.Parameter.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TY_FIELD_NUMBER = 2; + private com.kcl.api.Spec.KclType ty_; + /** + * .com.kcl.api.KclType ty = 2; + * @return Whether the ty field is set. + */ + @java.lang.Override + public boolean hasTy() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .com.kcl.api.KclType ty = 2; + * @return The ty. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getTy() { + return ty_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getTyOrBuilder() { + return ty_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTy()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kcl.api.Spec.Parameter)) { + return super.equals(obj); + } + com.kcl.api.Spec.Parameter other = (com.kcl.api.Spec.Parameter) obj; + + if (!getName() + .equals(other.getName())) return false; + if (hasTy() != other.hasTy()) return false; + if (hasTy()) { + if (!getTy() + .equals(other.getTy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasTy()) { + hash = (37 * hash) + TY_FIELD_NUMBER; + hash = (53 * hash) + getTy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kcl.api.Spec.Parameter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.Parameter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.Parameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.Parameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.kcl.api.Spec.Parameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.kcl.api.Spec.Parameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.Parameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kcl.api.Spec.Parameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.kcl.api.Parameter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.kcl.api.Parameter) + com.kcl.api.Spec.ParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.Parameter.class, com.kcl.api.Spec.Parameter.Builder.class); + } + + // Construct using com.kcl.api.Spec.Parameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetTyFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + ty_ = null; + if (tyBuilder_ != null) { + tyBuilder_.dispose(); + tyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kcl.api.Spec.internal_static_com_kcl_api_Parameter_descriptor; + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter getDefaultInstanceForType() { + return com.kcl.api.Spec.Parameter.getDefaultInstance(); + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter build() { + com.kcl.api.Spec.Parameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter buildPartial() { + com.kcl.api.Spec.Parameter result = new com.kcl.api.Spec.Parameter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kcl.api.Spec.Parameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ty_ = tyBuilder_ == null + ? ty_ + : tyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kcl.api.Spec.Parameter) { + return mergeFrom((com.kcl.api.Spec.Parameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kcl.api.Spec.Parameter other) { + if (other == com.kcl.api.Spec.Parameter.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTy()) { + mergeTy(other.getTy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + internalGetTyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.kcl.api.Spec.KclType ty_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> tyBuilder_; + /** + * .com.kcl.api.KclType ty = 2; + * @return Whether the ty field is set. + */ + public boolean hasTy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .com.kcl.api.KclType ty = 2; + * @return The ty. + */ + public com.kcl.api.Spec.KclType getTy() { + if (tyBuilder_ == null) { + return ty_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } else { + return tyBuilder_.getMessage(); + } + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder setTy(com.kcl.api.Spec.KclType value) { + if (tyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ty_ = value; + } else { + tyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder setTy( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (tyBuilder_ == null) { + ty_ = builderForValue.build(); + } else { + tyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder mergeTy(com.kcl.api.Spec.KclType value) { + if (tyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + ty_ != null && + ty_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getTyBuilder().mergeFrom(value); + } else { + ty_ = value; + } + } else { + tyBuilder_.mergeFrom(value); + } + if (ty_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public Builder clearTy() { + bitField0_ = (bitField0_ & ~0x00000002); + ty_ = null; + if (tyBuilder_ != null) { + tyBuilder_.dispose(); + tyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public com.kcl.api.Spec.KclType.Builder getTyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTyFieldBuilder().getBuilder(); + } + /** + * .com.kcl.api.KclType ty = 2; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getTyOrBuilder() { + if (tyBuilder_ != null) { + return tyBuilder_.getMessageOrBuilder(); + } else { + return ty_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : ty_; + } + } + /** + * .com.kcl.api.KclType ty = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetTyFieldBuilder() { + if (tyBuilder_ == null) { + tyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getTy(), + getParentForChildren(), + isClean()); + ty_ = null; + } + return tyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.Parameter) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.Parameter) + private static final com.kcl.api.Spec.Parameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.Parameter(); + } + + public static com.kcl.api.Spec.Parameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.Parameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IndexSignatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.IndexSignature) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return Whether the keyName field is set. + */ + boolean hasKeyName(); + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The keyName. + */ + java.lang.String getKeyName(); + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The bytes for keyName. + */ + com.google.protobuf.ByteString + getKeyNameBytes(); + + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return Whether the key field is set. + */ + boolean hasKey(); + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return The key. + */ + com.kcl.api.Spec.KclType getKey(); + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + */ + com.kcl.api.Spec.KclTypeOrBuilder getKeyOrBuilder(); + + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return Whether the val field is set. + */ + boolean hasVal(); + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return The val. + */ + com.kcl.api.Spec.KclType getVal(); + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + */ + com.kcl.api.Spec.KclTypeOrBuilder getValOrBuilder(); + + /** + * bool any_other = 4; + * @return The anyOther. + */ + boolean getAnyOther(); + } + /** + *
+   * Message representing an index signature in KCL.
+   * 
+ * + * Protobuf type {@code com.kcl.api.IndexSignature} + */ + public static final class IndexSignature extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.kcl.api.IndexSignature) + IndexSignatureOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "IndexSignature"); + } + // Use IndexSignature.newBuilder() to construct. + private IndexSignature(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private IndexSignature() { + keyName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.IndexSignature.class, com.kcl.api.Spec.IndexSignature.Builder.class); + } + + private int bitField0_; + public static final int KEY_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object keyName_ = ""; + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return Whether the keyName field is set. + */ + @java.lang.Override + public boolean hasKeyName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The keyName. + */ + @java.lang.Override + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } + } + /** + *
+     * The optional index signature key name
+     * 
+ * + * optional string key_name = 1; + * @return The bytes for keyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + private com.kcl.api.Spec.KclType key_; + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + * @return The key. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getKey() { + return key_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } + /** + *
+     * Key type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType key = 2; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getKeyOrBuilder() { + return key_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } + + public static final int VAL_FIELD_NUMBER = 3; + private com.kcl.api.Spec.KclType val_; + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return Whether the val field is set. + */ + @java.lang.Override + public boolean hasVal() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + * @return The val. + */ + @java.lang.Override + public com.kcl.api.Spec.KclType getVal() { + return val_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } + /** + *
+     * Value type of the index signature.
+     * 
+ * + * .com.kcl.api.KclType val = 3; + */ + @java.lang.Override + public com.kcl.api.Spec.KclTypeOrBuilder getValOrBuilder() { + return val_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } + + public static final int ANY_OTHER_FIELD_NUMBER = 4; + private boolean anyOther_ = false; + /** + * bool any_other = 4; + * @return The anyOther. + */ + @java.lang.Override + public boolean getAnyOther() { + return anyOther_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, keyName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getKey()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getVal()); + } + if (anyOther_ != false) { + output.writeBool(4, anyOther_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, keyName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getKey()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getVal()); + } + if (anyOther_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, anyOther_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.kcl.api.Spec.IndexSignature)) { + return super.equals(obj); + } + com.kcl.api.Spec.IndexSignature other = (com.kcl.api.Spec.IndexSignature) obj; + + if (hasKeyName() != other.hasKeyName()) return false; + if (hasKeyName()) { + if (!getKeyName() + .equals(other.getKeyName())) return false; + } + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey() + .equals(other.getKey())) return false; + } + if (hasVal() != other.hasVal()) return false; + if (hasVal()) { + if (!getVal() + .equals(other.getVal())) return false; + } + if (getAnyOther() + != other.getAnyOther()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasKeyName()) { + hash = (37 * hash) + KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKeyName().hashCode(); + } + if (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (hasVal()) { + hash = (37 * hash) + VAL_FIELD_NUMBER; + hash = (53 * hash) + getVal().hashCode(); + } + hash = (37 * hash) + ANY_OTHER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAnyOther()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.kcl.api.Spec.IndexSignature parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.kcl.api.Spec.IndexSignature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.kcl.api.Spec.IndexSignature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.kcl.api.Spec.IndexSignature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.kcl.api.Spec.IndexSignature prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message representing an index signature in KCL.
+     * 
+ * + * Protobuf type {@code com.kcl.api.IndexSignature} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:com.kcl.api.IndexSignature) + com.kcl.api.Spec.IndexSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.kcl.api.Spec.IndexSignature.class, com.kcl.api.Spec.IndexSignature.Builder.class); + } + + // Construct using com.kcl.api.Spec.IndexSignature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + internalGetKeyFieldBuilder(); + internalGetValFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyName_ = ""; + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + anyOther_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.kcl.api.Spec.internal_static_com_kcl_api_IndexSignature_descriptor; + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature getDefaultInstanceForType() { + return com.kcl.api.Spec.IndexSignature.getDefaultInstance(); + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature build() { + com.kcl.api.Spec.IndexSignature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature buildPartial() { + com.kcl.api.Spec.IndexSignature result = new com.kcl.api.Spec.IndexSignature(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.kcl.api.Spec.IndexSignature result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyName_ = keyName_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = keyBuilder_ == null + ? key_ + : keyBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.val_ = valBuilder_ == null + ? val_ + : valBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.anyOther_ = anyOther_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.kcl.api.Spec.IndexSignature) { + return mergeFrom((com.kcl.api.Spec.IndexSignature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.kcl.api.Spec.IndexSignature other) { + if (other == com.kcl.api.Spec.IndexSignature.getDefaultInstance()) return this; + if (other.hasKeyName()) { + keyName_ = other.keyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasKey()) { + mergeKey(other.getKey()); + } + if (other.hasVal()) { + mergeVal(other.getVal()); + } + if (other.getAnyOther() != false) { + setAnyOther(other.getAnyOther()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + keyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + internalGetKeyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + internalGetValFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + anyOther_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object keyName_ = ""; + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return Whether the keyName field is set. + */ + public boolean hasKeyName() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return The keyName. + */ + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return The bytes for keyName. + */ + public com.google.protobuf.ByteString + getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @param value The keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @return This builder for chaining. + */ + public Builder clearKeyName() { + keyName_ = getDefaultInstance().getKeyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The optional index signature key name
+       * 
+ * + * optional string key_name = 1; + * @param value The bytes for keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.kcl.api.Spec.KclType key_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> keyBuilder_; + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + * @return The key. + */ + public com.kcl.api.Spec.KclType getKey() { + if (keyBuilder_ == null) { + return key_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } else { + return keyBuilder_.getMessage(); + } + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder setKey(com.kcl.api.Spec.KclType value) { + if (keyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + } else { + keyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder setKey( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (keyBuilder_ == null) { + key_ = builderForValue.build(); + } else { + keyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder mergeKey(com.kcl.api.Spec.KclType value) { + if (keyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + key_ != null && + key_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getKeyBuilder().mergeFrom(value); + } else { + key_ = value; + } + } else { + keyBuilder_.mergeFrom(value); + } + if (key_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000002); + key_ = null; + if (keyBuilder_ != null) { + keyBuilder_.dispose(); + keyBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public com.kcl.api.Spec.KclType.Builder getKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetKeyFieldBuilder().getBuilder(); + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getKeyOrBuilder() { + if (keyBuilder_ != null) { + return keyBuilder_.getMessageOrBuilder(); + } else { + return key_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : key_; + } + } + /** + *
+       * Key type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType key = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetKeyFieldBuilder() { + if (keyBuilder_ == null) { + keyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getKey(), + getParentForChildren(), + isClean()); + key_ = null; + } + return keyBuilder_; + } + + private com.kcl.api.Spec.KclType val_; + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> valBuilder_; + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + * @return Whether the val field is set. + */ + public boolean hasVal() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + * @return The val. + */ + public com.kcl.api.Spec.KclType getVal() { + if (valBuilder_ == null) { + return val_ == null ? com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } else { + return valBuilder_.getMessage(); + } + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder setVal(com.kcl.api.Spec.KclType value) { + if (valBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + val_ = value; + } else { + valBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder setVal( + com.kcl.api.Spec.KclType.Builder builderForValue) { + if (valBuilder_ == null) { + val_ = builderForValue.build(); + } else { + valBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder mergeVal(com.kcl.api.Spec.KclType value) { + if (valBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + val_ != null && + val_ != com.kcl.api.Spec.KclType.getDefaultInstance()) { + getValBuilder().mergeFrom(value); + } else { + val_ = value; + } + } else { + valBuilder_.mergeFrom(value); + } + if (val_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public Builder clearVal() { + bitField0_ = (bitField0_ & ~0x00000004); + val_ = null; + if (valBuilder_ != null) { + valBuilder_.dispose(); + valBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public com.kcl.api.Spec.KclType.Builder getValBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetValFieldBuilder().getBuilder(); + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + public com.kcl.api.Spec.KclTypeOrBuilder getValOrBuilder() { + if (valBuilder_ != null) { + return valBuilder_.getMessageOrBuilder(); + } else { + return val_ == null ? + com.kcl.api.Spec.KclType.getDefaultInstance() : val_; + } + } + /** + *
+       * Value type of the index signature.
+       * 
+ * + * .com.kcl.api.KclType val = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder> + internalGetValFieldBuilder() { + if (valBuilder_ == null) { + valBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.kcl.api.Spec.KclType, com.kcl.api.Spec.KclType.Builder, com.kcl.api.Spec.KclTypeOrBuilder>( + getVal(), + getParentForChildren(), + isClean()); + val_ = null; + } + return valBuilder_; + } + + private boolean anyOther_ ; + /** + * bool any_other = 4; + * @return The anyOther. + */ + @java.lang.Override + public boolean getAnyOther() { + return anyOther_; + } + /** + * bool any_other = 4; + * @param value The anyOther to set. + * @return This builder for chaining. + */ + public Builder setAnyOther(boolean value) { + + anyOther_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool any_other = 4; + * @return This builder for chaining. + */ + public Builder clearAnyOther() { + bitField0_ = (bitField0_ & ~0x00000008); + anyOther_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.kcl.api.IndexSignature) + } + + // @@protoc_insertion_point(class_scope:com.kcl.api.IndexSignature) + private static final com.kcl.api.Spec.IndexSignature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.kcl.api.Spec.IndexSignature(); + } + + public static com.kcl.api.Spec.IndexSignature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.kcl.api.Spec.IndexSignature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DecoratorOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.kcl.api.Decorator) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the decorator.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the decorator.
+     * 
+ * + * string name = 1; * @return The bytes for name. */ com.google.protobuf.ByteString @@ -73411,6 +76791,21 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_kcl_api_KclType_ExamplesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_kcl_api_FunctionType_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_kcl_api_FunctionType_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_kcl_api_Parameter_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_kcl_api_Parameter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_kcl_api_IndexSignature_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_kcl_api_IndexSignature_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_kcl_api_Decorator_descriptor; private static final @@ -73607,7 +77002,7 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { "dateDependenciesArgs\022\025\n\rmanifest_path\030\001 " + "\001(\t\022\016\n\006vendor\030\002 \001(\010\"K\n\030UpdateDependencie" + "sResult\022/\n\rexternal_pkgs\030\003 \003(\0132\030.com.kcl" + - ".api.ExternalPkg\"\363\004\n\007KclType\022\014\n\004type\030\001 \001" + + ".api.ExternalPkg\"\201\006\n\007KclType\022\014\n\004type\030\001 \001" + "(\t\022)\n\013union_types\030\002 \003(\0132\024.com.kcl.api.Kc" + "lType\022\017\n\007default\030\003 \001(\t\022\023\n\013schema_name\030\004 " + "\001(\t\022\022\n\nschema_doc\030\005 \001(\t\0228\n\nproperties\030\006 " + @@ -73619,63 +77014,74 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { "\030\014 \001(\t\022\020\n\010pkg_path\030\r \001(\t\022\023\n\013description\030" + "\016 \001(\t\0224\n\010examples\030\017 \003(\0132\".com.kcl.api.Kc" + "lType.ExamplesEntry\022)\n\013base_schema\030\020 \001(\013" + - "2\024.com.kcl.api.KclType\032G\n\017PropertiesEntr" + - "y\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.com.kcl." + - "api.KclType:\0028\001\032E\n\rExamplesEntry\022\013\n\003key\030" + - "\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.com.kcl.api.Examp" + - "le:\0028\001\"\225\001\n\tDecorator\022\014\n\004name\030\001 \001(\t\022\021\n\tar" + - "guments\030\002 \003(\t\0226\n\010keywords\030\003 \003(\0132$.com.kc" + - "l.api.Decorator.KeywordsEntry\032/\n\rKeyword" + - "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\">" + - "\n\007Example\022\017\n\007summary\030\001 \001(\t\022\023\n\013descriptio" + - "n\030\002 \001(\t\022\r\n\005value\030\003 \001(\t2\222\001\n\016BuiltinServic" + - "e\0226\n\004Ping\022\025.com.kcl.api.PingArgs\032\027.com.k" + - "cl.api.PingResult\022H\n\nListMethod\022\033.com.kc" + - "l.api.ListMethodArgs\032\035.com.kcl.api.ListM" + - "ethodResult2\260\r\n\nKclService\0226\n\004Ping\022\025.com" + - ".kcl.api.PingArgs\032\027.com.kcl.api.PingResu" + - "lt\022H\n\nGetVersion\022\033.com.kcl.api.GetVersio" + - "nArgs\032\035.com.kcl.api.GetVersionResult\022N\n\014" + - "ParseProgram\022\035.com.kcl.api.ParseProgramA" + - "rgs\032\037.com.kcl.api.ParseProgramResult\022E\n\t" + - "ParseFile\022\032.com.kcl.api.ParseFileArgs\032\034." + - "com.kcl.api.ParseFileResult\022K\n\013LoadPacka" + - "ge\022\034.com.kcl.api.LoadPackageArgs\032\036.com.k" + - "cl.api.LoadPackageResult\022L\n\013ListOptions\022" + - "\035.com.kcl.api.ParseProgramArgs\032\036.com.kcl" + - ".api.ListOptionsResult\022Q\n\rListVariables\022" + - "\036.com.kcl.api.ListVariablesArgs\032 .com.kc" + - "l.api.ListVariablesResult\022K\n\013ExecProgram" + - "\022\034.com.kcl.api.ExecProgramArgs\032\036.com.kcl" + - ".api.ExecProgramResult\022N\n\014BuildProgram\022\035" + - ".com.kcl.api.BuildProgramArgs\032\037.com.kcl." + - "api.BuildProgramResult\022M\n\014ExecArtifact\022\035" + - ".com.kcl.api.ExecArtifactArgs\032\036.com.kcl." + - "api.ExecProgramResult\022N\n\014OverrideFile\022\035." + - "com.kcl.api.OverrideFileArgs\032\037.com.kcl.a" + - "pi.OverrideFileResult\022f\n\024GetSchemaTypeMa" + - "pping\022%.com.kcl.api.GetSchemaTypeMapping" + - "Args\032\'.com.kcl.api.GetSchemaTypeMappingR" + - "esult\022H\n\nFormatCode\022\033.com.kcl.api.Format" + - "CodeArgs\032\035.com.kcl.api.FormatCodeResult\022" + - "H\n\nFormatPath\022\033.com.kcl.api.FormatPathAr" + - "gs\032\035.com.kcl.api.FormatPathResult\022B\n\010Lin" + - "tPath\022\031.com.kcl.api.LintPathArgs\032\033.com.k" + - "cl.api.LintPathResult\022N\n\014ValidateCode\022\035." + - "com.kcl.api.ValidateCodeArgs\032\037.com.kcl.a" + - "pi.ValidateCodeResult\022N\n\014ListDepFiles\022\035." + - "com.kcl.api.ListDepFilesArgs\032\037.com.kcl.a" + - "pi.ListDepFilesResult\022]\n\021LoadSettingsFil" + - "es\022\".com.kcl.api.LoadSettingsFilesArgs\032$" + - ".com.kcl.api.LoadSettingsFilesResult\022<\n\006" + - "Rename\022\027.com.kcl.api.RenameArgs\032\031.com.kc" + - "l.api.RenameResult\022H\n\nRenameCode\022\033.com.k" + - "cl.api.RenameCodeArgs\032\035.com.kcl.api.Rena" + - "meCodeResult\0226\n\004Test\022\025.com.kcl.api.TestA" + - "rgs\032\027.com.kcl.api.TestResult\022`\n\022UpdateDe" + - "pendencies\022#.com.kcl.api.UpdateDependenc" + - "iesArgs\032%.com.kcl.api.UpdateDependencies" + - "ResultB\024Z\005.;api\252\002\nKclLib.APIb\006proto3" + "2\024.com.kcl.api.KclType\0220\n\010function\030\021 \001(\013" + + "2\031.com.kcl.api.FunctionTypeH\000\210\001\001\0229\n\017inde" + + "x_signature\030\022 \001(\0132\033.com.kcl.api.IndexSig" + + "natureH\001\210\001\001\032G\n\017PropertiesEntry\022\013\n\003key\030\001 " + + "\001(\t\022#\n\005value\030\002 \001(\0132\024.com.kcl.api.KclType" + + ":\0028\001\032E\n\rExamplesEntry\022\013\n\003key\030\001 \001(\t\022#\n\005va" + + "lue\030\002 \001(\0132\024.com.kcl.api.Example:\0028\001B\013\n\t_" + + "functionB\022\n\020_index_signature\"_\n\014Function" + + "Type\022&\n\006params\030\001 \003(\0132\026.com.kcl.api.Param" + + "eter\022\'\n\treturn_ty\030\002 \001(\0132\024.com.kcl.api.Kc" + + "lType\";\n\tParameter\022\014\n\004name\030\001 \001(\t\022 \n\002ty\030\002" + + " \001(\0132\024.com.kcl.api.KclType\"\215\001\n\016IndexSign" + + "ature\022\025\n\010key_name\030\001 \001(\tH\000\210\001\001\022!\n\003key\030\002 \001(" + + "\0132\024.com.kcl.api.KclType\022!\n\003val\030\003 \001(\0132\024.c" + + "om.kcl.api.KclType\022\021\n\tany_other\030\004 \001(\010B\013\n" + + "\t_key_name\"\225\001\n\tDecorator\022\014\n\004name\030\001 \001(\t\022\021" + + "\n\targuments\030\002 \003(\t\0226\n\010keywords\030\003 \003(\0132$.co" + + "m.kcl.api.Decorator.KeywordsEntry\032/\n\rKey" + + "wordsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\">\n\007Example\022\017\n\007summary\030\001 \001(\t\022\023\n\013descri" + + "ption\030\002 \001(\t\022\r\n\005value\030\003 \001(\t2\222\001\n\016BuiltinSe" + + "rvice\0226\n\004Ping\022\025.com.kcl.api.PingArgs\032\027.c" + + "om.kcl.api.PingResult\022H\n\nListMethod\022\033.co" + + "m.kcl.api.ListMethodArgs\032\035.com.kcl.api.L" + + "istMethodResult2\260\r\n\nKclService\0226\n\004Ping\022\025" + + ".com.kcl.api.PingArgs\032\027.com.kcl.api.Ping" + + "Result\022H\n\nGetVersion\022\033.com.kcl.api.GetVe" + + "rsionArgs\032\035.com.kcl.api.GetVersionResult" + + "\022N\n\014ParseProgram\022\035.com.kcl.api.ParseProg" + + "ramArgs\032\037.com.kcl.api.ParseProgramResult" + + "\022E\n\tParseFile\022\032.com.kcl.api.ParseFileArg" + + "s\032\034.com.kcl.api.ParseFileResult\022K\n\013LoadP" + + "ackage\022\034.com.kcl.api.LoadPackageArgs\032\036.c" + + "om.kcl.api.LoadPackageResult\022L\n\013ListOpti" + + "ons\022\035.com.kcl.api.ParseProgramArgs\032\036.com" + + ".kcl.api.ListOptionsResult\022Q\n\rListVariab" + + "les\022\036.com.kcl.api.ListVariablesArgs\032 .co" + + "m.kcl.api.ListVariablesResult\022K\n\013ExecPro" + + "gram\022\034.com.kcl.api.ExecProgramArgs\032\036.com" + + ".kcl.api.ExecProgramResult\022N\n\014BuildProgr" + + "am\022\035.com.kcl.api.BuildProgramArgs\032\037.com." + + "kcl.api.BuildProgramResult\022M\n\014ExecArtifa" + + "ct\022\035.com.kcl.api.ExecArtifactArgs\032\036.com." + + "kcl.api.ExecProgramResult\022N\n\014OverrideFil" + + "e\022\035.com.kcl.api.OverrideFileArgs\032\037.com.k" + + "cl.api.OverrideFileResult\022f\n\024GetSchemaTy" + + "peMapping\022%.com.kcl.api.GetSchemaTypeMap" + + "pingArgs\032\'.com.kcl.api.GetSchemaTypeMapp" + + "ingResult\022H\n\nFormatCode\022\033.com.kcl.api.Fo" + + "rmatCodeArgs\032\035.com.kcl.api.FormatCodeRes" + + "ult\022H\n\nFormatPath\022\033.com.kcl.api.FormatPa" + + "thArgs\032\035.com.kcl.api.FormatPathResult\022B\n" + + "\010LintPath\022\031.com.kcl.api.LintPathArgs\032\033.c" + + "om.kcl.api.LintPathResult\022N\n\014ValidateCod" + + "e\022\035.com.kcl.api.ValidateCodeArgs\032\037.com.k" + + "cl.api.ValidateCodeResult\022N\n\014ListDepFile" + + "s\022\035.com.kcl.api.ListDepFilesArgs\032\037.com.k" + + "cl.api.ListDepFilesResult\022]\n\021LoadSetting" + + "sFiles\022\".com.kcl.api.LoadSettingsFilesAr" + + "gs\032$.com.kcl.api.LoadSettingsFilesResult" + + "\022<\n\006Rename\022\027.com.kcl.api.RenameArgs\032\031.co" + + "m.kcl.api.RenameResult\022H\n\nRenameCode\022\033.c" + + "om.kcl.api.RenameCodeArgs\032\035.com.kcl.api." + + "RenameCodeResult\0226\n\004Test\022\025.com.kcl.api.T" + + "estArgs\032\027.com.kcl.api.TestResult\022`\n\022Upda" + + "teDependencies\022#.com.kcl.api.UpdateDepen" + + "denciesArgs\032%.com.kcl.api.UpdateDependen" + + "ciesResultB\024Z\005.;api\252\002\nKclLib.APIb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -74130,7 +77536,7 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { internal_static_com_kcl_api_KclType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_KclType_descriptor, - new java.lang.String[] { "Type", "UnionTypes", "Default", "SchemaName", "SchemaDoc", "Properties", "Required", "Key", "Item", "Line", "Decorators", "Filename", "PkgPath", "Description", "Examples", "BaseSchema", }); + new java.lang.String[] { "Type", "UnionTypes", "Default", "SchemaName", "SchemaDoc", "Properties", "Required", "Key", "Item", "Line", "Decorators", "Filename", "PkgPath", "Description", "Examples", "BaseSchema", "Function", "IndexSignature", }); internal_static_com_kcl_api_KclType_PropertiesEntry_descriptor = internal_static_com_kcl_api_KclType_descriptor.getNestedType(0); internal_static_com_kcl_api_KclType_PropertiesEntry_fieldAccessorTable = new @@ -74143,8 +77549,26 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_KclType_ExamplesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); - internal_static_com_kcl_api_Decorator_descriptor = + internal_static_com_kcl_api_FunctionType_descriptor = getDescriptor().getMessageType(64); + internal_static_com_kcl_api_FunctionType_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_kcl_api_FunctionType_descriptor, + new java.lang.String[] { "Params", "ReturnTy", }); + internal_static_com_kcl_api_Parameter_descriptor = + getDescriptor().getMessageType(65); + internal_static_com_kcl_api_Parameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_kcl_api_Parameter_descriptor, + new java.lang.String[] { "Name", "Ty", }); + internal_static_com_kcl_api_IndexSignature_descriptor = + getDescriptor().getMessageType(66); + internal_static_com_kcl_api_IndexSignature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_kcl_api_IndexSignature_descriptor, + new java.lang.String[] { "KeyName", "Key", "Val", "AnyOther", }); + internal_static_com_kcl_api_Decorator_descriptor = + getDescriptor().getMessageType(67); internal_static_com_kcl_api_Decorator_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_Decorator_descriptor, @@ -74156,7 +77580,7 @@ public com.kcl.api.Spec.Example getDefaultInstanceForType() { internal_static_com_kcl_api_Decorator_KeywordsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_com_kcl_api_Example_descriptor = - getDescriptor().getMessageType(65); + getDescriptor().getMessageType(68); internal_static_com_kcl_api_Example_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_kcl_api_Example_descriptor, diff --git a/kotlin/src/main/kotlin/com/kcl/api/FunctionTypeKt.kt b/kotlin/src/main/kotlin/com/kcl/api/FunctionTypeKt.kt new file mode 100644 index 00000000..135d0220 --- /dev/null +++ b/kotlin/src/main/kotlin/com/kcl/api/FunctionTypeKt.kt @@ -0,0 +1,137 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: spec.proto + +@file:com.google.protobuf.Generated +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package com.kcl.api; + +@kotlin.jvm.JvmName("-initializefunctionType") +public inline fun functionType(block: com.kcl.api.FunctionTypeKt.Dsl.() -> kotlin.Unit): com.kcl.api.Spec.FunctionType = + com.kcl.api.FunctionTypeKt.Dsl._create(com.kcl.api.Spec.FunctionType.newBuilder()).apply { block() }._build() +/** + * Protobuf type `com.kcl.api.FunctionType` + */ +public object FunctionTypeKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kcl.api.Spec.FunctionType.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kcl.api.Spec.FunctionType.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kcl.api.Spec.FunctionType = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class ParamsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .com.kcl.api.Parameter params = 1;` + */ + public val params: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.paramsList + ) + /** + * `repeated .com.kcl.api.Parameter params = 1;` + * @param value The params to add. + */ + @kotlin.jvm.JvmSynthetic +@kotlin.jvm.JvmName("addParams") + public fun com.google.protobuf.kotlin.DslList.add(value: com.kcl.api.Spec.Parameter) { + _builder.addParams(value) + } + /** + * `repeated .com.kcl.api.Parameter params = 1;` + * @param value The params to add. + */ + @kotlin.jvm.JvmSynthetic +@kotlin.jvm.JvmName("plusAssignParams") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.kcl.api.Spec.Parameter) { + add(value) + } + /** + * `repeated .com.kcl.api.Parameter params = 1;` + * @param values The params to add. + */ + @kotlin.jvm.JvmSynthetic +@kotlin.jvm.JvmName("addAllParams") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllParams(values) + } + /** + * `repeated .com.kcl.api.Parameter params = 1;` + * @param values The params to add. + */ + @kotlin.jvm.JvmSynthetic +@kotlin.jvm.JvmName("plusAssignAllParams") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .com.kcl.api.Parameter params = 1;` + * @param index The index to set the value at. + * @param value The params to set. + */ + @kotlin.jvm.JvmSynthetic +@kotlin.jvm.JvmName("setParams") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.kcl.api.Spec.Parameter) { + _builder.setParams(index, value) + } + /** + * `repeated .com.kcl.api.Parameter params = 1;` + */ + @kotlin.jvm.JvmSynthetic +@kotlin.jvm.JvmName("clearParams") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearParams() + } + + /** + * `.com.kcl.api.KclType return_ty = 2;` + */ + public var returnTy: com.kcl.api.Spec.KclType + @kotlin.jvm.JvmName("getReturnTy") + get() = _builder.returnTy + @kotlin.jvm.JvmName("setReturnTy") + set(value) { + _builder.returnTy = value + } + /** + * `.com.kcl.api.KclType return_ty = 2;` + */ + public fun clearReturnTy() { + _builder.clearReturnTy() + } + /** + * `.com.kcl.api.KclType return_ty = 2;` + * @return Whether the returnTy field is set. + */ + public fun hasReturnTy(): kotlin.Boolean { + return _builder.hasReturnTy() + } + + public val FunctionTypeKt.Dsl.returnTyOrNull: com.kcl.api.Spec.KclType? + get() = _builder.returnTyOrNull + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kcl.api.Spec.FunctionType.copy(block: `com.kcl.api`.FunctionTypeKt.Dsl.() -> kotlin.Unit): com.kcl.api.Spec.FunctionType = + `com.kcl.api`.FunctionTypeKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val com.kcl.api.Spec.FunctionTypeOrBuilder.returnTyOrNull: com.kcl.api.Spec.KclType? + get() = if (hasReturnTy()) getReturnTy() else null + diff --git a/kotlin/src/main/kotlin/com/kcl/api/IndexSignatureKt.kt b/kotlin/src/main/kotlin/com/kcl/api/IndexSignatureKt.kt new file mode 100644 index 00000000..907fc15b --- /dev/null +++ b/kotlin/src/main/kotlin/com/kcl/api/IndexSignatureKt.kt @@ -0,0 +1,177 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: spec.proto + +@file:com.google.protobuf.Generated +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package com.kcl.api; + +@kotlin.jvm.JvmName("-initializeindexSignature") +public inline fun indexSignature(block: com.kcl.api.IndexSignatureKt.Dsl.() -> kotlin.Unit): com.kcl.api.Spec.IndexSignature = + com.kcl.api.IndexSignatureKt.Dsl._create(com.kcl.api.Spec.IndexSignature.newBuilder()).apply { block() }._build() +/** + * ``` + * Message representing an index signature in KCL. + * ``` + * + * Protobuf type `com.kcl.api.IndexSignature` + */ +public object IndexSignatureKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kcl.api.Spec.IndexSignature.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kcl.api.Spec.IndexSignature.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kcl.api.Spec.IndexSignature = _builder.build() + + /** + * ``` + * The optional index signature key name + * ``` + * + * `optional string key_name = 1;` + */ + public var keyName: kotlin.String + @kotlin.jvm.JvmName("getKeyName") + get() = _builder.keyName + @kotlin.jvm.JvmName("setKeyName") + set(value) { + _builder.keyName = value + } + /** + * ``` + * The optional index signature key name + * ``` + * + * `optional string key_name = 1;` + */ + public fun clearKeyName() { + _builder.clearKeyName() + } + /** + * ``` + * The optional index signature key name + * ``` + * + * `optional string key_name = 1;` + * @return Whether the keyName field is set. + */ + public fun hasKeyName(): kotlin.Boolean { + return _builder.hasKeyName() + } + + /** + * ``` + * Key type of the index signature. + * ``` + * + * `.com.kcl.api.KclType key = 2;` + */ + public var key: com.kcl.api.Spec.KclType + @kotlin.jvm.JvmName("getKey") + get() = _builder.key + @kotlin.jvm.JvmName("setKey") + set(value) { + _builder.key = value + } + /** + * ``` + * Key type of the index signature. + * ``` + * + * `.com.kcl.api.KclType key = 2;` + */ + public fun clearKey() { + _builder.clearKey() + } + /** + * ``` + * Key type of the index signature. + * ``` + * + * `.com.kcl.api.KclType key = 2;` + * @return Whether the key field is set. + */ + public fun hasKey(): kotlin.Boolean { + return _builder.hasKey() + } + + public val IndexSignatureKt.Dsl.keyOrNull: com.kcl.api.Spec.KclType? + get() = _builder.keyOrNull + + /** + * ``` + * Value type of the index signature. + * ``` + * + * `.com.kcl.api.KclType val = 3;` + */ + public var val_: com.kcl.api.Spec.KclType + @kotlin.jvm.JvmName("getVal_") + get() = _builder.`val` + @kotlin.jvm.JvmName("setVal_") + set(value) { + _builder.`val` = value + } + /** + * ``` + * Value type of the index signature. + * ``` + * + * `.com.kcl.api.KclType val = 3;` + */ + public fun clearVal_() { + _builder.clearVal() + } + /** + * ``` + * Value type of the index signature. + * ``` + * + * `.com.kcl.api.KclType val = 3;` + * @return Whether the val field is set. + */ + public fun hasVal_(): kotlin.Boolean { + return _builder.hasVal() + } + + public val IndexSignatureKt.Dsl.valOrNull: com.kcl.api.Spec.KclType? + get() = _builder.valOrNull + + /** + * `bool any_other = 4;` + */ + public var anyOther: kotlin.Boolean + @kotlin.jvm.JvmName("getAnyOther") + get() = _builder.anyOther + @kotlin.jvm.JvmName("setAnyOther") + set(value) { + _builder.anyOther = value + } + /** + * `bool any_other = 4;` + */ + public fun clearAnyOther() { + _builder.clearAnyOther() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kcl.api.Spec.IndexSignature.copy(block: `com.kcl.api`.IndexSignatureKt.Dsl.() -> kotlin.Unit): com.kcl.api.Spec.IndexSignature = + `com.kcl.api`.IndexSignatureKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val com.kcl.api.Spec.IndexSignatureOrBuilder.keyOrNull: com.kcl.api.Spec.KclType? + get() = if (hasKey()) getKey() else null + +public val com.kcl.api.Spec.IndexSignatureOrBuilder.valOrNull: com.kcl.api.Spec.KclType? + get() = if (hasVal()) getVal() else null + diff --git a/kotlin/src/main/kotlin/com/kcl/api/KclTypeKt.kt b/kotlin/src/main/kotlin/com/kcl/api/KclTypeKt.kt index 71a43da3..f1aac444 100644 --- a/kotlin/src/main/kotlin/com/kcl/api/KclTypeKt.kt +++ b/kotlin/src/main/kotlin/com/kcl/api/KclTypeKt.kt @@ -35,7 +35,7 @@ public object KclTypeKt { /** * ``` - * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). + * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier). * ``` * * `string type = 1;` @@ -49,7 +49,7 @@ public object KclTypeKt { } /** * ``` - * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). + * Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier). * ``` * * `string type = 1;` @@ -815,6 +815,84 @@ public object KclTypeKt { public val KclTypeKt.Dsl.baseSchemaOrNull: com.kcl.api.Spec.KclType? get() = _builder.baseSchemaOrNull + + /** + * ``` + * Function type if the KclType is a function. + * ``` + * + * `optional .com.kcl.api.FunctionType function = 17;` + */ + public var function: com.kcl.api.Spec.FunctionType + @kotlin.jvm.JvmName("getFunction") + get() = _builder.function + @kotlin.jvm.JvmName("setFunction") + set(value) { + _builder.function = value + } + /** + * ``` + * Function type if the KclType is a function. + * ``` + * + * `optional .com.kcl.api.FunctionType function = 17;` + */ + public fun clearFunction() { + _builder.clearFunction() + } + /** + * ``` + * Function type if the KclType is a function. + * ``` + * + * `optional .com.kcl.api.FunctionType function = 17;` + * @return Whether the function field is set. + */ + public fun hasFunction(): kotlin.Boolean { + return _builder.hasFunction() + } + + public val KclTypeKt.Dsl.functionOrNull: com.kcl.api.Spec.FunctionType? + get() = _builder.functionOrNull + + /** + * ``` + * Optional schema index signature + * ``` + * + * `optional .com.kcl.api.IndexSignature index_signature = 18;` + */ + public var indexSignature: com.kcl.api.Spec.IndexSignature + @kotlin.jvm.JvmName("getIndexSignature") + get() = _builder.indexSignature + @kotlin.jvm.JvmName("setIndexSignature") + set(value) { + _builder.indexSignature = value + } + /** + * ``` + * Optional schema index signature + * ``` + * + * `optional .com.kcl.api.IndexSignature index_signature = 18;` + */ + public fun clearIndexSignature() { + _builder.clearIndexSignature() + } + /** + * ``` + * Optional schema index signature + * ``` + * + * `optional .com.kcl.api.IndexSignature index_signature = 18;` + * @return Whether the indexSignature field is set. + */ + public fun hasIndexSignature(): kotlin.Boolean { + return _builder.hasIndexSignature() + } + + public val KclTypeKt.Dsl.indexSignatureOrNull: com.kcl.api.Spec.IndexSignature? + get() = _builder.indexSignatureOrNull } } @kotlin.jvm.JvmSynthetic @@ -830,3 +908,9 @@ public val com.kcl.api.Spec.KclTypeOrBuilder.itemOrNull: com.kcl.api.Spec.KclTyp public val com.kcl.api.Spec.KclTypeOrBuilder.baseSchemaOrNull: com.kcl.api.Spec.KclType? get() = if (hasBaseSchema()) getBaseSchema() else null +public val com.kcl.api.Spec.KclTypeOrBuilder.functionOrNull: com.kcl.api.Spec.FunctionType? + get() = if (hasFunction()) getFunction() else null + +public val com.kcl.api.Spec.KclTypeOrBuilder.indexSignatureOrNull: com.kcl.api.Spec.IndexSignature? + get() = if (hasIndexSignature()) getIndexSignature() else null + diff --git a/kotlin/src/main/kotlin/com/kcl/api/ParameterKt.kt b/kotlin/src/main/kotlin/com/kcl/api/ParameterKt.kt new file mode 100644 index 00000000..39983d59 --- /dev/null +++ b/kotlin/src/main/kotlin/com/kcl/api/ParameterKt.kt @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: spec.proto + +@file:com.google.protobuf.Generated +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package com.kcl.api; + +@kotlin.jvm.JvmName("-initializeparameter") +public inline fun parameter(block: com.kcl.api.ParameterKt.Dsl.() -> kotlin.Unit): com.kcl.api.Spec.Parameter = + com.kcl.api.ParameterKt.Dsl._create(com.kcl.api.Spec.Parameter.newBuilder()).apply { block() }._build() +/** + * Protobuf type `com.kcl.api.Parameter` + */ +public object ParameterKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.kcl.api.Spec.Parameter.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.kcl.api.Spec.Parameter.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.kcl.api.Spec.Parameter = _builder.build() + + /** + * `string name = 1;` + */ + public var name: kotlin.String + @kotlin.jvm.JvmName("getName") + get() = _builder.name + @kotlin.jvm.JvmName("setName") + set(value) { + _builder.name = value + } + /** + * `string name = 1;` + */ + public fun clearName() { + _builder.clearName() + } + + /** + * `.com.kcl.api.KclType ty = 2;` + */ + public var ty: com.kcl.api.Spec.KclType + @kotlin.jvm.JvmName("getTy") + get() = _builder.ty + @kotlin.jvm.JvmName("setTy") + set(value) { + _builder.ty = value + } + /** + * `.com.kcl.api.KclType ty = 2;` + */ + public fun clearTy() { + _builder.clearTy() + } + /** + * `.com.kcl.api.KclType ty = 2;` + * @return Whether the ty field is set. + */ + public fun hasTy(): kotlin.Boolean { + return _builder.hasTy() + } + + public val ParameterKt.Dsl.tyOrNull: com.kcl.api.Spec.KclType? + get() = _builder.tyOrNull + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.kcl.api.Spec.Parameter.copy(block: `com.kcl.api`.ParameterKt.Dsl.() -> kotlin.Unit): com.kcl.api.Spec.Parameter = + `com.kcl.api`.ParameterKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val com.kcl.api.Spec.ParameterOrBuilder.tyOrNull: com.kcl.api.Spec.KclType? + get() = if (hasTy()) getTy() else null + diff --git a/lua/Cargo.toml b/lua/Cargo.toml index 84b33de9..786d5628 100644 --- a/lua/Cargo.toml +++ b/lua/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lib-lua" -version = "0.12.1" +version = "0.12.2" edition = "2024" publish = false @@ -16,4 +16,4 @@ mlua = { version = "0.9", features = [ "module", "macros", ], default-features = false, optional = true } -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } diff --git a/lua/kcl_lib-0.12.1-1.rockspec b/lua/kcl_lib-0.12.2-1.rockspec similarity index 95% rename from lua/kcl_lib-0.12.1-1.rockspec rename to lua/kcl_lib-0.12.2-1.rockspec index 8cf27afa..6a86bb1a 100644 --- a/lua/kcl_lib-0.12.1-1.rockspec +++ b/lua/kcl_lib-0.12.2-1.rockspec @@ -1,5 +1,5 @@ package = "kcl_lib" -version = "0.12.1-1" +version = "0.12.2-1" source = { url = "git+https://github.com/kcl-lang/kcl", diff --git a/nodejs/Cargo.toml b/nodejs/Cargo.toml index 0ae904b8..a8eedc3b 100644 --- a/nodejs/Cargo.toml +++ b/nodejs/Cargo.toml @@ -1,13 +1,13 @@ [package] edition = "2024" name = "kcl-nodejs-lib" -version = "0.12.1" +version = "0.12.2" [lib] crate-type = ["cdylib"] [dependencies] -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix napi = { version = "2.12.2", default-features = false, features = ["napi4"] } napi-derive = "2.12.2" diff --git a/nodejs/examples/exec-program/package.json b/nodejs/examples/exec-program/package.json index dc326fe5..1c48e8d7 100644 --- a/nodejs/examples/exec-program/package.json +++ b/nodejs/examples/exec-program/package.json @@ -12,6 +12,6 @@ "dist/" ], "dependencies": { - "kcl-lib": "0.12.1" + "kcl-lib": "0.12.2" } } diff --git a/nodejs/npm/darwin-arm64/package-lock.json b/nodejs/npm/darwin-arm64/package-lock.json index f8385015..5099da8f 100644 --- a/nodejs/npm/darwin-arm64/package-lock.json +++ b/nodejs/npm/darwin-arm64/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kcl-lang/lib-darwin-arm64", - "version": "0.12.1", + "version": "0.12.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@kcl-lang/lib-darwin-arm64", - "version": "0.12.1", + "version": "0.12.2", "cpu": [ "arm64" ], diff --git a/nodejs/npm/darwin-arm64/package.json b/nodejs/npm/darwin-arm64/package.json index a0439ff6..82a349b9 100644 --- a/nodejs/npm/darwin-arm64/package.json +++ b/nodejs/npm/darwin-arm64/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-darwin-arm64", "repository": "https://github.com/kcl-lang/lib", - "version": "0.12.1", + "version": "0.12.2", "os": [ "darwin" ], diff --git a/nodejs/npm/darwin-x64/package.json b/nodejs/npm/darwin-x64/package.json index d34befc1..e8fb8c78 100644 --- a/nodejs/npm/darwin-x64/package.json +++ b/nodejs/npm/darwin-x64/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-darwin-x64", "repository": "https://github.com/kcl-lang/lib", - "version": "0.12.1", + "version": "0.12.2", "os": [ "darwin" ], diff --git a/nodejs/npm/linux-arm64-gnu/package.json b/nodejs/npm/linux-arm64-gnu/package.json index 8bb5c94b..65ade5f3 100644 --- a/nodejs/npm/linux-arm64-gnu/package.json +++ b/nodejs/npm/linux-arm64-gnu/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-linux-arm64-gnu", "repository": "https://github.com/kcl-lang/lib", - "version": "0.12.1", + "version": "0.12.2", "os": [ "linux" ], diff --git a/nodejs/npm/linux-x64-gnu/package.json b/nodejs/npm/linux-x64-gnu/package.json index d0de4a52..e5af7064 100644 --- a/nodejs/npm/linux-x64-gnu/package.json +++ b/nodejs/npm/linux-x64-gnu/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-linux-x64-gnu", "repository": "https://github.com/kcl-lang/lib", - "version": "0.12.1", + "version": "0.12.2", "os": [ "linux" ], diff --git a/nodejs/npm/win32-arm64-msvc/package.json b/nodejs/npm/win32-arm64-msvc/package.json index bffaa64e..c160c725 100644 --- a/nodejs/npm/win32-arm64-msvc/package.json +++ b/nodejs/npm/win32-arm64-msvc/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-win32-arm64-msvc", "repository": "https://github.com/kcl-lang/lib", - "version": "0.12.1", + "version": "0.12.2", "os": [ "win32" ], diff --git a/nodejs/npm/win32-x64-msvc/package.json b/nodejs/npm/win32-x64-msvc/package.json index 4b020377..a6ec180a 100644 --- a/nodejs/npm/win32-x64-msvc/package.json +++ b/nodejs/npm/win32-x64-msvc/package.json @@ -1,7 +1,7 @@ { "name": "@kcl-lang/lib-win32-x64-msvc", "repository": "https://github.com/kcl-lang/lib", - "version": "0.12.1", + "version": "0.12.2", "os": [ "win32" ], diff --git a/nodejs/package.json b/nodejs/package.json index 70b02d13..d72e0c06 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "kcl-lib", - "version": "0.12.1", + "version": "0.12.2", "repository": "https://github.com/kcl-lang/lib", "license": "Apache-2.0", "main": "index.js", diff --git a/python/Cargo.toml b/python/Cargo.toml index a80de9c5..13fc3920 100644 --- a/python/Cargo.toml +++ b/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-python-lib" -version = "0.12.1" +version = "0.12.2" edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -8,7 +8,7 @@ edition = "2024" crate-type = ["cdylib"] [dependencies] -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } # fix the pyos version to 0.20.1 # because https://github.com/PyO3/maturin/issues/1960 pyo3 = "=0.20.2" diff --git a/python/kcl_lib/api/spec_pb2.py b/python/kcl_lib/api/spec_pb2.py index dcf2e482..44c3ee13 100644 --- a/python/kcl_lib/api/spec_pb2.py +++ b/python/kcl_lib/api/spec_pb2.py @@ -19,7 +19,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\nspec.proto\x12\x0b\x63om.kcl.api"1\n\x0b\x45xternalPkg\x12\x10\n\x08pkg_name\x18\x01 \x01(\t\x12\x10\n\x08pkg_path\x18\x02 \x01(\t"\'\n\x08\x41rgument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t"L\n\x05\x45rror\x12\r\n\x05level\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12&\n\x08messages\x18\x03 \x03(\x0b\x32\x14.com.kcl.api.Message":\n\x07Message\x12\x0b\n\x03msg\x18\x01 \x01(\t\x12"\n\x03pos\x18\x02 \x01(\x0b\x32\x15.com.kcl.api.Position"\x19\n\x08PingArgs\x12\r\n\x05value\x18\x01 \x01(\t"\x1b\n\nPingResult\x12\r\n\x05value\x18\x01 \x01(\t"\x10\n\x0eGetVersionArgs"\\\n\x10GetVersionResult\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x10\n\x08\x63hecksum\x18\x02 \x01(\t\x12\x0f\n\x07git_sha\x18\x03 \x01(\t\x12\x14\n\x0cversion_info\x18\x04 \x01(\t"\x10\n\x0eListMethodArgs",\n\x10ListMethodResult\x12\x18\n\x10method_name_list\x18\x01 \x03(\t"^\n\rParseFileArgs\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12/\n\rexternal_pkgs\x18\x03 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg"U\n\x0fParseFileResult\x12\x10\n\x08\x61st_json\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x65ps\x18\x02 \x03(\t\x12"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error"c\n\x10ParseProgramArgs\x12\r\n\x05paths\x18\x01 \x03(\t\x12\x0f\n\x07sources\x18\x02 \x03(\t\x12/\n\rexternal_pkgs\x18\x03 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg"Y\n\x12ParseProgramResult\x12\x10\n\x08\x61st_json\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error"\x87\x01\n\x0fLoadPackageArgs\x12\x31\n\nparse_args\x18\x01 \x01(\x0b\x32\x1d.com.kcl.api.ParseProgramArgs\x12\x13\n\x0bresolve_ast\x18\x02 \x01(\x08\x12\x14\n\x0cload_builtin\x18\x03 \x01(\x08\x12\x16\n\x0ewith_ast_index\x18\x04 \x01(\x08"\xf0\x07\n\x11LoadPackageResult\x12\x0f\n\x07program\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12(\n\x0cparse_errors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error\x12\'\n\x0btype_errors\x18\x04 \x03(\x0b\x32\x12.com.kcl.api.Error\x12:\n\x06scopes\x18\x05 \x03(\x0b\x32*.com.kcl.api.LoadPackageResult.ScopesEntry\x12<\n\x07symbols\x18\x06 \x03(\x0b\x32+.com.kcl.api.LoadPackageResult.SymbolsEntry\x12J\n\x0fnode_symbol_map\x18\x07 \x03(\x0b\x32\x31.com.kcl.api.LoadPackageResult.NodeSymbolMapEntry\x12J\n\x0fsymbol_node_map\x18\x08 \x03(\x0b\x32\x31.com.kcl.api.LoadPackageResult.SymbolNodeMapEntry\x12[\n\x18\x66ully_qualified_name_map\x18\t \x03(\x0b\x32\x39.com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry\x12\x46\n\rpkg_scope_map\x18\n \x03(\x0b\x32/.com.kcl.api.LoadPackageResult.PkgScopeMapEntry\x1a\x41\n\x0bScopesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.com.kcl.api.Scope:\x02\x38\x01\x1a\x43\n\x0cSymbolsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12"\n\x05value\x18\x02 \x01(\x0b\x32\x13.com.kcl.api.Symbol:\x02\x38\x01\x1aN\n\x12NodeSymbolMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex:\x02\x38\x01\x1a\x34\n\x12SymbolNodeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aV\n\x1a\x46ullyQualifiedNameMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex:\x02\x38\x01\x1aK\n\x10PkgScopeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.com.kcl.api.ScopeIndex:\x02\x38\x01"=\n\x11ListOptionsResult\x12(\n\x07options\x18\x02 \x03(\x0b\x32\x17.com.kcl.api.OptionHelp"_\n\nOptionHelp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x10\n\x08required\x18\x03 \x01(\x08\x12\x15\n\rdefault_value\x18\x04 \x01(\t\x12\x0c\n\x04help\x18\x05 \x01(\t"\xc4\x01\n\x06Symbol\x12 \n\x02ty\x18\x01 \x01(\x0b\x32\x14.com.kcl.api.KclType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\'\n\x05owner\x18\x03 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12%\n\x03\x64\x65\x66\x18\x04 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12\'\n\x05\x61ttrs\x18\x05 \x03(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12\x11\n\tis_global\x18\x06 \x01(\x08"\xba\x01\n\x05Scope\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\'\n\x06parent\x18\x02 \x01(\x0b\x32\x17.com.kcl.api.ScopeIndex\x12\'\n\x05owner\x18\x03 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12)\n\x08\x63hildren\x18\x04 \x03(\x0b\x32\x17.com.kcl.api.ScopeIndex\x12&\n\x04\x64\x65\x66s\x18\x05 \x03(\x0b\x32\x18.com.kcl.api.SymbolIndex"1\n\x0bSymbolIndex\x12\t\n\x01i\x18\x01 \x01(\x04\x12\t\n\x01g\x18\x02 \x01(\x04\x12\x0c\n\x04kind\x18\x03 \x01(\t"0\n\nScopeIndex\x12\t\n\x01i\x18\x01 \x01(\x04\x12\t\n\x01g\x18\x02 \x01(\x04\x12\x0c\n\x04kind\x18\x03 \x01(\t"\xcf\x03\n\x0f\x45xecProgramArgs\x12\x10\n\x08work_dir\x18\x01 \x01(\t\x12\x17\n\x0fk_filename_list\x18\x02 \x03(\t\x12\x13\n\x0bk_code_list\x18\x03 \x03(\t\x12#\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x15.com.kcl.api.Argument\x12\x11\n\toverrides\x18\x05 \x03(\t\x12\x1b\n\x13\x64isable_yaml_result\x18\x06 \x01(\x08\x12\x1a\n\x12print_override_ast\x18\x07 \x01(\x08\x12\x1a\n\x12strict_range_check\x18\x08 \x01(\x08\x12\x14\n\x0c\x64isable_none\x18\t \x01(\x08\x12\x0f\n\x07verbose\x18\n \x01(\x05\x12\r\n\x05\x64\x65\x62ug\x18\x0b \x01(\x05\x12\x11\n\tsort_keys\x18\x0c \x01(\x08\x12/\n\rexternal_pkgs\x18\r \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg\x12 \n\x18include_schema_type_path\x18\x0e \x01(\x08\x12\x14\n\x0c\x63ompile_only\x18\x0f \x01(\x08\x12\x13\n\x0bshow_hidden\x18\x10 \x01(\x08\x12\x15\n\rpath_selector\x18\x11 \x03(\t\x12\x11\n\tfast_eval\x18\x12 \x01(\x08"g\n\x11\x45xecProgramResult\x12\x13\n\x0bjson_result\x18\x01 \x01(\t\x12\x13\n\x0byaml_result\x18\x02 \x01(\t\x12\x13\n\x0blog_message\x18\x03 \x01(\t\x12\x13\n\x0b\x65rr_message\x18\x04 \x01(\t"S\n\x10\x42uildProgramArgs\x12/\n\texec_args\x18\x01 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs\x12\x0e\n\x06output\x18\x02 \x01(\t""\n\x12\x42uildProgramResult\x12\x0c\n\x04path\x18\x01 \x01(\t"Q\n\x10\x45xecArtifactArgs\x12\x0c\n\x04path\x18\x01 \x01(\t\x12/\n\texec_args\x18\x02 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs" \n\x0e\x46ormatCodeArgs\x12\x0e\n\x06source\x18\x01 \x01(\t"%\n\x10\x46ormatCodeResult\x12\x11\n\tformatted\x18\x01 \x01(\x0c"\x1e\n\x0e\x46ormatPathArgs\x12\x0c\n\x04path\x18\x01 \x01(\t")\n\x10\x46ormatPathResult\x12\x15\n\rchanged_paths\x18\x01 \x03(\t"\x1d\n\x0cLintPathArgs\x12\r\n\x05paths\x18\x01 \x03(\t"!\n\x0eLintPathResult\x12\x0f\n\x07results\x18\x01 \x03(\t"E\n\x10OverrideFileArgs\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\r\n\x05specs\x18\x02 \x03(\t\x12\x14\n\x0cimport_paths\x18\x03 \x03(\t"N\n\x12OverrideFileResult\x12\x0e\n\x06result\x18\x01 \x01(\x08\x12(\n\x0cparse_errors\x18\x02 \x03(\x0b\x32\x12.com.kcl.api.Error"-\n\x14ListVariablesOptions\x12\x15\n\rmerge_program\x18\x01 \x01(\x08"8\n\x0cVariableList\x12(\n\tvariables\x18\x01 \x03(\x0b\x32\x15.com.kcl.api.Variable"e\n\x11ListVariablesArgs\x12\r\n\x05\x66iles\x18\x01 \x03(\t\x12\r\n\x05specs\x18\x02 \x03(\t\x12\x32\n\x07options\x18\x03 \x01(\x0b\x32!.com.kcl.api.ListVariablesOptions"\xeb\x01\n\x13ListVariablesResult\x12\x42\n\tvariables\x18\x01 \x03(\x0b\x32/.com.kcl.api.ListVariablesResult.VariablesEntry\x12\x19\n\x11unsupported_codes\x18\x02 \x03(\t\x12(\n\x0cparse_errors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error\x1aK\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.com.kcl.api.VariableList:\x02\x38\x01"\x94\x01\n\x08Variable\x12\r\n\x05value\x18\x01 \x01(\t\x12\x11\n\ttype_name\x18\x02 \x01(\t\x12\x0e\n\x06op_sym\x18\x03 \x01(\t\x12)\n\nlist_items\x18\x04 \x03(\x0b\x32\x15.com.kcl.api.Variable\x12+\n\x0c\x64ict_entries\x18\x05 \x03(\x0b\x32\x15.com.kcl.api.MapEntry"=\n\x08MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.com.kcl.api.Variable"`\n\x18GetSchemaTypeMappingArgs\x12/\n\texec_args\x18\x01 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs\x12\x13\n\x0bschema_name\x18\x02 \x01(\t"\xc9\x01\n\x1aGetSchemaTypeMappingResult\x12[\n\x13schema_type_mapping\x18\x01 \x03(\x0b\x32>.com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry\x1aN\n\x16SchemaTypeMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.KclType:\x02\x38\x01"\xdf\x01\n#GetSchemaTypeMappingUnderPathResult\x12\x64\n\x13schema_type_mapping\x18\x01 \x03(\x0b\x32G.com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry\x1aR\n\x16SchemaTypeMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.com.kcl.api.SchemaTypes:\x02\x38\x01"8\n\x0bSchemaTypes\x12)\n\x0bschema_type\x18\x01 \x03(\x0b\x32\x14.com.kcl.api.KclType"\xb7\x01\n\x10ValidateCodeArgs\x12\x10\n\x08\x64\x61tafile\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\t\x12\x0c\n\x04\x66ile\x18\x03 \x01(\t\x12\x0c\n\x04\x63ode\x18\x04 \x01(\t\x12\x0e\n\x06schema\x18\x05 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x06 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x07 \x01(\t\x12/\n\rexternal_pkgs\x18\x08 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg":\n\x12ValidateCodeResult\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t":\n\x08Position\x12\x0c\n\x04line\x18\x01 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\x03\x12\x10\n\x08\x66ilename\x18\x03 \x01(\t"h\n\x10ListDepFilesArgs\x12\x10\n\x08work_dir\x18\x01 \x01(\t\x12\x14\n\x0cuse_abs_path\x18\x02 \x01(\x08\x12\x13\n\x0binclude_all\x18\x03 \x01(\x08\x12\x17\n\x0fuse_fast_parser\x18\x04 \x01(\x08"E\n\x12ListDepFilesResult\x12\x0f\n\x07pkgroot\x18\x01 \x01(\t\x12\x0f\n\x07pkgpath\x18\x02 \x01(\t\x12\r\n\x05\x66iles\x18\x03 \x03(\t"8\n\x15LoadSettingsFilesArgs\x12\x10\n\x08work_dir\x18\x01 \x01(\t\x12\r\n\x05\x66iles\x18\x02 \x03(\t"z\n\x17LoadSettingsFilesResult\x12/\n\x0fkcl_cli_configs\x18\x01 \x01(\x0b\x32\x16.com.kcl.api.CliConfig\x12.\n\x0bkcl_options\x18\x02 \x03(\x0b\x32\x19.com.kcl.api.KeyValuePair"\x83\x02\n\tCliConfig\x12\r\n\x05\x66iles\x18\x01 \x03(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\x12\x11\n\toverrides\x18\x03 \x03(\t\x12\x15\n\rpath_selector\x18\x04 \x03(\t\x12\x1a\n\x12strict_range_check\x18\x05 \x01(\x08\x12\x14\n\x0c\x64isable_none\x18\x06 \x01(\x08\x12\x0f\n\x07verbose\x18\x07 \x01(\x03\x12\r\n\x05\x64\x65\x62ug\x18\x08 \x01(\x08\x12\x11\n\tsort_keys\x18\t \x01(\x08\x12\x13\n\x0bshow_hidden\x18\n \x01(\x08\x12 \n\x18include_schema_type_path\x18\x0b \x01(\x08\x12\x11\n\tfast_eval\x18\x0c \x01(\x08"*\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t"]\n\nRenameArgs\x12\x14\n\x0cpackage_root\x18\x01 \x01(\t\x12\x13\n\x0bsymbol_path\x18\x02 \x01(\t\x12\x12\n\nfile_paths\x18\x03 \x03(\t\x12\x10\n\x08new_name\x18\x04 \x01(\t"%\n\x0cRenameResult\x12\x15\n\rchanged_files\x18\x01 \x03(\t"\xc5\x01\n\x0eRenameCodeArgs\x12\x14\n\x0cpackage_root\x18\x01 \x01(\t\x12\x13\n\x0bsymbol_path\x18\x02 \x01(\t\x12\x42\n\x0csource_codes\x18\x03 \x03(\x0b\x32,.com.kcl.api.RenameCodeArgs.SourceCodesEntry\x12\x10\n\x08new_name\x18\x04 \x01(\t\x1a\x32\n\x10SourceCodesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x8f\x01\n\x10RenameCodeResult\x12\x46\n\rchanged_codes\x18\x01 \x03(\x0b\x32/.com.kcl.api.RenameCodeResult.ChangedCodesEntry\x1a\x33\n\x11\x43hangedCodesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"t\n\x08TestArgs\x12/\n\texec_args\x18\x01 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs\x12\x10\n\x08pkg_list\x18\x02 \x03(\t\x12\x12\n\nrun_regexp\x18\x03 \x01(\t\x12\x11\n\tfail_fast\x18\x04 \x01(\x08"5\n\nTestResult\x12\'\n\x04info\x18\x02 \x03(\x0b\x32\x19.com.kcl.api.TestCaseInfo"R\n\x0cTestCaseInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\x10\n\x08\x64uration\x18\x03 \x01(\x04\x12\x13\n\x0blog_message\x18\x04 \x01(\t"?\n\x16UpdateDependenciesArgs\x12\x15\n\rmanifest_path\x18\x01 \x01(\t\x12\x0e\n\x06vendor\x18\x02 \x01(\x08"K\n\x18UpdateDependenciesResult\x12/\n\rexternal_pkgs\x18\x03 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg"\xf3\x04\n\x07KclType\x12\x0c\n\x04type\x18\x01 \x01(\t\x12)\n\x0bunion_types\x18\x02 \x03(\x0b\x32\x14.com.kcl.api.KclType\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x03 \x01(\t\x12\x13\n\x0bschema_name\x18\x04 \x01(\t\x12\x12\n\nschema_doc\x18\x05 \x01(\t\x12\x38\n\nproperties\x18\x06 \x03(\x0b\x32$.com.kcl.api.KclType.PropertiesEntry\x12\x10\n\x08required\x18\x07 \x03(\t\x12!\n\x03key\x18\x08 \x01(\x0b\x32\x14.com.kcl.api.KclType\x12"\n\x04item\x18\t \x01(\x0b\x32\x14.com.kcl.api.KclType\x12\x0c\n\x04line\x18\n \x01(\x05\x12*\n\ndecorators\x18\x0b \x03(\x0b\x32\x16.com.kcl.api.Decorator\x12\x10\n\x08\x66ilename\x18\x0c \x01(\t\x12\x10\n\x08pkg_path\x18\r \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x0e \x01(\t\x12\x34\n\x08\x65xamples\x18\x0f \x03(\x0b\x32".com.kcl.api.KclType.ExamplesEntry\x12)\n\x0b\x62\x61se_schema\x18\x10 \x01(\x0b\x32\x14.com.kcl.api.KclType\x1aG\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.KclType:\x02\x38\x01\x1a\x45\n\rExamplesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.Example:\x02\x38\x01"\x95\x01\n\tDecorator\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x03(\t\x12\x36\n\x08keywords\x18\x03 \x03(\x0b\x32$.com.kcl.api.Decorator.KeywordsEntry\x1a/\n\rKeywordsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01">\n\x07\x45xample\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t2\x92\x01\n\x0e\x42uiltinService\x12\x36\n\x04Ping\x12\x15.com.kcl.api.PingArgs\x1a\x17.com.kcl.api.PingResult\x12H\n\nListMethod\x12\x1b.com.kcl.api.ListMethodArgs\x1a\x1d.com.kcl.api.ListMethodResult2\xb0\r\n\nKclService\x12\x36\n\x04Ping\x12\x15.com.kcl.api.PingArgs\x1a\x17.com.kcl.api.PingResult\x12H\n\nGetVersion\x12\x1b.com.kcl.api.GetVersionArgs\x1a\x1d.com.kcl.api.GetVersionResult\x12N\n\x0cParseProgram\x12\x1d.com.kcl.api.ParseProgramArgs\x1a\x1f.com.kcl.api.ParseProgramResult\x12\x45\n\tParseFile\x12\x1a.com.kcl.api.ParseFileArgs\x1a\x1c.com.kcl.api.ParseFileResult\x12K\n\x0bLoadPackage\x12\x1c.com.kcl.api.LoadPackageArgs\x1a\x1e.com.kcl.api.LoadPackageResult\x12L\n\x0bListOptions\x12\x1d.com.kcl.api.ParseProgramArgs\x1a\x1e.com.kcl.api.ListOptionsResult\x12Q\n\rListVariables\x12\x1e.com.kcl.api.ListVariablesArgs\x1a .com.kcl.api.ListVariablesResult\x12K\n\x0b\x45xecProgram\x12\x1c.com.kcl.api.ExecProgramArgs\x1a\x1e.com.kcl.api.ExecProgramResult\x12N\n\x0c\x42uildProgram\x12\x1d.com.kcl.api.BuildProgramArgs\x1a\x1f.com.kcl.api.BuildProgramResult\x12M\n\x0c\x45xecArtifact\x12\x1d.com.kcl.api.ExecArtifactArgs\x1a\x1e.com.kcl.api.ExecProgramResult\x12N\n\x0cOverrideFile\x12\x1d.com.kcl.api.OverrideFileArgs\x1a\x1f.com.kcl.api.OverrideFileResult\x12\x66\n\x14GetSchemaTypeMapping\x12%.com.kcl.api.GetSchemaTypeMappingArgs\x1a\'.com.kcl.api.GetSchemaTypeMappingResult\x12H\n\nFormatCode\x12\x1b.com.kcl.api.FormatCodeArgs\x1a\x1d.com.kcl.api.FormatCodeResult\x12H\n\nFormatPath\x12\x1b.com.kcl.api.FormatPathArgs\x1a\x1d.com.kcl.api.FormatPathResult\x12\x42\n\x08LintPath\x12\x19.com.kcl.api.LintPathArgs\x1a\x1b.com.kcl.api.LintPathResult\x12N\n\x0cValidateCode\x12\x1d.com.kcl.api.ValidateCodeArgs\x1a\x1f.com.kcl.api.ValidateCodeResult\x12N\n\x0cListDepFiles\x12\x1d.com.kcl.api.ListDepFilesArgs\x1a\x1f.com.kcl.api.ListDepFilesResult\x12]\n\x11LoadSettingsFiles\x12".com.kcl.api.LoadSettingsFilesArgs\x1a$.com.kcl.api.LoadSettingsFilesResult\x12<\n\x06Rename\x12\x17.com.kcl.api.RenameArgs\x1a\x19.com.kcl.api.RenameResult\x12H\n\nRenameCode\x12\x1b.com.kcl.api.RenameCodeArgs\x1a\x1d.com.kcl.api.RenameCodeResult\x12\x36\n\x04Test\x12\x15.com.kcl.api.TestArgs\x1a\x17.com.kcl.api.TestResult\x12`\n\x12UpdateDependencies\x12#.com.kcl.api.UpdateDependenciesArgs\x1a%.com.kcl.api.UpdateDependenciesResultB\x14Z\x05.;api\xaa\x02\nKclLib.APIb\x06proto3' + b'\n\nspec.proto\x12\x0b\x63om.kcl.api"1\n\x0b\x45xternalPkg\x12\x10\n\x08pkg_name\x18\x01 \x01(\t\x12\x10\n\x08pkg_path\x18\x02 \x01(\t"\'\n\x08\x41rgument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t"L\n\x05\x45rror\x12\r\n\x05level\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12&\n\x08messages\x18\x03 \x03(\x0b\x32\x14.com.kcl.api.Message":\n\x07Message\x12\x0b\n\x03msg\x18\x01 \x01(\t\x12"\n\x03pos\x18\x02 \x01(\x0b\x32\x15.com.kcl.api.Position"\x19\n\x08PingArgs\x12\r\n\x05value\x18\x01 \x01(\t"\x1b\n\nPingResult\x12\r\n\x05value\x18\x01 \x01(\t"\x10\n\x0eGetVersionArgs"\\\n\x10GetVersionResult\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x10\n\x08\x63hecksum\x18\x02 \x01(\t\x12\x0f\n\x07git_sha\x18\x03 \x01(\t\x12\x14\n\x0cversion_info\x18\x04 \x01(\t"\x10\n\x0eListMethodArgs",\n\x10ListMethodResult\x12\x18\n\x10method_name_list\x18\x01 \x03(\t"^\n\rParseFileArgs\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12/\n\rexternal_pkgs\x18\x03 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg"U\n\x0fParseFileResult\x12\x10\n\x08\x61st_json\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x65ps\x18\x02 \x03(\t\x12"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error"c\n\x10ParseProgramArgs\x12\r\n\x05paths\x18\x01 \x03(\t\x12\x0f\n\x07sources\x18\x02 \x03(\t\x12/\n\rexternal_pkgs\x18\x03 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg"Y\n\x12ParseProgramResult\x12\x10\n\x08\x61st_json\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12"\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error"\x87\x01\n\x0fLoadPackageArgs\x12\x31\n\nparse_args\x18\x01 \x01(\x0b\x32\x1d.com.kcl.api.ParseProgramArgs\x12\x13\n\x0bresolve_ast\x18\x02 \x01(\x08\x12\x14\n\x0cload_builtin\x18\x03 \x01(\x08\x12\x16\n\x0ewith_ast_index\x18\x04 \x01(\x08"\xf0\x07\n\x11LoadPackageResult\x12\x0f\n\x07program\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12(\n\x0cparse_errors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error\x12\'\n\x0btype_errors\x18\x04 \x03(\x0b\x32\x12.com.kcl.api.Error\x12:\n\x06scopes\x18\x05 \x03(\x0b\x32*.com.kcl.api.LoadPackageResult.ScopesEntry\x12<\n\x07symbols\x18\x06 \x03(\x0b\x32+.com.kcl.api.LoadPackageResult.SymbolsEntry\x12J\n\x0fnode_symbol_map\x18\x07 \x03(\x0b\x32\x31.com.kcl.api.LoadPackageResult.NodeSymbolMapEntry\x12J\n\x0fsymbol_node_map\x18\x08 \x03(\x0b\x32\x31.com.kcl.api.LoadPackageResult.SymbolNodeMapEntry\x12[\n\x18\x66ully_qualified_name_map\x18\t \x03(\x0b\x32\x39.com.kcl.api.LoadPackageResult.FullyQualifiedNameMapEntry\x12\x46\n\rpkg_scope_map\x18\n \x03(\x0b\x32/.com.kcl.api.LoadPackageResult.PkgScopeMapEntry\x1a\x41\n\x0bScopesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.com.kcl.api.Scope:\x02\x38\x01\x1a\x43\n\x0cSymbolsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12"\n\x05value\x18\x02 \x01(\x0b\x32\x13.com.kcl.api.Symbol:\x02\x38\x01\x1aN\n\x12NodeSymbolMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex:\x02\x38\x01\x1a\x34\n\x12SymbolNodeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aV\n\x1a\x46ullyQualifiedNameMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex:\x02\x38\x01\x1aK\n\x10PkgScopeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.com.kcl.api.ScopeIndex:\x02\x38\x01"=\n\x11ListOptionsResult\x12(\n\x07options\x18\x02 \x03(\x0b\x32\x17.com.kcl.api.OptionHelp"_\n\nOptionHelp\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x10\n\x08required\x18\x03 \x01(\x08\x12\x15\n\rdefault_value\x18\x04 \x01(\t\x12\x0c\n\x04help\x18\x05 \x01(\t"\xc4\x01\n\x06Symbol\x12 \n\x02ty\x18\x01 \x01(\x0b\x32\x14.com.kcl.api.KclType\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\'\n\x05owner\x18\x03 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12%\n\x03\x64\x65\x66\x18\x04 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12\'\n\x05\x61ttrs\x18\x05 \x03(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12\x11\n\tis_global\x18\x06 \x01(\x08"\xba\x01\n\x05Scope\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\'\n\x06parent\x18\x02 \x01(\x0b\x32\x17.com.kcl.api.ScopeIndex\x12\'\n\x05owner\x18\x03 \x01(\x0b\x32\x18.com.kcl.api.SymbolIndex\x12)\n\x08\x63hildren\x18\x04 \x03(\x0b\x32\x17.com.kcl.api.ScopeIndex\x12&\n\x04\x64\x65\x66s\x18\x05 \x03(\x0b\x32\x18.com.kcl.api.SymbolIndex"1\n\x0bSymbolIndex\x12\t\n\x01i\x18\x01 \x01(\x04\x12\t\n\x01g\x18\x02 \x01(\x04\x12\x0c\n\x04kind\x18\x03 \x01(\t"0\n\nScopeIndex\x12\t\n\x01i\x18\x01 \x01(\x04\x12\t\n\x01g\x18\x02 \x01(\x04\x12\x0c\n\x04kind\x18\x03 \x01(\t"\xcf\x03\n\x0f\x45xecProgramArgs\x12\x10\n\x08work_dir\x18\x01 \x01(\t\x12\x17\n\x0fk_filename_list\x18\x02 \x03(\t\x12\x13\n\x0bk_code_list\x18\x03 \x03(\t\x12#\n\x04\x61rgs\x18\x04 \x03(\x0b\x32\x15.com.kcl.api.Argument\x12\x11\n\toverrides\x18\x05 \x03(\t\x12\x1b\n\x13\x64isable_yaml_result\x18\x06 \x01(\x08\x12\x1a\n\x12print_override_ast\x18\x07 \x01(\x08\x12\x1a\n\x12strict_range_check\x18\x08 \x01(\x08\x12\x14\n\x0c\x64isable_none\x18\t \x01(\x08\x12\x0f\n\x07verbose\x18\n \x01(\x05\x12\r\n\x05\x64\x65\x62ug\x18\x0b \x01(\x05\x12\x11\n\tsort_keys\x18\x0c \x01(\x08\x12/\n\rexternal_pkgs\x18\r \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg\x12 \n\x18include_schema_type_path\x18\x0e \x01(\x08\x12\x14\n\x0c\x63ompile_only\x18\x0f \x01(\x08\x12\x13\n\x0bshow_hidden\x18\x10 \x01(\x08\x12\x15\n\rpath_selector\x18\x11 \x03(\t\x12\x11\n\tfast_eval\x18\x12 \x01(\x08"g\n\x11\x45xecProgramResult\x12\x13\n\x0bjson_result\x18\x01 \x01(\t\x12\x13\n\x0byaml_result\x18\x02 \x01(\t\x12\x13\n\x0blog_message\x18\x03 \x01(\t\x12\x13\n\x0b\x65rr_message\x18\x04 \x01(\t"S\n\x10\x42uildProgramArgs\x12/\n\texec_args\x18\x01 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs\x12\x0e\n\x06output\x18\x02 \x01(\t""\n\x12\x42uildProgramResult\x12\x0c\n\x04path\x18\x01 \x01(\t"Q\n\x10\x45xecArtifactArgs\x12\x0c\n\x04path\x18\x01 \x01(\t\x12/\n\texec_args\x18\x02 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs" \n\x0e\x46ormatCodeArgs\x12\x0e\n\x06source\x18\x01 \x01(\t"%\n\x10\x46ormatCodeResult\x12\x11\n\tformatted\x18\x01 \x01(\x0c"\x1e\n\x0e\x46ormatPathArgs\x12\x0c\n\x04path\x18\x01 \x01(\t")\n\x10\x46ormatPathResult\x12\x15\n\rchanged_paths\x18\x01 \x03(\t"\x1d\n\x0cLintPathArgs\x12\r\n\x05paths\x18\x01 \x03(\t"!\n\x0eLintPathResult\x12\x0f\n\x07results\x18\x01 \x03(\t"E\n\x10OverrideFileArgs\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\r\n\x05specs\x18\x02 \x03(\t\x12\x14\n\x0cimport_paths\x18\x03 \x03(\t"N\n\x12OverrideFileResult\x12\x0e\n\x06result\x18\x01 \x01(\x08\x12(\n\x0cparse_errors\x18\x02 \x03(\x0b\x32\x12.com.kcl.api.Error"-\n\x14ListVariablesOptions\x12\x15\n\rmerge_program\x18\x01 \x01(\x08"8\n\x0cVariableList\x12(\n\tvariables\x18\x01 \x03(\x0b\x32\x15.com.kcl.api.Variable"e\n\x11ListVariablesArgs\x12\r\n\x05\x66iles\x18\x01 \x03(\t\x12\r\n\x05specs\x18\x02 \x03(\t\x12\x32\n\x07options\x18\x03 \x01(\x0b\x32!.com.kcl.api.ListVariablesOptions"\xeb\x01\n\x13ListVariablesResult\x12\x42\n\tvariables\x18\x01 \x03(\x0b\x32/.com.kcl.api.ListVariablesResult.VariablesEntry\x12\x19\n\x11unsupported_codes\x18\x02 \x03(\t\x12(\n\x0cparse_errors\x18\x03 \x03(\x0b\x32\x12.com.kcl.api.Error\x1aK\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.com.kcl.api.VariableList:\x02\x38\x01"\x94\x01\n\x08Variable\x12\r\n\x05value\x18\x01 \x01(\t\x12\x11\n\ttype_name\x18\x02 \x01(\t\x12\x0e\n\x06op_sym\x18\x03 \x01(\t\x12)\n\nlist_items\x18\x04 \x03(\x0b\x32\x15.com.kcl.api.Variable\x12+\n\x0c\x64ict_entries\x18\x05 \x03(\x0b\x32\x15.com.kcl.api.MapEntry"=\n\x08MapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.com.kcl.api.Variable"`\n\x18GetSchemaTypeMappingArgs\x12/\n\texec_args\x18\x01 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs\x12\x13\n\x0bschema_name\x18\x02 \x01(\t"\xc9\x01\n\x1aGetSchemaTypeMappingResult\x12[\n\x13schema_type_mapping\x18\x01 \x03(\x0b\x32>.com.kcl.api.GetSchemaTypeMappingResult.SchemaTypeMappingEntry\x1aN\n\x16SchemaTypeMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.KclType:\x02\x38\x01"\xdf\x01\n#GetSchemaTypeMappingUnderPathResult\x12\x64\n\x13schema_type_mapping\x18\x01 \x03(\x0b\x32G.com.kcl.api.GetSchemaTypeMappingUnderPathResult.SchemaTypeMappingEntry\x1aR\n\x16SchemaTypeMappingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.com.kcl.api.SchemaTypes:\x02\x38\x01"8\n\x0bSchemaTypes\x12)\n\x0bschema_type\x18\x01 \x03(\x0b\x32\x14.com.kcl.api.KclType"\xb7\x01\n\x10ValidateCodeArgs\x12\x10\n\x08\x64\x61tafile\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\t\x12\x0c\n\x04\x66ile\x18\x03 \x01(\t\x12\x0c\n\x04\x63ode\x18\x04 \x01(\t\x12\x0e\n\x06schema\x18\x05 \x01(\t\x12\x16\n\x0e\x61ttribute_name\x18\x06 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x07 \x01(\t\x12/\n\rexternal_pkgs\x18\x08 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg":\n\x12ValidateCodeResult\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x0b\x65rr_message\x18\x02 \x01(\t":\n\x08Position\x12\x0c\n\x04line\x18\x01 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\x03\x12\x10\n\x08\x66ilename\x18\x03 \x01(\t"h\n\x10ListDepFilesArgs\x12\x10\n\x08work_dir\x18\x01 \x01(\t\x12\x14\n\x0cuse_abs_path\x18\x02 \x01(\x08\x12\x13\n\x0binclude_all\x18\x03 \x01(\x08\x12\x17\n\x0fuse_fast_parser\x18\x04 \x01(\x08"E\n\x12ListDepFilesResult\x12\x0f\n\x07pkgroot\x18\x01 \x01(\t\x12\x0f\n\x07pkgpath\x18\x02 \x01(\t\x12\r\n\x05\x66iles\x18\x03 \x03(\t"8\n\x15LoadSettingsFilesArgs\x12\x10\n\x08work_dir\x18\x01 \x01(\t\x12\r\n\x05\x66iles\x18\x02 \x03(\t"z\n\x17LoadSettingsFilesResult\x12/\n\x0fkcl_cli_configs\x18\x01 \x01(\x0b\x32\x16.com.kcl.api.CliConfig\x12.\n\x0bkcl_options\x18\x02 \x03(\x0b\x32\x19.com.kcl.api.KeyValuePair"\x83\x02\n\tCliConfig\x12\r\n\x05\x66iles\x18\x01 \x03(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\x12\x11\n\toverrides\x18\x03 \x03(\t\x12\x15\n\rpath_selector\x18\x04 \x03(\t\x12\x1a\n\x12strict_range_check\x18\x05 \x01(\x08\x12\x14\n\x0c\x64isable_none\x18\x06 \x01(\x08\x12\x0f\n\x07verbose\x18\x07 \x01(\x03\x12\r\n\x05\x64\x65\x62ug\x18\x08 \x01(\x08\x12\x11\n\tsort_keys\x18\t \x01(\x08\x12\x13\n\x0bshow_hidden\x18\n \x01(\x08\x12 \n\x18include_schema_type_path\x18\x0b \x01(\x08\x12\x11\n\tfast_eval\x18\x0c \x01(\x08"*\n\x0cKeyValuePair\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t"]\n\nRenameArgs\x12\x14\n\x0cpackage_root\x18\x01 \x01(\t\x12\x13\n\x0bsymbol_path\x18\x02 \x01(\t\x12\x12\n\nfile_paths\x18\x03 \x03(\t\x12\x10\n\x08new_name\x18\x04 \x01(\t"%\n\x0cRenameResult\x12\x15\n\rchanged_files\x18\x01 \x03(\t"\xc5\x01\n\x0eRenameCodeArgs\x12\x14\n\x0cpackage_root\x18\x01 \x01(\t\x12\x13\n\x0bsymbol_path\x18\x02 \x01(\t\x12\x42\n\x0csource_codes\x18\x03 \x03(\x0b\x32,.com.kcl.api.RenameCodeArgs.SourceCodesEntry\x12\x10\n\x08new_name\x18\x04 \x01(\t\x1a\x32\n\x10SourceCodesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x8f\x01\n\x10RenameCodeResult\x12\x46\n\rchanged_codes\x18\x01 \x03(\x0b\x32/.com.kcl.api.RenameCodeResult.ChangedCodesEntry\x1a\x33\n\x11\x43hangedCodesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"t\n\x08TestArgs\x12/\n\texec_args\x18\x01 \x01(\x0b\x32\x1c.com.kcl.api.ExecProgramArgs\x12\x10\n\x08pkg_list\x18\x02 \x03(\t\x12\x12\n\nrun_regexp\x18\x03 \x01(\t\x12\x11\n\tfail_fast\x18\x04 \x01(\x08"5\n\nTestResult\x12\'\n\x04info\x18\x02 \x03(\x0b\x32\x19.com.kcl.api.TestCaseInfo"R\n\x0cTestCaseInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\x10\n\x08\x64uration\x18\x03 \x01(\x04\x12\x13\n\x0blog_message\x18\x04 \x01(\t"?\n\x16UpdateDependenciesArgs\x12\x15\n\rmanifest_path\x18\x01 \x01(\t\x12\x0e\n\x06vendor\x18\x02 \x01(\x08"K\n\x18UpdateDependenciesResult\x12/\n\rexternal_pkgs\x18\x03 \x03(\x0b\x32\x18.com.kcl.api.ExternalPkg"\x81\x06\n\x07KclType\x12\x0c\n\x04type\x18\x01 \x01(\t\x12)\n\x0bunion_types\x18\x02 \x03(\x0b\x32\x14.com.kcl.api.KclType\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x03 \x01(\t\x12\x13\n\x0bschema_name\x18\x04 \x01(\t\x12\x12\n\nschema_doc\x18\x05 \x01(\t\x12\x38\n\nproperties\x18\x06 \x03(\x0b\x32$.com.kcl.api.KclType.PropertiesEntry\x12\x10\n\x08required\x18\x07 \x03(\t\x12!\n\x03key\x18\x08 \x01(\x0b\x32\x14.com.kcl.api.KclType\x12"\n\x04item\x18\t \x01(\x0b\x32\x14.com.kcl.api.KclType\x12\x0c\n\x04line\x18\n \x01(\x05\x12*\n\ndecorators\x18\x0b \x03(\x0b\x32\x16.com.kcl.api.Decorator\x12\x10\n\x08\x66ilename\x18\x0c \x01(\t\x12\x10\n\x08pkg_path\x18\r \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x0e \x01(\t\x12\x34\n\x08\x65xamples\x18\x0f \x03(\x0b\x32".com.kcl.api.KclType.ExamplesEntry\x12)\n\x0b\x62\x61se_schema\x18\x10 \x01(\x0b\x32\x14.com.kcl.api.KclType\x12\x30\n\x08\x66unction\x18\x11 \x01(\x0b\x32\x19.com.kcl.api.FunctionTypeH\x00\x88\x01\x01\x12\x39\n\x0findex_signature\x18\x12 \x01(\x0b\x32\x1b.com.kcl.api.IndexSignatureH\x01\x88\x01\x01\x1aG\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.KclType:\x02\x38\x01\x1a\x45\n\rExamplesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.Example:\x02\x38\x01\x42\x0b\n\t_functionB\x12\n\x10_index_signature"_\n\x0c\x46unctionType\x12&\n\x06params\x18\x01 \x03(\x0b\x32\x16.com.kcl.api.Parameter\x12\'\n\treturn_ty\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.KclType";\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12 \n\x02ty\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.KclType"\x8d\x01\n\x0eIndexSignature\x12\x15\n\x08key_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12!\n\x03key\x18\x02 \x01(\x0b\x32\x14.com.kcl.api.KclType\x12!\n\x03val\x18\x03 \x01(\x0b\x32\x14.com.kcl.api.KclType\x12\x11\n\tany_other\x18\x04 \x01(\x08\x42\x0b\n\t_key_name"\x95\x01\n\tDecorator\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x03(\t\x12\x36\n\x08keywords\x18\x03 \x03(\x0b\x32$.com.kcl.api.Decorator.KeywordsEntry\x1a/\n\rKeywordsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01">\n\x07\x45xample\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t2\x92\x01\n\x0e\x42uiltinService\x12\x36\n\x04Ping\x12\x15.com.kcl.api.PingArgs\x1a\x17.com.kcl.api.PingResult\x12H\n\nListMethod\x12\x1b.com.kcl.api.ListMethodArgs\x1a\x1d.com.kcl.api.ListMethodResult2\xb0\r\n\nKclService\x12\x36\n\x04Ping\x12\x15.com.kcl.api.PingArgs\x1a\x17.com.kcl.api.PingResult\x12H\n\nGetVersion\x12\x1b.com.kcl.api.GetVersionArgs\x1a\x1d.com.kcl.api.GetVersionResult\x12N\n\x0cParseProgram\x12\x1d.com.kcl.api.ParseProgramArgs\x1a\x1f.com.kcl.api.ParseProgramResult\x12\x45\n\tParseFile\x12\x1a.com.kcl.api.ParseFileArgs\x1a\x1c.com.kcl.api.ParseFileResult\x12K\n\x0bLoadPackage\x12\x1c.com.kcl.api.LoadPackageArgs\x1a\x1e.com.kcl.api.LoadPackageResult\x12L\n\x0bListOptions\x12\x1d.com.kcl.api.ParseProgramArgs\x1a\x1e.com.kcl.api.ListOptionsResult\x12Q\n\rListVariables\x12\x1e.com.kcl.api.ListVariablesArgs\x1a .com.kcl.api.ListVariablesResult\x12K\n\x0b\x45xecProgram\x12\x1c.com.kcl.api.ExecProgramArgs\x1a\x1e.com.kcl.api.ExecProgramResult\x12N\n\x0c\x42uildProgram\x12\x1d.com.kcl.api.BuildProgramArgs\x1a\x1f.com.kcl.api.BuildProgramResult\x12M\n\x0c\x45xecArtifact\x12\x1d.com.kcl.api.ExecArtifactArgs\x1a\x1e.com.kcl.api.ExecProgramResult\x12N\n\x0cOverrideFile\x12\x1d.com.kcl.api.OverrideFileArgs\x1a\x1f.com.kcl.api.OverrideFileResult\x12\x66\n\x14GetSchemaTypeMapping\x12%.com.kcl.api.GetSchemaTypeMappingArgs\x1a\'.com.kcl.api.GetSchemaTypeMappingResult\x12H\n\nFormatCode\x12\x1b.com.kcl.api.FormatCodeArgs\x1a\x1d.com.kcl.api.FormatCodeResult\x12H\n\nFormatPath\x12\x1b.com.kcl.api.FormatPathArgs\x1a\x1d.com.kcl.api.FormatPathResult\x12\x42\n\x08LintPath\x12\x19.com.kcl.api.LintPathArgs\x1a\x1b.com.kcl.api.LintPathResult\x12N\n\x0cValidateCode\x12\x1d.com.kcl.api.ValidateCodeArgs\x1a\x1f.com.kcl.api.ValidateCodeResult\x12N\n\x0cListDepFiles\x12\x1d.com.kcl.api.ListDepFilesArgs\x1a\x1f.com.kcl.api.ListDepFilesResult\x12]\n\x11LoadSettingsFiles\x12".com.kcl.api.LoadSettingsFilesArgs\x1a$.com.kcl.api.LoadSettingsFilesResult\x12<\n\x06Rename\x12\x17.com.kcl.api.RenameArgs\x1a\x19.com.kcl.api.RenameResult\x12H\n\nRenameCode\x12\x1b.com.kcl.api.RenameCodeArgs\x1a\x1d.com.kcl.api.RenameCodeResult\x12\x36\n\x04Test\x12\x15.com.kcl.api.TestArgs\x1a\x17.com.kcl.api.TestResult\x12`\n\x12UpdateDependencies\x12#.com.kcl.api.UpdateDependenciesArgs\x1a%.com.kcl.api.UpdateDependenciesResultB\x14Z\x05.;api\xaa\x02\nKclLib.APIb\x06proto3' ) _globals = globals() @@ -223,19 +223,25 @@ _globals["_UPDATEDEPENDENCIESRESULT"]._serialized_start = 6821 _globals["_UPDATEDEPENDENCIESRESULT"]._serialized_end = 6896 _globals["_KCLTYPE"]._serialized_start = 6899 - _globals["_KCLTYPE"]._serialized_end = 7526 - _globals["_KCLTYPE_PROPERTIESENTRY"]._serialized_start = 7384 - _globals["_KCLTYPE_PROPERTIESENTRY"]._serialized_end = 7455 - _globals["_KCLTYPE_EXAMPLESENTRY"]._serialized_start = 7457 - _globals["_KCLTYPE_EXAMPLESENTRY"]._serialized_end = 7526 - _globals["_DECORATOR"]._serialized_start = 7529 - _globals["_DECORATOR"]._serialized_end = 7678 - _globals["_DECORATOR_KEYWORDSENTRY"]._serialized_start = 7631 - _globals["_DECORATOR_KEYWORDSENTRY"]._serialized_end = 7678 - _globals["_EXAMPLE"]._serialized_start = 7680 - _globals["_EXAMPLE"]._serialized_end = 7742 - _globals["_BUILTINSERVICE"]._serialized_start = 7745 - _globals["_BUILTINSERVICE"]._serialized_end = 7891 - _globals["_KCLSERVICE"]._serialized_start = 7894 - _globals["_KCLSERVICE"]._serialized_end = 9606 + _globals["_KCLTYPE"]._serialized_end = 7668 + _globals["_KCLTYPE_PROPERTIESENTRY"]._serialized_start = 7493 + _globals["_KCLTYPE_PROPERTIESENTRY"]._serialized_end = 7564 + _globals["_KCLTYPE_EXAMPLESENTRY"]._serialized_start = 7566 + _globals["_KCLTYPE_EXAMPLESENTRY"]._serialized_end = 7635 + _globals["_FUNCTIONTYPE"]._serialized_start = 7670 + _globals["_FUNCTIONTYPE"]._serialized_end = 7765 + _globals["_PARAMETER"]._serialized_start = 7767 + _globals["_PARAMETER"]._serialized_end = 7826 + _globals["_INDEXSIGNATURE"]._serialized_start = 7829 + _globals["_INDEXSIGNATURE"]._serialized_end = 7970 + _globals["_DECORATOR"]._serialized_start = 7973 + _globals["_DECORATOR"]._serialized_end = 8122 + _globals["_DECORATOR_KEYWORDSENTRY"]._serialized_start = 8075 + _globals["_DECORATOR_KEYWORDSENTRY"]._serialized_end = 8122 + _globals["_EXAMPLE"]._serialized_start = 8124 + _globals["_EXAMPLE"]._serialized_end = 8186 + _globals["_BUILTINSERVICE"]._serialized_start = 8189 + _globals["_BUILTINSERVICE"]._serialized_end = 8335 + _globals["_KCLSERVICE"]._serialized_start = 8338 + _globals["_KCLSERVICE"]._serialized_end = 10050 # @@protoc_insertion_point(module_scope) diff --git a/python/kcl_lib/api/spec_pb2.pyi b/python/kcl_lib/api/spec_pb2.pyi index d4dbbcea..02c6c859 100644 --- a/python/kcl_lib/api/spec_pb2.pyi +++ b/python/kcl_lib/api/spec_pb2.pyi @@ -1045,6 +1045,8 @@ class KclType(_message.Message): DESCRIPTION_FIELD_NUMBER: _ClassVar[int] EXAMPLES_FIELD_NUMBER: _ClassVar[int] BASE_SCHEMA_FIELD_NUMBER: _ClassVar[int] + FUNCTION_FIELD_NUMBER: _ClassVar[int] + INDEX_SIGNATURE_FIELD_NUMBER: _ClassVar[int] type: str union_types: _containers.RepeatedCompositeFieldContainer[KclType] default: str @@ -1061,6 +1063,8 @@ class KclType(_message.Message): description: str examples: _containers.MessageMap[str, Example] base_schema: KclType + function: FunctionType + index_signature: IndexSignature def __init__( self, type: _Optional[str] = ..., @@ -1079,6 +1083,48 @@ class KclType(_message.Message): description: _Optional[str] = ..., examples: _Optional[_Mapping[str, Example]] = ..., base_schema: _Optional[_Union[KclType, _Mapping]] = ..., + function: _Optional[_Union[FunctionType, _Mapping]] = ..., + index_signature: _Optional[_Union[IndexSignature, _Mapping]] = ..., + ) -> None: ... + +class FunctionType(_message.Message): + __slots__ = () + PARAMS_FIELD_NUMBER: _ClassVar[int] + RETURN_TY_FIELD_NUMBER: _ClassVar[int] + params: _containers.RepeatedCompositeFieldContainer[Parameter] + return_ty: KclType + def __init__( + self, + params: _Optional[_Iterable[_Union[Parameter, _Mapping]]] = ..., + return_ty: _Optional[_Union[KclType, _Mapping]] = ..., + ) -> None: ... + +class Parameter(_message.Message): + __slots__ = () + NAME_FIELD_NUMBER: _ClassVar[int] + TY_FIELD_NUMBER: _ClassVar[int] + name: str + ty: KclType + def __init__( + self, name: _Optional[str] = ..., ty: _Optional[_Union[KclType, _Mapping]] = ... + ) -> None: ... + +class IndexSignature(_message.Message): + __slots__ = () + KEY_NAME_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + VAL_FIELD_NUMBER: _ClassVar[int] + ANY_OTHER_FIELD_NUMBER: _ClassVar[int] + key_name: str + key: KclType + val: KclType + any_other: bool + def __init__( + self, + key_name: _Optional[str] = ..., + key: _Optional[_Union[KclType, _Mapping]] = ..., + val: _Optional[_Union[KclType, _Mapping]] = ..., + any_other: _Optional[bool] = ..., ) -> None: ... class Decorator(_message.Message): diff --git a/python/pyproject.toml b/python/pyproject.toml index e015323c..f61f5426 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "kcl_lib" -version = "0.12.1" +version = "0.12.2" requires-python = ">=3.7" classifiers = [ "Programming Language :: Rust", diff --git a/python/tests/api_test.py b/python/tests/api_test.py index c7a148b4..e4b6dab0 100644 --- a/python/tests/api_test.py +++ b/python/tests/api_test.py @@ -105,7 +105,12 @@ def test_get_schema_type_api(): api = api.API() result = api.get_schema_type_mapping(args) assert result.schema_type_mapping["app"].properties["replicas"].type == "int" - + assert result.schema_type_mapping["app"].properties["my_func"].type == "function" + assert result.schema_type_mapping["app"].properties["maps"].type == "schema" + assert result.schema_type_mapping["app"].properties["maps"].index_signature.key_name == "name" + assert result.schema_type_mapping["app"].properties["maps"].index_signature.key.type == "str" + assert result.schema_type_mapping["app"].properties["maps"].index_signature.val.type == "schema" + assert result.schema_type_mapping["app"].properties["maps"].index_signature.val.properties["name"].type == "str" def test_override_file_api(): """Override KCL file with arguments. See https://www.kcl-lang.io/docs/user_docs/guides/automation diff --git a/python/tests/test_data/schema.k b/python/tests/test_data/schema.k index d3498908..5b006966 100644 --- a/python/tests/test_data/schema.k +++ b/python/tests/test_data/schema.k @@ -1,4 +1,13 @@ +schema Test: + name: str + surname?: str + +schema TestMap: + [name: str]: Test = {name = name} + schema AppConfig: + maps?: TestMap + my_func?: (int) -> int replicas: int app: AppConfig { diff --git a/spec/spec.proto b/spec/spec.proto index 02539aea..4f6f7bef 100644 --- a/spec/spec.proto +++ b/spec/spec.proto @@ -1423,7 +1423,7 @@ message UpdateDependenciesResult { // Message representing a KCL type. message KclType { - // Type name (e.g., schema, dict, list, str, int, float, bool, any, union, number_multiplier). + // Type name (e.g., schema, dict, list, str, int, float, bool, any, union, function, number_multiplier). string type = 1; // Union types if applicable. repeated KclType union_types = 2; @@ -1455,6 +1455,31 @@ message KclType { map examples = 15; // Base schema if applicable. KclType base_schema = 16; + // Function type if the KclType is a function. + optional FunctionType function = 17; + // Optional schema index signature + optional IndexSignature index_signature = 18; +} + +message FunctionType { + repeated Parameter params = 1; + KclType return_ty = 2; +} + +message Parameter { + string name = 1; + KclType ty = 2; +} + +// Message representing an index signature in KCL. +message IndexSignature { + // The optional index signature key name + optional string key_name = 1; + // Key type of the index signature. + KclType key = 2; + // Value type of the index signature. + KclType val = 3; + bool any_other = 4; } // Message representing a decorator in KCL. diff --git a/swift/Cargo.toml b/swift/Cargo.toml index c03e5bc6..a5a26354 100644 --- a/swift/Cargo.toml +++ b/swift/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kcl-lib-c" -version = "0.12.1" +version = "0.12.2" edition = "2024" publish = false @@ -12,4 +12,4 @@ doc = false cbindgen = "0.26.0" [dependencies] -kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.1" } +kcl-api = { git = "https://github.com/kcl-lang/kcl", version = "0.12.2" } diff --git a/wasm/package.json b/wasm/package.json index b445b4da..bc94b9fe 100644 --- a/wasm/package.json +++ b/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@kcl-lang/wasm-lib", - "version": "0.12.1", + "version": "0.12.2", "description": "KCL WASM module", "files": [ "kcl.wasm", diff --git a/zig/build.zig.zon b/zig/build.zig.zon index 5fa238f0..58239d7d 100644 --- a/zig/build.zig.zon +++ b/zig/build.zig.zon @@ -11,7 +11,7 @@ // This is a [Semantic Version](https://semver.org/). // In a future version of Zig it will be used for package deduplication. - .version = "0.12.1", + .version = "0.12.2", // Together with name, this represents a globally unique package // identifier. This field is generated by the Zig toolchain when the From caeb8c29508b5831c833c217d1d96f0d994f0e8a Mon Sep 17 00:00:00 2001 From: Peefy Date: Mon, 8 Dec 2025 23:19:53 +0800 Subject: [PATCH 2/2] chore: bump macos-13 to macos-15-intel Signed-off-by: Peefy --- .github/workflows/c-test.yaml | 2 +- .github/workflows/cpp-test.yaml | 2 +- .github/workflows/go-test.yaml | 8 ++------ .github/workflows/nodejs-test.yaml | 2 +- .github/workflows/swift-test.yaml | 2 +- .github/workflows/zig-test.yaml | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/c-test.yaml b/.github/workflows/c-test.yaml index 7ad684a0..22e861d0 100644 --- a/.github/workflows/c-test.yaml +++ b/.github/workflows/c-test.yaml @@ -29,7 +29,7 @@ jobs: working-directory: "c" strategy: matrix: - os: [macos-13, macos-latest, ubuntu-latest] + os: [macos-15-intel, macos-latest, ubuntu-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/cpp-test.yaml b/.github/workflows/cpp-test.yaml index 68b0e1e6..79849426 100644 --- a/.github/workflows/cpp-test.yaml +++ b/.github/workflows/cpp-test.yaml @@ -29,7 +29,7 @@ jobs: working-directory: "cpp" strategy: matrix: - os: [macos-13, macos-latest, ubuntu-latest] + os: [macos-15-intel, macos-latest, ubuntu-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml index 8242b84f..d89e181f 100644 --- a/.github/workflows/go-test.yaml +++ b/.github/workflows/go-test.yaml @@ -27,12 +27,8 @@ jobs: include: # macOS Intel/ARM configurations - - os: macos-13 - runner: macos-13 - cgo_enabled: 0 - - - os: macos-13-xlarge - runner: macos-13 + - os: macos-15-intel + runner: macos-15-intel cgo_enabled: 0 - os: macos-14 diff --git a/.github/workflows/nodejs-test.yaml b/.github/workflows/nodejs-test.yaml index eb724cf0..d1dd0119 100644 --- a/.github/workflows/nodejs-test.yaml +++ b/.github/workflows/nodejs-test.yaml @@ -171,7 +171,7 @@ jobs: path: nodejs/*.node macos: - runs-on: macos-13 + runs-on: macos-15-intel strategy: matrix: settings: diff --git a/.github/workflows/swift-test.yaml b/.github/workflows/swift-test.yaml index 9cd5fb15..2b763e97 100644 --- a/.github/workflows/swift-test.yaml +++ b/.github/workflows/swift-test.yaml @@ -31,7 +31,7 @@ jobs: matrix: # https://github.com/swift-actions/setup-swift/issues/677 # ubuntu-latest is not supported - os: [macos-13, macos-latest, ubuntu-22.04] + os: [macos-15-intel, macos-latest, ubuntu-22.04] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/zig-test.yaml b/.github/workflows/zig-test.yaml index f45b272d..7c099987 100644 --- a/.github/workflows/zig-test.yaml +++ b/.github/workflows/zig-test.yaml @@ -29,7 +29,7 @@ jobs: working-directory: "zig" strategy: matrix: - os: [macos-13, macos-latest, ubuntu-latest] + os: [macos-15-intel, macos-latest, ubuntu-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6