From b8e8e7842dfc120a7a47ba084e76564847788d50 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 17 Mar 2020 16:41:20 +0100 Subject: [PATCH] Updated java bindings --- .../src/cc/arduino/cli/commands/Common.java | 79 ++++- .../src/cc/arduino/cli/commands/Compile.java | 266 +++++++++++++-- .../src/cc/arduino/cli/commands/Lib.java | 320 +++++++++++++++--- 3 files changed, 575 insertions(+), 90 deletions(-) diff --git a/arduino-core/src/cc/arduino/cli/commands/Common.java b/arduino-core/src/cc/arduino/cli/commands/Common.java index 3888f8bb9..09627d2dc 100644 --- a/arduino-core/src/cc/arduino/cli/commands/Common.java +++ b/arduino-core/src/cc/arduino/cli/commands/Common.java @@ -1454,6 +1454,12 @@ public final class Common { * @return The completed. */ boolean getCompleted(); + + /** + * float percent_completed = 4; + * @return The percentCompleted. + */ + float getPercentCompleted(); } /** * Protobuf type {@code cc.arduino.cli.commands.TaskProgress} @@ -1519,6 +1525,11 @@ public final class Common { completed_ = input.readBool(); break; } + case 37: { + + percentCompleted_ = input.readFloat(); + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -1633,6 +1644,16 @@ public final class Common { return completed_; } + public static final int PERCENT_COMPLETED_FIELD_NUMBER = 4; + private float percentCompleted_; + /** + * float percent_completed = 4; + * @return The percentCompleted. + */ + public float getPercentCompleted() { + return percentCompleted_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1656,6 +1677,9 @@ public final class Common { if (completed_ != false) { output.writeBool(3, completed_); } + if (percentCompleted_ != 0F) { + output.writeFloat(4, percentCompleted_); + } unknownFields.writeTo(output); } @@ -1675,6 +1699,10 @@ public final class Common { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, completed_); } + if (percentCompleted_ != 0F) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, percentCompleted_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1696,6 +1724,9 @@ public final class Common { .equals(other.getMessage())) return false; if (getCompleted() != other.getCompleted()) return false; + if (java.lang.Float.floatToIntBits(getPercentCompleted()) + != java.lang.Float.floatToIntBits( + other.getPercentCompleted())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1714,6 +1745,9 @@ public final class Common { hash = (37 * hash) + COMPLETED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getCompleted()); + hash = (37 * hash) + PERCENT_COMPLETED_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPercentCompleted()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1853,6 +1887,8 @@ public final class Common { completed_ = false; + percentCompleted_ = 0F; + return this; } @@ -1882,6 +1918,7 @@ public final class Common { result.name_ = name_; result.message_ = message_; result.completed_ = completed_; + result.percentCompleted_ = percentCompleted_; onBuilt(); return result; } @@ -1941,6 +1978,9 @@ public final class Common { if (other.getCompleted() != false) { setCompleted(other.getCompleted()); } + if (other.getPercentCompleted() != 0F) { + setPercentCompleted(other.getPercentCompleted()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2151,6 +2191,36 @@ public final class Common { onChanged(); return this; } + + private float percentCompleted_ ; + /** + * float percent_completed = 4; + * @return The percentCompleted. + */ + public float getPercentCompleted() { + return percentCompleted_; + } + /** + * float percent_completed = 4; + * @param value The percentCompleted to set. + * @return This builder for chaining. + */ + public Builder setPercentCompleted(float value) { + + percentCompleted_ = value; + onChanged(); + return this; + } + /** + * float percent_completed = 4; + * @return This builder for chaining. + */ + public Builder clearPercentCompleted() { + + percentCompleted_ = 0F; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2232,10 +2302,11 @@ public final class Common { "commands\"\026\n\010Instance\022\n\n\002id\030\001 \001(\005\"h\n\020Down" + "loadProgress\022\013\n\003url\030\001 \001(\t\022\014\n\004file\030\002 \001(\t\022" + "\022\n\ntotal_size\030\003 \001(\003\022\022\n\ndownloaded\030\004 \001(\003\022" + - "\021\n\tcompleted\030\005 \001(\010\"@\n\014TaskProgress\022\014\n\004na" + + "\021\n\tcompleted\030\005 \001(\010\"[\n\014TaskProgress\022\014\n\004na" + "me\030\001 \001(\t\022\017\n\007message\030\002 \001(\t\022\021\n\tcompleted\030\003" + - " \001(\010B-Z+github.com/arduino/arduino-cli/r" + - "pc/commandsb\006proto3" + " \001(\010\022\031\n\021percent_completed\030\004 \001(\002B-Z+githu" + + "b.com/arduino/arduino-cli/rpc/commandsb\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -2258,7 +2329,7 @@ public final class Common { internal_static_cc_arduino_cli_commands_TaskProgress_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cc_arduino_cli_commands_TaskProgress_descriptor, - new java.lang.String[] { "Name", "Message", "Completed", }); + new java.lang.String[] { "Name", "Message", "Completed", "PercentCompleted", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/arduino-core/src/cc/arduino/cli/commands/Compile.java b/arduino-core/src/cc/arduino/cli/commands/Compile.java index e3c92cd9d..860a421de 100644 --- a/arduino-core/src/cc/arduino/cli/commands/Compile.java +++ b/arduino-core/src/cc/arduino/cli/commands/Compile.java @@ -20,24 +20,24 @@ public final class Compile { public enum CompileResult implements com.google.protobuf.ProtocolMessageEnum { /** - * success = 0; + * compile_success = 0; */ - success(0), + compile_success(0), /** - * error = 1; + * compile_error = 1; */ - error(1), + compile_error(1), UNRECOGNIZED(-1), ; /** - * success = 0; + * compile_success = 0; */ - public static final int success_VALUE = 0; + public static final int compile_success_VALUE = 0; /** - * error = 1; + * compile_error = 1; */ - public static final int error_VALUE = 1; + public static final int compile_error_VALUE = 1; public final int getNumber() { @@ -64,8 +64,8 @@ public final class Compile { */ public static CompileResult forNumber(int value) { switch (value) { - case 0: return success; - case 1: return error; + case 0: return compile_success; + case 1: return compile_error; default: return null; } } @@ -3200,12 +3200,27 @@ public final class Compile { com.google.protobuf.ByteString getErrStream(); /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + + /** + * .cc.arduino.cli.commands.CompileResult result = 4; * @return The enum numeric value on the wire for result. */ int getResultValue(); /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @return The result. */ cc.arduino.cli.commands.Compile.CompileResult getResult(); @@ -3268,7 +3283,20 @@ public final class Compile { errStream_ = input.readBytes(); break; } - case 24: { + case 26: { + cc.arduino.cli.commands.Common.TaskProgress.Builder subBuilder = null; + if (taskProgress_ != null) { + subBuilder = taskProgress_.toBuilder(); + } + taskProgress_ = input.readMessage(cc.arduino.cli.commands.Common.TaskProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(taskProgress_); + taskProgress_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { int rawValue = input.readEnum(); result_ = rawValue; @@ -3326,17 +3354,40 @@ public final class Compile { return errStream_; } - public static final int RESULT_FIELD_NUMBER = 3; + public static final int TASK_PROGRESS_FIELD_NUMBER = 3; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + public static final int RESULT_FIELD_NUMBER = 4; private int result_; /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @return The enum numeric value on the wire for result. */ public int getResultValue() { return result_; } /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @return The result. */ public cc.arduino.cli.commands.Compile.CompileResult getResult() { @@ -3365,8 +3416,11 @@ public final class Compile { if (!errStream_.isEmpty()) { output.writeBytes(2, errStream_); } - if (result_ != cc.arduino.cli.commands.Compile.CompileResult.success.getNumber()) { - output.writeEnum(3, result_); + if (taskProgress_ != null) { + output.writeMessage(3, getTaskProgress()); + } + if (result_ != cc.arduino.cli.commands.Compile.CompileResult.compile_success.getNumber()) { + output.writeEnum(4, result_); } unknownFields.writeTo(output); } @@ -3385,9 +3439,13 @@ public final class Compile { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, errStream_); } - if (result_ != cc.arduino.cli.commands.Compile.CompileResult.success.getNumber()) { + if (taskProgress_ != null) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, result_); + .computeMessageSize(3, getTaskProgress()); + } + if (result_ != cc.arduino.cli.commands.Compile.CompileResult.compile_success.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, result_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -3408,6 +3466,11 @@ public final class Compile { .equals(other.getOutStream())) return false; if (!getErrStream() .equals(other.getErrStream())) return false; + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } if (result_ != other.result_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -3424,6 +3487,10 @@ public final class Compile { hash = (53 * hash) + getOutStream().hashCode(); hash = (37 * hash) + ERR_STREAM_FIELD_NUMBER; hash = (53 * hash) + getErrStream().hashCode(); + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + result_; hash = (29 * hash) + unknownFields.hashCode(); @@ -3563,6 +3630,12 @@ public final class Compile { errStream_ = com.google.protobuf.ByteString.EMPTY; + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } result_ = 0; return this; @@ -3593,6 +3666,11 @@ public final class Compile { cc.arduino.cli.commands.Compile.CompileResp result = new cc.arduino.cli.commands.Compile.CompileResp(this); result.outStream_ = outStream_; result.errStream_ = errStream_; + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } result.result_ = result_; onBuilt(); return result; @@ -3648,6 +3726,9 @@ public final class Compile { if (other.getErrStream() != com.google.protobuf.ByteString.EMPTY) { setErrStream(other.getErrStream()); } + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } if (other.result_ != 0) { setResultValue(other.getResultValue()); } @@ -3746,16 +3827,135 @@ public final class Compile { return this; } + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.TaskProgress, cc.arduino.cli.commands.Common.TaskProgress.Builder, cc.arduino.cli.commands.Common.TaskProgressOrBuilder> taskProgressBuilder_; + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + if (taskProgressBuilder_ == null) { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } else { + return taskProgressBuilder_.getMessage(); + } + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + public Builder setTaskProgress(cc.arduino.cli.commands.Common.TaskProgress value) { + if (taskProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskProgress_ = value; + onChanged(); + } else { + taskProgressBuilder_.setMessage(value); + } + + return this; + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + public Builder setTaskProgress( + cc.arduino.cli.commands.Common.TaskProgress.Builder builderForValue) { + if (taskProgressBuilder_ == null) { + taskProgress_ = builderForValue.build(); + onChanged(); + } else { + taskProgressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + public Builder mergeTaskProgress(cc.arduino.cli.commands.Common.TaskProgress value) { + if (taskProgressBuilder_ == null) { + if (taskProgress_ != null) { + taskProgress_ = + cc.arduino.cli.commands.Common.TaskProgress.newBuilder(taskProgress_).mergeFrom(value).buildPartial(); + } else { + taskProgress_ = value; + } + onChanged(); + } else { + taskProgressBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + if (taskProgressBuilder_ != null) { + return taskProgressBuilder_.getMessageOrBuilder(); + } else { + return taskProgress_ == null ? + cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + } + /** + * .cc.arduino.cli.commands.TaskProgress task_progress = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.TaskProgress, cc.arduino.cli.commands.Common.TaskProgress.Builder, cc.arduino.cli.commands.Common.TaskProgressOrBuilder> + getTaskProgressFieldBuilder() { + if (taskProgressBuilder_ == null) { + taskProgressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.TaskProgress, cc.arduino.cli.commands.Common.TaskProgress.Builder, cc.arduino.cli.commands.Common.TaskProgressOrBuilder>( + getTaskProgress(), + getParentForChildren(), + isClean()); + taskProgress_ = null; + } + return taskProgressBuilder_; + } + private int result_ = 0; /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @return The enum numeric value on the wire for result. */ public int getResultValue() { return result_; } /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @param value The enum numeric value on the wire for result to set. * @return This builder for chaining. */ @@ -3765,7 +3965,7 @@ public final class Compile { return this; } /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @return The result. */ public cc.arduino.cli.commands.Compile.CompileResult getResult() { @@ -3774,7 +3974,7 @@ public final class Compile { return result == null ? cc.arduino.cli.commands.Compile.CompileResult.UNRECOGNIZED : result; } /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @param value The result to set. * @return This builder for chaining. */ @@ -3788,7 +3988,7 @@ public final class Compile { return this; } /** - * .cc.arduino.cli.commands.CompileResult result = 3; + * .cc.arduino.cli.commands.CompileResult result = 4; * @return This builder for chaining. */ public Builder clearResult() { @@ -3880,12 +4080,14 @@ public final class Compile { "\010\022\r\n\005quiet\030\013 \001(\010\022\016\n\006vidPid\030\014 \001(\t\022\022\n\nexpo" + "rtFile\030\r \001(\t\022\014\n\004jobs\030\016 \001(\005\022\021\n\tlibraries\030" + "\017 \003(\t\022\030\n\020optimizeForDebug\030\020 \001(\010\022\016\n\006dryRu" + - "n\030\021 \001(\010\"m\n\013CompileResp\022\022\n\nout_stream\030\001 \001" + - "(\014\022\022\n\nerr_stream\030\002 \001(\014\0226\n\006result\030\003 \001(\0162&" + - ".cc.arduino.cli.commands.CompileResult*\'" + - "\n\rCompileResult\022\013\n\007success\020\000\022\t\n\005error\020\001B" + - "-Z+github.com/arduino/arduino-cli/rpc/co" + - "mmandsb\006proto3" + "n\030\021 \001(\010\"\253\001\n\013CompileResp\022\022\n\nout_stream\030\001 " + + "\001(\014\022\022\n\nerr_stream\030\002 \001(\014\022<\n\rtask_progress" + + "\030\003 \001(\0132%.cc.arduino.cli.commands.TaskPro" + + "gress\0226\n\006result\030\004 \001(\0162&.cc.arduino.cli.c" + + "ommands.CompileResult*7\n\rCompileResult\022\023" + + "\n\017compile_success\020\000\022\021\n\rcompile_error\020\001B-" + + "Z+github.com/arduino/arduino-cli/rpc/com" + + "mandsb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -3903,7 +4105,7 @@ public final class Compile { internal_static_cc_arduino_cli_commands_CompileResp_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cc_arduino_cli_commands_CompileResp_descriptor, - new java.lang.String[] { "OutStream", "ErrStream", "Result", }); + new java.lang.String[] { "OutStream", "ErrStream", "TaskProgress", "Result", }); cc.arduino.cli.commands.Common.getDescriptor(); } diff --git a/arduino-core/src/cc/arduino/cli/commands/Lib.java b/arduino-core/src/cc/arduino/cli/commands/Lib.java index c63d5a325..84cb79c5e 100644 --- a/arduino-core/src/cc/arduino/cli/commands/Lib.java +++ b/arduino-core/src/cc/arduino/cli/commands/Lib.java @@ -14,6 +14,110 @@ public final class Lib { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } + /** + * Protobuf enum {@code cc.arduino.cli.commands.LibrarySearchStatus} + */ + public enum LibrarySearchStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + * failed = 0; + */ + failed(0), + /** + * success = 1; + */ + success(1), + UNRECOGNIZED(-1), + ; + + /** + * failed = 0; + */ + public static final int failed_VALUE = 0; + /** + * success = 1; + */ + public static final int success_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LibrarySearchStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LibrarySearchStatus forNumber(int value) { + switch (value) { + case 0: return failed; + case 1: return success; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LibrarySearchStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LibrarySearchStatus findValueByNumber(int number) { + return LibrarySearchStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.getDescriptor().getEnumTypes().get(0); + } + + private static final LibrarySearchStatus[] VALUES = values(); + + public static LibrarySearchStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LibrarySearchStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cc.arduino.cli.commands.LibrarySearchStatus) + } + /** * Protobuf enum {@code cc.arduino.cli.commands.LibraryLayout} */ @@ -92,7 +196,7 @@ public final class Lib { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return cc.arduino.cli.commands.Lib.getDescriptor().getEnumTypes().get(0); + return cc.arduino.cli.commands.Lib.getDescriptor().getEnumTypes().get(1); } private static final LibraryLayout[] VALUES = values(); @@ -222,7 +326,7 @@ public final class Lib { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return cc.arduino.cli.commands.Lib.getDescriptor().getEnumTypes().get(1); + return cc.arduino.cli.commands.Lib.getDescriptor().getEnumTypes().get(2); } private static final LibraryLocation[] VALUES = values(); @@ -9837,6 +9941,17 @@ public final class Lib { */ cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder getLibrariesOrBuilder( int index); + + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The status. + */ + cc.arduino.cli.commands.Lib.LibrarySearchStatus getStatus(); } /** * Protobuf type {@code cc.arduino.cli.commands.LibrarySearchResp} @@ -9852,6 +9967,7 @@ public final class Lib { } private LibrarySearchResp() { libraries_ = java.util.Collections.emptyList(); + status_ = 0; } @java.lang.Override @@ -9894,6 +10010,12 @@ public final class Lib { input.readMessage(cc.arduino.cli.commands.Lib.SearchedLibrary.parser(), extensionRegistry)); break; } + case 16: { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -9964,6 +10086,25 @@ public final class Lib { return libraries_.get(index); } + public static final int STATUS_FIELD_NUMBER = 2; + private int status_; + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The status. + */ + public cc.arduino.cli.commands.Lib.LibrarySearchStatus getStatus() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Lib.LibrarySearchStatus result = cc.arduino.cli.commands.Lib.LibrarySearchStatus.valueOf(status_); + return result == null ? cc.arduino.cli.commands.Lib.LibrarySearchStatus.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -9981,6 +10122,9 @@ public final class Lib { for (int i = 0; i < libraries_.size(); i++) { output.writeMessage(1, libraries_.get(i)); } + if (status_ != cc.arduino.cli.commands.Lib.LibrarySearchStatus.failed.getNumber()) { + output.writeEnum(2, status_); + } unknownFields.writeTo(output); } @@ -9994,6 +10138,10 @@ public final class Lib { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, libraries_.get(i)); } + if (status_ != cc.arduino.cli.commands.Lib.LibrarySearchStatus.failed.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, status_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -10011,6 +10159,7 @@ public final class Lib { if (!getLibrariesList() .equals(other.getLibrariesList())) return false; + if (status_ != other.status_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -10026,6 +10175,8 @@ public final class Lib { hash = (37 * hash) + LIBRARIES_FIELD_NUMBER; hash = (53 * hash) + getLibrariesList().hashCode(); } + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -10166,6 +10317,8 @@ public final class Lib { } else { librariesBuilder_.clear(); } + status_ = 0; + return this; } @@ -10202,6 +10355,7 @@ public final class Lib { } else { result.libraries_ = librariesBuilder_.build(); } + result.status_ = status_; onBuilt(); return result; } @@ -10276,6 +10430,9 @@ public final class Lib { } } } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -10545,6 +10702,58 @@ public final class Lib { } return librariesBuilder_; } + + private int status_ = 0; + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + onChanged(); + return this; + } + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The status. + */ + public cc.arduino.cli.commands.Lib.LibrarySearchStatus getStatus() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Lib.LibrarySearchStatus result = cc.arduino.cli.commands.Lib.LibrarySearchStatus.valueOf(status_); + return result == null ? cc.arduino.cli.commands.Lib.LibrarySearchStatus.UNRECOGNIZED : result; + } + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(cc.arduino.cli.commands.Lib.LibrarySearchStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -22608,57 +22817,60 @@ public final class Lib { "ionRequired\030\002 \001(\t\022\030\n\020versionInstalled\030\003 " + "\001(\t\"V\n\020LibrarySearchReq\0223\n\010instance\030\001 \001(" + "\0132!.cc.arduino.cli.commands.Instance\022\r\n\005" + - "query\030\002 \001(\t\"P\n\021LibrarySearchResp\022;\n\tlibr" + - "aries\030\001 \003(\0132(.cc.arduino.cli.commands.Se" + - "archedLibrary\"\374\001\n\017SearchedLibrary\022\014\n\004nam" + - "e\030\001 \001(\t\022H\n\010releases\030\002 \003(\01326.cc.arduino.c" + - "li.commands.SearchedLibrary.ReleasesEntr" + - "y\0227\n\006latest\030\003 \001(\0132\'.cc.arduino.cli.comma" + - "nds.LibraryRelease\032X\n\rReleasesEntry\022\013\n\003k" + - "ey\030\001 \001(\t\0226\n\005value\030\002 \001(\0132\'.cc.arduino.cli" + - ".commands.LibraryRelease:\0028\001\"\337\002\n\016Library" + - "Release\022\016\n\006author\030\001 \001(\t\022\017\n\007version\030\002 \001(\t" + - "\022\022\n\nmaintainer\030\003 \001(\t\022\020\n\010sentence\030\004 \001(\t\022\021" + - "\n\tparagraph\030\005 \001(\t\022\017\n\007website\030\006 \001(\t\022\020\n\010ca" + - "tegory\030\007 \001(\t\022\025\n\rarchitectures\030\010 \003(\t\022\r\n\005t" + - "ypes\030\t \003(\t\022<\n\tresources\030\n \001(\0132).cc.ardui" + - "no.cli.commands.DownloadResource\022\017\n\007lice" + - "nse\030\013 \001(\t\022\031\n\021provides_includes\030\014 \003(\t\022@\n\014" + - "dependencies\030\r \003(\0132*.cc.arduino.cli.comm" + - "ands.LibraryDependency\"=\n\021LibraryDepende" + - "ncy\022\014\n\004name\030\001 \001(\t\022\032\n\022version_constraint\030" + - "\002 \001(\t\"k\n\020DownloadResource\022\013\n\003url\030\001 \001(\t\022\027" + - "\n\017archivefilename\030\002 \001(\t\022\020\n\010checksum\030\003 \001(" + - "\t\022\014\n\004size\030\004 \001(\003\022\021\n\tcachepath\030\005 \001(\t\"e\n\016Li" + - "braryListReq\0223\n\010instance\030\001 \001(\0132!.cc.ardu" + - "ino.cli.commands.Instance\022\013\n\003all\030\002 \001(\010\022\021" + - "\n\tupdatable\030\003 \001(\010\"W\n\017LibraryListResp\022D\n\021" + - "installed_library\030\001 \003(\0132).cc.arduino.cli" + - ".commands.InstalledLibrary\"\177\n\020InstalledL" + - "ibrary\0221\n\007library\030\001 \001(\0132 .cc.arduino.cli" + - ".commands.Library\0228\n\007release\030\002 \001(\0132\'.cc." + - "arduino.cli.commands.LibraryRelease\"\366\004\n\007" + - "Library\022\014\n\004name\030\001 \001(\t\022\016\n\006author\030\002 \001(\t\022\022\n" + - "\nmaintainer\030\003 \001(\t\022\020\n\010sentence\030\004 \001(\t\022\021\n\tp" + - "aragraph\030\005 \001(\t\022\017\n\007website\030\006 \001(\t\022\020\n\010categ" + - "ory\030\007 \001(\t\022\025\n\rarchitectures\030\010 \003(\t\022\r\n\005type" + - "s\030\t \003(\t\022\023\n\013install_dir\030\n \001(\t\022\022\n\nsource_d" + - "ir\030\013 \001(\t\022\023\n\013utility_dir\030\014 \001(\t\022\032\n\022contain" + - "er_platform\030\016 \001(\t\022\021\n\treal_name\030\020 \001(\t\022\025\n\r" + - "dot_a_linkage\030\021 \001(\010\022\023\n\013precompiled\030\022 \001(\010" + - "\022\020\n\010ld_flags\030\023 \001(\t\022\021\n\tis_legacy\030\024 \001(\010\022\017\n" + - "\007version\030\025 \001(\t\022\017\n\007license\030\026 \001(\t\022D\n\nprope" + - "rties\030\027 \003(\01320.cc.arduino.cli.commands.Li" + - "brary.PropertiesEntry\022:\n\010location\030\030 \001(\0162" + - "(.cc.arduino.cli.commands.LibraryLocatio" + - "n\0226\n\006layout\030\031 \001(\0162&.cc.arduino.cli.comma" + - "nds.LibraryLayout\0321\n\017PropertiesEntry\022\013\n\003" + - "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*6\n\rLibraryL" + - "ayout\022\017\n\013flat_layout\020\000\022\024\n\020recursive_layo" + - "ut\020\001*c\n\017LibraryLocation\022\017\n\013ide_builtin\020\000" + - "\022\010\n\004user\020\001\022\024\n\020platform_builtin\020\002\022\037\n\033refe" + - "renced_platform_builtin\020\003B-Z+github.com/" + - "arduino/arduino-cli/rpc/commandsb\006proto3" + "query\030\002 \001(\t\"\216\001\n\021LibrarySearchResp\022;\n\tlib" + + "raries\030\001 \003(\0132(.cc.arduino.cli.commands.S" + + "earchedLibrary\022<\n\006status\030\002 \001(\0162,.cc.ardu" + + "ino.cli.commands.LibrarySearchStatus\"\374\001\n" + + "\017SearchedLibrary\022\014\n\004name\030\001 \001(\t\022H\n\010releas" + + "es\030\002 \003(\01326.cc.arduino.cli.commands.Searc" + + "hedLibrary.ReleasesEntry\0227\n\006latest\030\003 \001(\013" + + "2\'.cc.arduino.cli.commands.LibraryReleas" + + "e\032X\n\rReleasesEntry\022\013\n\003key\030\001 \001(\t\0226\n\005value" + + "\030\002 \001(\0132\'.cc.arduino.cli.commands.Library" + + "Release:\0028\001\"\337\002\n\016LibraryRelease\022\016\n\006author" + + "\030\001 \001(\t\022\017\n\007version\030\002 \001(\t\022\022\n\nmaintainer\030\003 " + + "\001(\t\022\020\n\010sentence\030\004 \001(\t\022\021\n\tparagraph\030\005 \001(\t" + + "\022\017\n\007website\030\006 \001(\t\022\020\n\010category\030\007 \001(\t\022\025\n\ra" + + "rchitectures\030\010 \003(\t\022\r\n\005types\030\t \003(\t\022<\n\tres" + + "ources\030\n \001(\0132).cc.arduino.cli.commands.D" + + "ownloadResource\022\017\n\007license\030\013 \001(\t\022\031\n\021prov" + + "ides_includes\030\014 \003(\t\022@\n\014dependencies\030\r \003(" + + "\0132*.cc.arduino.cli.commands.LibraryDepen" + + "dency\"=\n\021LibraryDependency\022\014\n\004name\030\001 \001(\t" + + "\022\032\n\022version_constraint\030\002 \001(\t\"k\n\020Download" + + "Resource\022\013\n\003url\030\001 \001(\t\022\027\n\017archivefilename" + + "\030\002 \001(\t\022\020\n\010checksum\030\003 \001(\t\022\014\n\004size\030\004 \001(\003\022\021" + + "\n\tcachepath\030\005 \001(\t\"e\n\016LibraryListReq\0223\n\010i" + + "nstance\030\001 \001(\0132!.cc.arduino.cli.commands." + + "Instance\022\013\n\003all\030\002 \001(\010\022\021\n\tupdatable\030\003 \001(\010" + + "\"W\n\017LibraryListResp\022D\n\021installed_library" + + "\030\001 \003(\0132).cc.arduino.cli.commands.Install" + + "edLibrary\"\177\n\020InstalledLibrary\0221\n\007library" + + "\030\001 \001(\0132 .cc.arduino.cli.commands.Library" + + "\0228\n\007release\030\002 \001(\0132\'.cc.arduino.cli.comma" + + "nds.LibraryRelease\"\366\004\n\007Library\022\014\n\004name\030\001" + + " \001(\t\022\016\n\006author\030\002 \001(\t\022\022\n\nmaintainer\030\003 \001(\t" + + "\022\020\n\010sentence\030\004 \001(\t\022\021\n\tparagraph\030\005 \001(\t\022\017\n" + + "\007website\030\006 \001(\t\022\020\n\010category\030\007 \001(\t\022\025\n\rarch" + + "itectures\030\010 \003(\t\022\r\n\005types\030\t \003(\t\022\023\n\013instal" + + "l_dir\030\n \001(\t\022\022\n\nsource_dir\030\013 \001(\t\022\023\n\013utili" + + "ty_dir\030\014 \001(\t\022\032\n\022container_platform\030\016 \001(\t" + + "\022\021\n\treal_name\030\020 \001(\t\022\025\n\rdot_a_linkage\030\021 \001" + + "(\010\022\023\n\013precompiled\030\022 \001(\010\022\020\n\010ld_flags\030\023 \001(" + + "\t\022\021\n\tis_legacy\030\024 \001(\010\022\017\n\007version\030\025 \001(\t\022\017\n" + + "\007license\030\026 \001(\t\022D\n\nproperties\030\027 \003(\01320.cc." + + "arduino.cli.commands.Library.PropertiesE" + + "ntry\022:\n\010location\030\030 \001(\0162(.cc.arduino.cli." + + "commands.LibraryLocation\0226\n\006layout\030\031 \001(\016" + + "2&.cc.arduino.cli.commands.LibraryLayout" + + "\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001*.\n\023LibrarySearchStatus\022\n\n\006fa" + + "iled\020\000\022\013\n\007success\020\001*6\n\rLibraryLayout\022\017\n\013" + + "flat_layout\020\000\022\024\n\020recursive_layout\020\001*c\n\017L" + + "ibraryLocation\022\017\n\013ide_builtin\020\000\022\010\n\004user\020" + + "\001\022\024\n\020platform_builtin\020\002\022\037\n\033referenced_pl" + + "atform_builtin\020\003B-Z+github.com/arduino/a" + + "rduino-cli/rpc/commandsb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -22742,7 +22954,7 @@ public final class Lib { internal_static_cc_arduino_cli_commands_LibrarySearchResp_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cc_arduino_cli_commands_LibrarySearchResp_descriptor, - new java.lang.String[] { "Libraries", }); + new java.lang.String[] { "Libraries", "Status", }); internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_cc_arduino_cli_commands_SearchedLibrary_fieldAccessorTable = new