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 extends com.kcl.api.Spec.ParameterOrBuilder>
+ 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 extends com.kcl.api.Spec.ParameterOrBuilder>
+ 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 extends com.kcl.api.Spec.Parameter> 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 extends com.kcl.api.Spec.ParameterOrBuilder>
+ 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 extends com.kcl.api.Spec.ParameterOrBuilder>
+ 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 extends com.kcl.api.Spec.ParameterOrBuilder>
+ 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 extends com.kcl.api.Spec.Parameter> 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 extends com.kcl.api.Spec.ParameterOrBuilder>
+ 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